Online since 2002. Over 3300 puzzles, 2600 worldwide members, and 270,000 messages.

TwistyPuzzles.com Forum

It is currently Tue Jul 22, 2014 4:44 pm

All times are UTC - 5 hours



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Fri Aug 24, 2012 9:04 am 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
First of all, I wish to thank Jaap for Jaap's Puzzle Page and the Sphere-Symmetries Applet.

I created a script-file for the Pov-Ray program, which can visualize Jaap's Sphere in other shapes.
Attachment:
JaapsSphereIntoShapes.PNG
JaapsSphereIntoShapes.PNG [ 65.12 KiB | Viewed 3298 times ]

The script can take any configuration of Jaap's Sphere Applet, and show it in other outer shapes.
I decided to use cone-cuts (with the cone-cap (apex) at the origin), because they look equal on the Sphere-Applet and on the other shape's.
Attachment:
sphere-pov.PNG
sphere-pov.PNG [ 16.45 KiB | Viewed 3298 times ]

Further examples (just to illustrate it a bit):
Attachment:
JaapsSphereIntoShapes1.PNG
JaapsSphereIntoShapes1.PNG [ 58 KiB | Viewed 3298 times ]
Attachment:
JaapsSphereIntoShapes2.PNG
JaapsSphereIntoShapes2.PNG [ 54.62 KiB | Viewed 3298 times ]
Attachment:
JaapsSphereIntoShapes5.PNG
JaapsSphereIntoShapes5.PNG [ 66.76 KiB | Viewed 3298 times ]
Attachment:
JaapsSphereIntoShapes4.PNG
JaapsSphereIntoShapes4.PNG [ 85.38 KiB | Viewed 3298 times ]
Attachment:
JaapsSphereIntoShapes.zip [5.9 KiB]
Downloaded 45 times

Thanks also to
-Pov-Ray (especially for the construction and render capabilities wich made it possible)
-Andreas Nortmann who encouraged me to post this

Jaap's Sphere is at http://www.jaapsch.net/puzzles/sphere.htm


Last edited by Stef-n on Wed Nov 20, 2013 9:08 am, edited 21 times in total.

Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Fri Aug 24, 2012 12:08 pm 
Offline
User avatar

Joined: Mon Aug 02, 2004 7:03 am
Location: Koblenz, Germany
Stefan Schwalbe wrote:
-Andreas Nortmann who encouraged me to post this
and which took me no more than two minutes. I do not want to ask about the time you invested.

Great work.


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Fri Aug 24, 2012 1:17 pm 
Offline
User avatar

Joined: Sat Feb 03, 2007 10:03 pm
Location: Mississippi
Long live POV-RAY! Nice work....

_________________
Space for rent


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sun Aug 26, 2012 9:11 am 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
jabeck wrote:
Long live POV-RAY! Nice work....

Yeah, I started loving it when I got my splittings well for the first time. The first successful experiment was, when I splited a cube into two parts in subtracting a thin cuboid from it. The two parts can then be assigned to the cube again and when you do your next splitting, you can split 2 parts into 4 parts and so on. The simple statement is something like:

#declare Cube=difference {object{Cube} object{ThinCuboid}}

And the picture rendering of Pov-Ray is sooo professional :D :mrgreen:

And thanks to everybody that is interested in this thread.

Stefan


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sun Aug 26, 2012 12:03 pm 
Online
User avatar

Joined: Thu Dec 31, 2009 8:54 pm
Location: Bay Area, California
Hi Stefan,

Thanks SOOO much for putting all of the work into this. It's fantastic. I'm very impressed you wrote the URL parameter parser in POV-Ray itself rather than writing an external program to parse and emit POV-Ray code. Your way is very simple and doesn't have any dependencies.

I barely know any POV-Ray but I'm learning here and there thanks to your code and some of Carl's.

If you haven't seen, I changed a few lines of your code to generate the images in this thread: viewtopic.php?f=9&t=24206

I have a few questions.

