This is the POV-Ray code for a series of images about two topologically equivalent geometric objects related to the small and the great stellated dodecahedron.
simple_small.pov
|
simple_great.pov
|
As the objects are topologically the same, the two ball-and-stick models shown above have essentially the same code.
The coordinates come from
coordinates.inc
,
and the scene is then described in
simple.inc
.
What makes the difference between the two images are only the variables
IScale
and DScale
, determining the size of the icosahedron and dodecahedron.
(The factors to scale the cores,
closely related to the golden ratio,
have been calculated in
calculate_corefactors
.)
The vertex numbers used in this project are those of this icosahedron and this dodecahedron.
csg_small.pov
|
csg_great.pov
|
Also the code for the
CSG
images has been written only once.
Only a small detail required different versions of the red dodecahedron as core of the small figure
(cell1_small.inc
)
and as hull of the great figure
(cell1_great.inc
).
The 12 magenta pentagonal pyramids
(cell2.inc
),
the 30 blue tetrahedra
(cell3.inc
),
the 20 green tetrahedra
(cell4.inc
)
and the yellow icosahedron
(cell5.inc
)
are used for both figures, and are adapted with opposite values for Offset
, Thickness
, Inv1
and Inv2
.
Offset
is half the distance between two cells, and Thickness
is the thickness of the cell walls.
The other two values are used to determine on which side the
half-spaces ("planes") have their volume,
using the inverse
keyword.
The openings in the faces are achieved using intersections with edge cylinders.
To give the impression of solid cells their Radius
has simply been increased to 100.
To cut through solid cells it was necessary to modify the cell files, leaving only the SolidCell
.
The three macros used are found in
pov_macros
.
RotMatFromVectorAndAngle
is described
in a different project.