|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I've created the first three platonic solids as "solid" objects
in POVRay so I do CSG operations on them. Before I give myself a
headache doing the icosahedron and dodecahedron I though I would
ask if someome has already done it.....and would care to share them.
// Tetrahedron
#declare THETA = degrees(atan(2/sqrt(2)));
#declare TET1 = intersection {
plane { <0,0,1>, 0 rotate <0, THETA,0> translate < 1,0,0> }
plane { <0,0,1>, 0 rotate <0,-THETA,0> translate <-1,0,0> }
plane { <0,0,1>, 0 rotate <0, THETA,0> rotate <0,0,90> translate <0, 1,0> scale
<1,1,-1> }
plane { <0,0,1>, 0 rotate <0,-THETA,0> rotate <0,0,90> translate <0,-1,0> scale
<1,1,-1> }
scale DIST/2
}
// Octahedron, made of an upper and lower half
#declare THETA = degrees(atan(sqrt(2)));
#declare DIST = 1 / (2 * sqrt(2));
#declare OCT0 = intersection {
plane { <0,0,1>, 0 rotate <0, THETA,0> translate < DIST,0,0> }
plane { <0,0,1>, 0 rotate <0,-THETA,0> translate <-DIST,0,0> }
plane { <0,0,1>, 0 rotate < THETA,0,0> translate <0,-DIST,0> }
plane { <0,0,1>, 0 rotate <-THETA,0,0> translate <0, DIST,0> }
plane { <0,0,-1>, 0 }
}
#declare OCT1 = union {
object { OCT0 }
object { OCT0 scale <1,1,-1> translate <0,0,0.001> }
scale 0.5/DIST
}
We already have "box" for the hexahedron.
--
Paul Bourke
pdb(NOSPAM)swin.edu.au
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I've created the first three platonic solids as "solid" objects
> in POVRay so I do CSG operations on them. Before I give myself a
> headache doing the icosahedron and dodecahedron I though I would
> ask if someome has already done it.....and would care to share them.
Woops, they seem to be defined in "shapes2.inc"
--
Paul Bourke
pdb(NOSPAM)swin.edu.au
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Paul Bourke wrote:
> I've created the first three platonic solids as "solid" objects
> in POVRay so I do CSG operations on them. Before I give myself a
> headache doing the icosahedron and dodecahedron I though I would
> ask if someome has already done it.....and would care to share them.
// why not
intersection {
#local sX=-1;#while(sX<2)
#local sY=-1;#while(sY<2)
#local sZ=-1;#while(sZ<2)
plane { <sX,sY,sZ>,sqrt(1/3) }
bounded_by { box { -1,1 } }
}
for the octohedron?
For the other two:
#local sA=sqrt(.3125)+.25;
#local sB=.5;
#declare Dodecahedron= intersection {
plane { < sA, sB,0>,.5 }
plane { <0, sA, sB>,.5 }
plane { < sB,0, sA>,.5 }
plane { <-sA, sB,0>,.5 }
plane { <0,-sA, sB>,.5 }
plane { < sB,0,-sA>,.5 }
plane { < sA,-sB,0>,.5 }
plane { <0, sA,-sB>,.5 }
plane { <-sB,0, sA>,.5 }
plane { <-sA,-sB,0>,.5 }
plane { <0,-sA,-sB>,.5 }
plane { <-sB,0,-sA>,.5 }
}
#declare Icosahedron = intersection {
plane { < sA+sB, sB,0>,.5 }
plane { <0, sA+sB, sB>,.5 }
plane { < sB,0, sA+sB>,.5 }
plane { <-sA-sB, sB,0>,.5 }
plane { <0,-sA-sB, sB>,.5 }
plane { < sB,0,-sA-sB>,.5 }
plane { < sA+sB,-sB,0>,.5 }
plane { <0, sA+sB,-sB>,.5 }
plane { <-sB,0, sA+sB>,.5 }
plane { <-sA-sB,-sB,0>,.5 }
plane { <0,-sA-sB,-sB>,.5 }
plane { <-sB,0,-sA-sB>,.5 }
plane { <-sA,-sA,-sA>,.5 }
plane { < sA,-sA,-sA>,.5 }
plane { <-sA, sA,-sA>,.5 }
plane { < sA, sA,-sA>,.5 }
plane { <-sA,-sA, sA>,.5 }
plane { < sA,-sA, sA>,.5 }
plane { <-sA, sA, sA>,.5 }
plane { < sA, sA, sA>,.5 }
}
Hope this helps,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Paul Bourke who wrote:
>> I've created the first three platonic solids as "solid" objects
>> in POVRay so I do CSG operations on them. Before I give myself a
>> headache doing the icosahedron and dodecahedron I though I would
>> ask if someome has already done it.....and would care to share them.
>
>Woops, they seem to be defined in "shapes2.inc"
The "bounded_by" that's in "shapes2.inc" is a good idea. Without it,
objects that are created from the intersections of infinite planes are
themselves considered to be infinite.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If you want to see what prompted this original email, it was to create the
inverse of various platonic solid fractals. For picures see
http://astronomy.swin.edu.au/~pbourke/fractals/platonic/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
web.43a0f942852787c34ef218200@news.povray.org...
> If you want to see what prompted this original email, it was to
> create the
> inverse of various platonic solid fractals. For picures see
> http://astronomy.swin.edu.au/~pbourke/fractals/platonic/
>
on this french site http://louisbel.free.fr, go to "scenes" then
you can see in a slide slow, 80 of them.
klp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|