For each of the solids you've made, you instantiate the object with a "scale" factor. Each object has a different scale. What is this doing? Is it just a fudge to make them all look about the same size or is it needed for something beyond just aesthetics?

For the main camera, why are you looking very close to but not directly at the origin: <0.0, -0.01, 0.0> ?
Is this just to provide a tiny bit of depth instead of looking at the shape straight on?

I determined your long decimal expansion of the dwing constant is actually 2 * (sqrt(2) - 1) but where does this number come from? I haven't figure out where phi = 0.618034 but I assume it's the angle in some triangle where one of the sides of the triangle is of length dwing. I know dwing came from your cube wings code so is dwing just used for your shCW object?

I know it strays a bit away from your purpose of rendering Jaap's spheres but do you plan on extended your code to accept planar-cuts in addition to conical cuts? I can't add support yet because I don't fully understand all of your code.

_________________
Prior to using my real name I posted under the account named bmenrigh.


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sun Aug 26, 2012 2:04 pm 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
Thank you Brandon :)
Your animated ETO is cool.
bmenrigh wrote:
I have a few questions.

For each of the solids you've made, you instantiate the object with a "scale" factor. Each object has a different scale. What is this doing? Is it just a fudge to make them all look about the same size or is it needed for something beyond just aesthetics?
I wanted to equalize the sizes of the different objects.
bmenrigh wrote:
For the main camera, why are you looking very close to but not directly at the origin: <0.0, -0.01, 0.0> ?
Is this just to provide a tiny bit of depth instead of looking at the shape straight on?
The upmost line of pixels on the background of the rendered image was darker and I wanted to avoid this.
bmenrigh wrote:
I determined your long decimal expansion of the dwing constant is actually 2 * (sqrt(2) - 1) but where does this number come from? I haven't figure out where phi = 0.618034 but I assume it's the angle in some triangle where one of the sides of the triangle is of length dwing. I know dwing came from your cube wings code so is dwing just used for your shCW object?
The direction-vector-sets I have all from Jaap's elegant Sphere- sourcecode. Except the cube-wing-set with equal distances, which is the only set that uses dwing, but not phi. phi was to ease the construction of dodecahedron-faces/corners/edges.
dwing is to equalize the distances in the cube-wing-set. Here is the way it came from
Attachment:
regularOctagon.PNG
regularOctagon.PNG [ 1.66 KiB | Viewed 3079 times ]


because c²=2*t²
c=sqrt(2)*t
c and d must be equal
c=d=sqrt(2)*t
so t=d/sqrt(2)
e=2*t + d
e=2*d/sqrt(2) + d
e=(1+2/sqrt(2))*d
because 2/sqrt(2)=sqrt(2),
e=(1+sqrt(2))*d
d=e/(1+sqrt(2))
e was defined 4 by me
dwing had to be the half of d
the number is 0.828427. More precision is not needed.

Your "2 * (sqrt(2) - 1)" is correct (congratulation on finding it). It's used for constructing the cube-wing direction-vector-set, but this is not included in Jaap's Sphere. It was added by me for trying out the cube-wing set, as you know. And I don't know, wether it gives serious puzzles. Here is again the picture of it, that I posted in the gelatinbrain-thread.
Attachment:
dirset.cubewings.PNG
dirset.cubewings.PNG [ 73.2 KiB | Viewed 3079 times ]


Last edited by Stef-n on Wed Nov 20, 2013 10:51 am, edited 11 times in total.

Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sat Sep 08, 2012 10:09 am 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
I tried sketching gelatinbrain-dodecahedra, because I like them and for checking out, how much configuration I need. Here are some examples:
Attachment:
1.01_1zu1.png
1.01_1zu1.png [ 1.14 MiB | Viewed 2877 times ]

"Thanks very much!" to gelatinbrain.


Last edited by Stef-n on Wed Nov 20, 2013 10:21 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sat Sep 08, 2012 8:41 pm 
Offline
User avatar

