Re: Rubik's Cube Help!
Posted by sachuraju on Apr 20, 2013; 12:26am
URL: https://forum.world.st/Rubik-s-Cube-Help-tp4682659p4682666.html
I'm working with Balaji to get the Rubik's cube implemented in Croquet Smalltalk. I'm posting a few questions and hoping to get them answered. I'm still new to the framework and therefore would appreciate some detailed responses to my questions.
This is the way we are imagining to get this done.
Step 1 : figure out a way to rotate a cube around a point in the world, which is not the center of the cube itself. (This would be like planets rotating around the sun)
I understand that, to do this, we first need to translate the object to the point, rotate it there, and translate it back, which gives the effect of rotation around a point. I'm having trouble to figure out what existing classes should I leverage that might already do this.
Step 2 : After step 1 - we need a way to select all the cubes in a plane so that rotating one, causes rotation of all the cubes in the plane.
Step 3 : we need a way to combine 1 and 2 to actually get the rotation for all cubes.