CSG means Constructive Solid Geometry. Quoting from POV-Ray documentation
(section 4.5.1):
"POV-Ray allows us to construct complex solids by combining primitive shapes in four different ways. These are UNION, where two or more shapes are added together. INTERSECTION, where two or more shapes are combined to make a new shape that consists of the area common to both shapes. DIFFERENCE, where subsequent shapes are subtracted from the first shape. And last not least MERGE, which is like a union where the surfaces inside the union are removed (useful in transparent CSG objects)."When I thought of using DIFFERENCE operator, an image I saw in D.R.Hofstadter's book "Gödel, Escher, Bach" came to my mind. |
|
When you use DIFFERENCE, you should avoid coincidence between the surfaces of
the object you're digging and the surfaces of the removed parts.
Otherwise, the rays will be incorrectly traced and, usually, they won't penetrate
the cavities.
|
Using image maps, you can wrap your shapes in wonderful packing-papers.
I took the maps of Earth and Jupiter from
The RayTracing Hub of the Apocalypse. Experienced astronomers will forgive wrong proportions... The syntax of image maps statements is very simple. The following is the one I
used for Jupiter, without scaling and rotation options: sphere { 0,1 |
MAP_TYPE 1 gives a spherical mapping.
It assumes that the object is a sphere of any size sitting at the origin.
Other possible maps could be: planar, cylindrical, toroidal.
Text Objects allow you to create 3D text in a twinkling of an eye. The syntax is very simple (POV-Ray doc. 4.4.10) : text { ttf "FONT FILE" "TEXT STRING" 1 , 0}FONT FILE is the TTF (True Type Font) file that POV-Ray opens to extract the information on how to generate the TEXT STRING wanted. You should place the TTF file in the "/include" sub-directory of POV-Ray 's tree. The first numeric parameter is THICKNESS: it tells POV-Ray how thick letters will be. The second number is OFFSET: it introduces some spacing between letters. The generated text object is placed so that the lower left front corner of the first letter is at the origin. For this scene I also used a COLOR MAP of grey shades to give the object a blackened surface: you know, Dark Star explodes in the end... |
|