Joined: Sat Apr 22, 2000 2:51 am
Location: New Ulm, Minnesota, USA
Could you please tell how they all turn Stefan Schwalbe? The reason why I ask is that I don't go on there at all like I use to and that was after my best friend help me put a program on my computer so I could and play with the puzzles. I'm sorry I accidentally deleted it. So if anyone wants to help me with this please send me a PM through twisty puzzles and I'll give you the info. Did I mention I love that website? :cry: :oops:

_________________
Darren & Traiphum's Dual Helicoptrahedron
X-TownCuber wrote:
Are my eyes deceiving me, or is this the coolest puzzle ever?


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sat Sep 08, 2012 9:03 pm 
Offline
User avatar

Joined: Sun Aug 09, 2009 1:46 pm
Location: P.R.China
bmenrigh wrote:
I determined your long decimal expansion of the dwing constant is actually 2 * (sqrt(2) - 1) but where does this number come from? I haven't figure out where phi = 0.618034 but I assume it's the angle in some triangle where one of the sides of the triangle is of length dwing. I know dwing came from your cube wings code so is dwing just used for your shCW object?
The direction-vector-sets I have all from Jaap's Sphere- sourcecode. Except the cube-wing-set with equal distances, which is the only set that uses dwing, but not phi. phi was to easyfy the construction of dodecahedron-faces/corners/edges.
dwing is to equalize the distances in the cube-wing-set. Here is the way it came from
Attachment:
The attachment regularOctagon.PNG is no longer available

c and d must be equal
d=c=sqrt(2)*t
so t=d/sqrt(2)
e=2*t + d
e=2*d/sqrt(2) + d
e=(1+2/sqrt(2))*d
d=e/(1+2/sqrt(2))
e was defined 4 by me
dwing had to be the half of d
the number is 0.828427. More precision is not needed.
Your "2 * (sqrt(2) - 1)" is correct (congratulation on finding it). It's used for constructing the shCW object, and for the cube-wing direction-vector-set, but this is not included in Jaap's Sphere. It was added by me for trying out the cube-wing set, as you know. And I don't know, wether it gives serious puzzles. Here is again the picture of it, that I posted in the gelatinbrain-thread.
Attachment:
The attachment dirset.cubewings.PNG is no longer available

bmenrigh wrote:
I know it strays a bit away from your purpose of rendering Jaap's spheres but do you plan on extended your code to accept planar-cuts in addition to conical cuts? I can't add support yet because I don't fully understand all of your code.
Yes, maybe you can help me, the size relations have to be defined. If you have an idea, maybe we can do a 'joint-venture' :D

Thanks Brandon[/quote]

Great...and WOW, it happens!

Attachment:
cc.jpg
cc.jpg [ 48.75 KiB | Viewed 2824 times ]


Don't mean anything but you are great to add this equalized distance feature into the program. It will actually bring a series of jumbling puzzles.

Thank you Stefan Schwalbe for sharing.


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sat Sep 08, 2012 10:02 pm 
Online
User avatar

Joined: Thu Dec 31, 2009 8:54 pm
Location: Bay Area, California
Leslie Le wrote:
Great...and WOW, it happens!

Attachment:
cc.jpg


Don't mean anything but you are great to add this equalized distance feature into the program. It will actually bring a series of jumbling puzzles.

Thank you Stefan Schwalbe for sharing.

Hi Leslie, I think you should add one level of unbandaging to that.

See: viewtopic.php?p=285908#p285908

_________________
Prior to using my real name I posted under the account named bmenrigh.


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sat Sep 08, 2012 10:26 pm 
Offline
User avatar

Joined: Sun Aug 09, 2009 1:46 pm
Location: P.R.China
bmenrigh wrote:
Leslie Le wrote:
Great...and WOW, it happens!

Attachment:
cc.jpg


Don't mean anything but you are great to add this equalized distance feature into the program. It will actually bring a series of jumbling puzzles.

Thank you Stefan Schwalbe for sharing.

Hi Leslie, I think you should add one level of unbandaging to that.

