POV-Ray : Newsgroups : povray.binaries.images : Rubix Cube Server Time
21 Oct 2026 02:08:03 EDT (-0400)
  Rubix Cube (Message 1 to 17 of 17)  
From: RED-Cow
Subject: Rubix Cube
Date: 5 May 1999 19:14:35
Message: <3730C25A.76C1@erols.com>
I got bored the other day and decided to make one of these.  I'm
wondering if Moray's Inverse Kinematics could be used to make it so the
sides are rotatable.  That would be cool.


Post a reply to this message


Attachments:
Download 'rubix.gif' (6 KB)

Preview of image 'rubix.gif'
rubix.gif


 

From: Ken
Subject: Re: Rubix Cube
Date: 5 May 1999 20:53:01
Message: <3730D956.A443BD4C@pacbell.net>
RED-Cow wrote:
> 
> I got bored the other day and decided to make one of these.  I'm
> wondering if Moray's Inverse Kinematics could be used to make it so the
> sides are rotatable.  That would be cool.

  From what I understand about inverse kinematics this would probably
be a poor application of it's abilities. All you really need to do is
declare a group of nine cubes on one face in a union and then rotate
it around it's own axis.

 A little random color distribution from that shown would at least
seperate yours from the dozen or so I have seen all displayed in a
solved state of rest.

  To get it really mixed up i.e. to make it usable is not something I
think would be worth the effort. Might make for a really challenging
animation project. Write a routine that randomly mixes up the cube and
the remainder of the animation pov spends trying to solve it. Might be
possible but way beyond anything I would like to try.

  Hey Spider ! Got a new challenge for you. <* big wide grin *>

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Spider
Subject: Re: Rubix Cube
Date: 5 May 1999 22:04:34
Message: <3730E94D.63153DE9@bahnhof.se>
Ken wrote:
> 
> RED-Cow wrote:
> >
> > I got bored the other day and decided to make one of these.  I'm
> > wondering if Moray's Inverse Kinematics could be used to make it so the
> > sides are rotatable.  That would be cool.
> 
>   From what I understand about inverse kinematics this would probably
> be a poor application of it's abilities. All you really need to do is
> declare a group of nine cubes on one face in a union and then rotate
> it around it's own axis.
> 
>  A little random color distribution from that shown would at least
> seperate yours from the dozen or so I have seen all displayed in a
> solved state of rest.
> 
>   To get it really mixed up i.e. to make it usable is not something I
> think would be worth the effort. Might make for a really challenging
> animation project. Write a routine that randomly mixes up the cube and
> the remainder of the animation pov spends trying to solve it. Might be
> possible but way beyond anything I would like to try.
> 
>   Hey Spider ! Got a new challenge for you. <* big wide grin *>

oh, great, thanks :-)
*grins*

Well, to solve this one, I think It'd be easiest to start from a "correct" cube.
Then, using a macro to rotate the sides...

You'dd use a 3x3x3 array to specify each "row" (a square, really.) of boxes.

from one side it would be: (ascii)
+-----------+
|  0        |
+-----------+
|  1        |
+-----------+
|  2        |
+-----------+
Then, to rotate theese, youd simply(hehe, not really) write a macro that takes
in the row, and rotates this arounnd an axis. 

Either three different macros (my preferred idea) or one that takes two
values(axis and number, this is more difficult since you must decide in what
plane the square is to be found)

#declare colour_index = array[6] { //Each colour. used inside the cube array.
  colour rgb <1,1,1>,  //White, first colour
  colour rgb <1,1,0>,  //Yellow
  colour rgb <0,0,1>,  //Blue
  colour rgb <0,1,0>,  //Green
  colour rgb <1,0,0>,  //Red
  colour rbg <0,1,1>  //What's the last one? I don't have a cube.
}


//This array contains every individual "block-face" in the cube.
#declare cube = array[3][3][6] { //Number theese so that all sides have the 
				//right colours.
				//The axis are the face normals. (commented)
  {{0,0,0},{0,0,0}}, //+y
  {{1,1,1},{1,1,1}}, //-y
  {{2,2,2},{2,2,2}}, //+z
  {{3,3,3},{3,3,3}}, //-z
  {{4,4,4},{4,4,4}}, //+x
  {{5,5,5},{5,5,5}}} //-x
}

