Login  Register

Re: Rubik's Cube Help!

Posted by David A. Smith on Apr 21, 2013; 1:02pm
URL: https://forum.world.st/Rubik-s-Cube-Help-tp4682659p4682826.html

Step 1 is basically right. Once you formulate the actual equation, you can combine it all into a single matrix if you do it a lot. Easier to do the following:
Step 2 - create a TFrame at the center of where you want to rotate around. You can place this TFrame anywhere you like in the world. Add the elements of the cube into the TFrame.
Step 3 - more difficult if you want to have each cube move somewhat independently the way a Rubik's cube does. I wrote a method that computes the transform matrix from one object to another. This allows you to perform a rotation around the other object or TFrame. I don't remember the actual method name though. 

David


On Fri, Apr 19, 2013 at 8:26 PM, sachuraju <[hidden email]> wrote:
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.



--
View this message in context: http://forum.world.st/Rubik-s-Cube-Help-tp4682659p4682666.html
Sent from the Croquet - Dev mailing list archive at Nabble.com.



--
David A. Smith
Picture