See: viewtopic.php?p=285908#p285908


WOW again. I think I missed a lot here.

Unbandaging is OK however just the plain cuts are already quite challenging. I agree that there can be many variations when unbandaged and difficulty is unpredictable(like Bermuda series).

All platonic solids are applicable with this idea but manufacturing will be challenging with many axis basis. In my head, I call this procedure 'axis splitting'.


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sun Sep 09, 2012 1:16 pm 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
Darren Grewe wrote:
Could you please tell how they all turn Stefan Schwalbe? The reason why I ask is that I don't go on there at all like I use to and that was after my best friend help me put a program on my computer so I could and play with the puzzles. I'm sorry I accidentally deleted it. So if anyone wants to help me with this please send me a PM through twisty puzzles and I'll give you the info. Did I mention I love that website? :cry: :oops:

Hi Darren Grewe

the 1.1.* puzzles are face-turning dodecahedra
the 1.2.* puzzles are vertex-turning dodecahedra
the 1.4.* puzzles are edge turn
the 1.3.* are mixed face turn and vertex turn
the 1.5.* are mixed face turn and edge turn
the 1.6.1 is mixed vertex and edge turn
the 1.7.1 is mixed face turn, vertex turn and edge turn

If you need help running gelatinbrain on your computer please pm me. I will try to help.


Last edited by Stef-n on Wed Nov 20, 2013 10:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Sun Sep 09, 2012 3:02 pm 
Offline
User avatar

Joined: Thu May 31, 2007 7:13 pm
Location: Bruxelles, Belgium
Stefan Schwalbe wrote:
Here are dodecahedra from gelatinbrain, I could sketch. :D

Thank you, Stefan. :D
You must have spent enormous amount of time and labor for this.

_________________
Virtual Magic Polyhedra
Applet(Online)
Executable Jar Installer
Win32 Executable(Download)
troubleshooting


Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Tue Sep 11, 2012 5:00 am 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
Thank you for the replies, guys! :D

I was specially pleased about your reply, Leslie Le 8-)

@Leslie Le I'm very interested in your project. Can you pm me your progress :)



bmenrigh wrote:
Hi Leslie, I think you should add one level of unbandaging to that.
I would like to see, how it scrambles, someone has to make a proof. I will try it myself asap


@gelatinbrain
gelatinbrain wrote:
Stefan Schwalbe wrote:
Here are dodecahedra from gelatinbrain, I could sketch. :D

Thank you, Stefan. :D
You must have spent enormous amount of time and labor for this.

configuring for a puzzle cost about 4 minutes.
Thanks to you again, your Virtual Magic Polyhedra are great.


Last edited by Stef-n on Wed Nov 20, 2013 10:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Fri Sep 14, 2012 5:03 am 
Offline

Joined: Sun Aug 29, 2010 1:56 pm
I changed the script. Now planar and conical cuts can be mixed, and conical cuts can be defined more general, in freely moving the cone apex on the axle:There are 5 cases for the cone apex:
1. under the origin (negative)
2. on the origin (0)
3. between the origin and the divider (between 0 and 1)
4. on the divider (1), planar cut
5. above the divider (higher than 1)


Last edited by Stef-n on Wed Nov 20, 2013 10:33 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Using Pov Ray to bring Jaap's Sphere into other shapes
PostPosted: Fri Sep 14, 2012 7:04 pm 
Online
User avatar

Joined: Thu Dec 31, 2009 8:54 pm
Location: Bay Area, California
Hey Stefan, very elegant way to handle planar cuts as cones. I love how the curvature can now be varied by changing the cone's vertex.

I'm having a good time playing with the code:
Attachment:
master_fti_fun.png
master_fti_fun.png [ 121.88 KiB | Viewed 2468 times ]


I couldn't figure out how to make the Dreidel Skewb (my avatar) though. I thought the cone vertex would have to be > 1 but that doesn't seem to create the backwards curvature I'm looking for.

_________________
Prior to using my real name I posted under the account named bmenrigh.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Forum powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group