#macro rotate_y(iRow) { //rotate around the y axis. numbered from +y to -y
  #local theBox = array[3][4] { //A snip the right row. 
				//3 boxes a side, 4 sides.
//Well, I'm tired, can't figure out how to decide what row is where. 
//I'll think about it tomorrow.
//I'd guess for this:
    {cube[][][],cube[][][],cube[][][]},
    {cube[][][],cube[][][],cube[][][]},
    {cube[][][],cube[][][],cube[][][]},
    {cube[][][],cube[][][],cube[][][]}
  }
}


After some thinking, I realise this code won't really work at all.
The outer lines aren't counted for. I'll blame my tiredness..
But, yes, i think I can solve it using a few arrays and a couple of macros.
Thanx for the thought anyway, ken :-)

Then there is the small matter of interpolating the frames so it becomes a
smooth animation. the way I had in mind would have to be modified to use a clock
operator with the rotates. It won't be that easy to do it then...

perhaps if it was solved as a 3x3x3 array, where you manually numbered and
placed each cube in the original position, with correct colours on the sides.
That way a smooth rotation could be implemented fairly easy.

But, as I think you can guess, i'm pretty tired, adn I haven't started to work
with animations yet. might take a while before I start.


Well, I might solve this one yet. I'll be in touch, I hope.



-- 
//Spider    --  [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
And the meek'll inherit what they damn well please
	Get ahead, go figure, go ahead and pull the trigger
		Everything under the gun
			--"Sisters Of Mercy" -- "Under The Gun"


Post a reply to this message

From: Nobot
Subject: oh my
Date: 6 May 1999 00:50:40
Message: <3731113D.BE78599F@powersurfr.com>
Ken, your idea to make pov solve it seems like an interesting mathematical
problem and an it couldn't help.... hmmm maybe you could get some use of a
super computer and say it's academic research :) it would be a cool animation
especially if it looked right like all the proper specular and sizes and
everything maybe over some sort of a plain that changes color like a disco
floor.... hammy this  very interesting, thanks for the idea


Post a reply to this message

From: GrimDude
Subject: Re: Rubix Cube
Date: 6 May 1999 02:31:56
Message: <3731294c.0@news.povray.org>
The real time solution of one of these things would lead to a very large
animation, indeed. I would say a minimum of 500 frames, and probably more.

GrimDude
vos### [at] arkansasnet


Post a reply to this message

From: Ph Gibone
Subject: Re: Rubix Cube
Date: 6 May 1999 02:43:53
Message: <37312c19.0@news.povray.org>
>
>  From what I understand about inverse kinematics this would probably
>be a poor application of it's abilities. All you really need to do is
>declare a group of nine cubes on one face in a union and then rotate
>it around it's own axis.
>

Not so easy : a cube would have to belong to different groups, I believe
it's not possible !
Philippe


Post a reply to this message

From: GrimDude
Subject: Re: Rubix Cube
Date: 6 May 1999 03:02:45
Message: <37313085.0@news.povray.org>
Hmm, I believe it's possible, though difficult.

GrimDude
vos### [at] arkansasnet


Post a reply to this message

From: Thomas Lake
Subject: Re: Rubix Cube
Date: 6 May 1999 06:28:35
Message: <373160CA.912D315B@home.com>
I think there is an easier way to do this than with complex mathematics. I'm
not sure this would work, though I don't see why not. What you could do is
get a real rubix cube and draw or write down the positions and color of all
the different cubes. Then take a few days off work :-) and solve it as many
times as you can each time writing down all the different moves. Then all you
have to do is recreate the rubix cube in Pov-Ray using the drawing or
description you made of the original cube then animate it using the
instructions you wrote down while solving it.

Ken wrote:

