|
 |
Duncan Adamson wrote:
> Good plan, at present they are simply randomlly rotated (I didn't know what to do
> with them. Will look at your macro to work out the maths.
Are you using my macro?
>
> Thanks for the comment. Will update latest version soon.
As I said "If you are using my include file I already have it figured out.", but my
include file isn't that much help at figuring it out. Since I have it figured out
already I might as well post it.
// source of scene rendered below
#include "colors.inc"
#include "polyhedra.inc"
#include "finish.inc"
#declare Dodecahedron_dihedral = Angle_between_vectors(<-Golden,1,0>,<Golden,1,0>)
#declare RotateToFace = ((180 - Dodecahedron_dihedral)/2);
#declare Inscribe_radius = vlength
((DodecahedronFaceLength*Icosahedron1)-(Golden*x));
#declare Dodecahedron_On_Face = object {Dodecahedron_faces rotate RotateToFace*z
translate DodecahedronFaceLength*y}
#declare Spout = cylinder {0,vnormalize(Icosahedron9)*3,.3 rotate RotateToFace*z
translate DodecahedronFaceLength*y texture{pigment {Blue} finish {Dull}}}
#declare Pedestal = union {
union{
object{Dodecahedron_On_Face translate 4*y}
cylinder{0,<0,4,0>,Inscribe_radius}
pigment {Red} finish{Dull}}
object {Spout translate 4*y}}
union {
object {Pedestal translate 6*x}
object {Pedestal translate 6*x rotate 120*y}
object {Pedestal translate 6*x rotate -120*y}
}
plane {y,0 pigment{Green} finish {Dull}}
light_source{<12,20,-30> rgb 2}
camera {location <2,11,-15> look_at 0}
//#fopen Calc "c:\data\data.txt" write
//#write (Calc, "RotateToFace = ",RotateToFace,"\n","DodecahedronFaceLength =
",DodecahedronFaceLength)
//#fclose Calc
// Contents of data.txt created with this file
/*
RotateToFace = 31.7175
DodecahedronFaceLength = 1.37638
*/
--
Dan Johnson
http://www.geocities.com/zapob
Post a reply to this message
Attachments:
Download 'dodecahedron.gif' (26 KB)
Preview of image 'dodecahedron.gif'

|
 |