Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!mcooper From: mcooper@s.cs.uiuc.edu Newsgroups: comp.graphics Subject: Re: Rubiks Cube Message-ID: <207400039@s.cs.uiuc.edu> Date: 30 Nov 89 17:35:22 GMT References: <256@<4382> Lines: 37 Nf-ID: #R:<4382:256:s.cs.uiuc.edu:207400039:000:1635 Nf-From: s.cs.uiuc.edu!mcooper Nov 29 08:31:00 1989 /* Written 3:08 pm Nov 24, 1989 by 4237_5202@uwovax.uwo.ca in s.cs.uiuc.edu:comp.graphics */ /* ---------- "Rubiks Cube" ---------- */ I am working on a 3-d graphics application in GKS and C on a sun workstation to simulate Rubiks Cube. Does anyone have an algorithm to solve the cube or suggestions for structures. I am currently working on the users interface, asking what areas to move or to view the cube differently. I will post my solution to anyone who offers help. Thanks Brian CS UWO third year /* End of text from s.cs.uiuc.edu:comp.graphics */ Well, the easiest solution I see is hitting up libraries and garage sales for the avalanche of book published in the early 80's called 'How to solve Rubik's Cube' or variations thereof... Ther's a ton of them. You should be able to find one. Converting the cube moves into 3D matrix manipulation seems fairly trivial. The hard part seems to me to be writing the pattern matching algorithm. Most 'cube-solver' books had a set number of moves for a certain situation. i.e. if one face is all one color, but the corners of the face are switched, do this set of moves, etc... All you'd have to do is recognize the patterns and do the appropriate moves. +-------------------------------------+----------------------------------------+ | "When the going gets weird, | | | the weird turn pro." | Marc Cooper mcooper@cs.uiuc.edu | | | University of Illinois, C-U | | -Hunter S. Thompson | | +-------------------------------------+----------------------------------------+ Brought to you by Super Global Mega Corp .com