> RED-Cow wrote:
> >
> > I got bored the other day and decided to make one of these.  I'm
> > wondering if Moray's Inverse Kinematics could be used to make it so the
> > sides are rotatable.  That would be cool.
>
>   From what I understand about inverse kinematics this would probably
> be a poor application of it's abilities. All you really need to do is
> declare a group of nine cubes on one face in a union and then rotate
> it around it's own axis.
>
>  A little random color distribution from that shown would at least
> seperate yours from the dozen or so I have seen all displayed in a
> solved state of rest.
>
>   To get it really mixed up i.e. to make it usable is not something I
> think would be worth the effort. Might make for a really challenging
> animation project. Write a routine that randomly mixes up the cube and
> the remainder of the animation pov spends trying to solve it. Might be
> possible but way beyond anything I would like to try.
>
>   Hey Spider ! Got a new challenge for you. <* big wide grin *>
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net


Post a reply to this message

From: Ph Gibone
Subject: Re: Rubix Cube
Date: 6 May 1999 06:57:24
Message: <37316784.0@news.povray.org>
Anxious to see how
Philippe
GrimDude a écrit dans le message <37313085.0@news.povray.org>...
>Hmm, I believe it's possible, though difficult.
>
>GrimDude
>vos### [at] arkansasnet
>
>


Post a reply to this message

From: Axel Hecht
Subject: Re: Rubix Cube
Date: 6 May 1999 12:08:50
Message: <3731B0CF.2420E39@numerik.uni-kiel.de>
Ken wrote:
> 
> RED-Cow wrote:
> >
> > I got bored the other day and decided to make one of these.  I'm
> > wondering if Moray's Inverse Kinematics could be used to make it so the
> > sides are rotatable.  That would be cool.
> 
>   From what I understand about inverse kinematics this would probably
> be a poor application of it's abilities. All you really need to do is
> declare a group of nine cubes on one face in a union and then rotate
> it around it's own axis.
> 
>  A little random color distribution from that shown would at least
> seperate yours from the dozen or so I have seen all displayed in a
> solved state of rest.
> 
>   To get it really mixed up i.e. to make it usable is not something I
> think would be worth the effort. Might make for a really challenging
> animation project. Write a routine that randomly mixes up the cube and
> the remainder of the animation pov spends trying to solve it. Might be
> possible but way beyond anything I would like to try.
> 

Well posed hell :-)
Two remarks, firstly, not every random order of boxes is solveble! I know a very bad
move towards
others trying to solve your cube, just by twisting one box. No way to ever make it. So
you have to
be really careful to choose or construct a possible order. But then of course one can
implement the
solver, that was there at the time. I used to have it in print, but surfing may yield
to a faster
solution.

Axel

PS: I think the spaces between the colored patches are just a bit to wide.


Post a reply to this message

From: Josh English
Subject: Re: Rubix Cube
Date: 6 May 1999 13:38:23
Message: <3731D378.6428CEE5@spiritone.com>
once you have the macros to turn the faces, simply run that macro with some
random parameters about 1000 times to shuffle the cube and keep it solvable. I
agree that it would be easier to grab a real cube, scramble it, and plot out
the moves to solve it. That's quite easily done. Does anyone remeber how to
solve the cube?
Joshua


Axel Hecht wrote:
> 
> Ken wrote:
> >
> > RED-Cow wrote:
> > >
> > > I got bored the other day and decided to make one of these.  I'm
> > > wondering if Moray's Inverse Kinematics could be used to make it so the
> > > sides are rotatable.  That would be cool.
> >
> >   From what I understand about inverse kinematics this would probably
> > be a poor application of it's abilities. All you really need to do is
> > declare a group of nine cubes on one face in a union and then rotate
> > it around it's own axis.
> >
> >  A little random color distribution from that shown would at least
> > seperate yours from the dozen or so I have seen all displayed in a
> > solved state of rest.
> >
> >   To get it really mixed up i.e. to make it usable is not something I
> > think would be worth the effort. Might make for a really challenging
> > animation project. Write a routine that randomly mixes up the cube and
> > the remainder of the animation pov spends trying to solve it. Might be
> > possible but way beyond anything I would like to try.
> >
> 
> Well posed hell :-)
> Two remarks, firstly, not every random order of boxes is solveble! I know a very bad
move towards
> others trying to solve your cube, just by twisting one box. No way to ever make it.
So you have to
> be really careful to choose or construct a possible order. But then of course one
can implement the
> solver, that was there at the time. I used to have it in print, but surfing may
yield to a faster
> solution.
> 
> Axel
> 
> PS: I think the spaces between the colored patches are just a bit to wide.


