Die Primitiven

Die Primitiven sind die allgemeinen Grundformen, aus denen die Szenen zusammengesetzt werden müssen:


/* ............. */
sphere {<-5, 0, 0>, 1 texture {text1}}

cylinder {<0, 0, 0>, <0, 3, 0>, 0.6 texture {text2}}

cone {<1, 1, 0>, 0.4, <2, 4, 0>, 0.6 texture {text4}}

box {<3,  2, -2>, <4, 4, 4> texture {text3}}

torus {3, 0.4 texture {text4}}

plane {<0, 1, 0>, -2 texture {text5}}

Bei der Beschreibung des Quaders (box) werden die Endpunkte der Raumdiagonalen angegeben:



/*..... */

#declare L = 2
#declare H = 1
#declare B = 1

box {<-L, -H, -B>, 
	texture {
	   pigment {
		color rgbf <1, 1, 0, 0.7>
	   }
	   finish {
		phong 0.9
	   }
	}
}

cylinder {<-L, -H, -B>, <L, H, B>, 0.05
	  texture {
		pigment {
			color rgb <0, 1, 1>
		}
		finish {
			phong 0.9
		}
	}
}

Bei der Beschreibung der Ebene (plane) wird die Flächennormale und ihre Verschiebung von Koordinatenursprung angegeben:


plane {<0, 1, 0>, -1
	texture {
		pigment {
			color rgb <0, 0, 0.6>
		}
		finish {
			ambient 0.4
		}
	}
}