Post a reply to this message

From: GrimDude
Subject: Re: Rubix Cube
Date: 6 May 1999 15:42:37
Message: <3731e29d.0@news.povray.org>
Yup! Got two of the things here. :)

I still average between 30 and 45 seconds to cure it, regardless of how
confused it is.

GrimDude
vos### [at] arkansasnet


Post a reply to this message

From: Andy Woodfin
Subject: Re: Rubix Cube
Date: 6 May 1999 22:30:35
Message: <37324176.274F7205@uncc.edu>
Thomas Lake wrote:

> I think there is an easier way to do this than with complex mathematics. I'm
> not sure this would work, though I don't see why not. What you could do is
> get a real rubix cube and draw or write down the positions and color of all
> the different cubes. Then take a few days off work :-) and solve it as many
> times as you can each time writing down all the different moves. Then all you
> have to do is recreate the rubix cube in Pov-Ray using the drawing or
> description you made of the original cube then animate it using the
> instructions you wrote down while solving it.
>
>

Or you could just successively randomly rotate the sides from the previous
frame's orientation, then animate the frames in reverse and nobody's the wiser!
:-)I've done the lock-yourself-in-your-room-until-you-solve-it thing, and it's a
bit time consuming.

Andy


--

--------------------
"There are three men in a boat with four cigarettes but no matches.
How do they smoke??"
  -The Riddler

Andrew Woodfin
UNC Charlotte Center for Precision Metrology
adw### [at] unccedu | http://www.coe.uncc.edu/~adwoodfi
--------------------


Post a reply to this message

From: Thomas Lake
Subject: Re: Rubix Cube
Date: 7 May 1999 00:44:53
Message: <373261C0.9F026663@home.com>
Guess most people know about this already, but seeing as how it relates to
the topic. Some student, I believe at MIT or something, used a bank of
super computers to plot out the shortest route to solving the rubix cube
from ANY posioble position and found that it could be solved in about 17
moves from ANY posible starting position.

GrimDude wrote:

> Yup! Got two of the things here. :)
>
> I still average between 30 and 45 seconds to cure it, regardless of how
> confused it is.
>
> GrimDude
> vos### [at] arkansasnet


Post a reply to this message

From: Rick (Kitty5)
Subject: Re: Rubix Cube
Date: 7 May 1999 15:35:14
Message: <37333262.0@news.povray.org>
Yes, there is only one way to solve a Rubix cube, thats why ppl can do then
in 60 secs or so, unfortunatly for the rest of us there are several million
wrong ways..

Maybe i will have to dig out one of those books :)

Rick


Post a reply to this message

From: GrimDude
Subject: Re: Rubix Cube
Date: 7 May 1999 16:31:24
Message: <37333f8c.0@news.povray.org>
Somewhere on the web I recently visited a site that has the solution for
the Rubix. The author used Bryce to create the required images for his
tutorial. Here in the U.S., Toys R'Us sells the cube with a solution manual.
  Sorry, I don't have the price handy. :)

GrimDude
vos### [at] arkansasnet


Post a reply to this message

From: Steve
Subject: Re: Rubix Cube
Date: 7 May 1999 19:18:10
Message: <37333E4E.D78DA6A5@ndirect.co.uk>
I can still do it, though in about 2 min 30.  

The magic word is Singmaster, one of his collegues can do the
cube from any possible situation in about 17 moves, just like
that MIT computer.

Cheers
Steve

GrimDude wrote:
> 
> Yup! Got two of the things here. :)
> 
> I still average between 30 and 45 seconds to cure it, regardless of how
> confused it is.
> 
> GrimDude
> vos### [at] arkansasnet


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.