Rotationen
camera {
location <0,2,-7>
look_at <0,1,0>
}
light_source {
<10,10,-10>
color rgb <2,2,1>
}
light_source {
<-10,20,-5>
color rgb <2,2,0.3>
}
plane {
<0,1,0>, -1
texture {
pigment {
color rgb <0.5,0.4,0.1>
}
finish {
reflection 2
}
}
}
#declare stab = cylinder {
<-1,0,0>,<-1,3,0>,0.2
texture {
pigment {
color rgb <1,0.2,0.2>
}
}
}
object {stab}
object {stab rotate <10,0,-30>}
object {stab rotate <20,0,-60>}
object {stab rotate <30,0,-90>}
object {stab rotate <40,0,-120>}
object {stab rotate <50,0,-150>}
Zurück
Mehrere Ebenen, Translation und Rotation kombienieren ...
camera {
location <0,2,-7>
look_at <0,1,0>
}
light_source {
<10,10,-10>
color rgb <2,2,1.9>
}
light_source {
<-10,2,-5>
color rgb <2,2,0.3>
}
plane {
<0,1,0>, -1
texture {
pigment {
color rgb <0.5,0.5,0>
}
finish {
reflection 0.2
}
}
}
plane {
<0.7,0.2,1>,10
texture {
pigment {
color rgb <0.4,0.1,0.1>
}
finish {
reflection 0.6
}
}
}
#declare wurfel = box {
<-1,-1,-1>,<1,1,1>
texture {
pigment {
color rgb <0.2,0.4,1>
}
finish {
phong 0.9
}
}
}
object {wurfel translate <0,3,-0.2>
rotate <10,10,40>}
Beachte die Verwendung zweier Ebenen und zweier Lichtquellen! Der Würfel wird zunächst parallel zu den Koordinatenebenen definiert und anschließend verschoben und gedreht. Er wird von zwei Lichtquellen beleuchtet und auf zwei Ebenen projiziert...
difference...
Objekte können miteinander verbunden oder "subtrahiert" werden...
camera {
location <0,2,-7>
look_at <0,1,0>
}
light_source {
<10,10,-10>
color rgb <2,2,1>
}
light_source {
<-10,10,-10>
color rgb <1,1,0>
}
#declare kugel1 = sphere {
<-1,3,-0.5>, 1
texture {
pigment {
color rgb <1,0,0>
}
}
}
#declare kugel2 = sphere {
<-1, 2.4, -0.8>, 0.7
texture {
pigment {
color rgb <0.4,0.5,0.1>
}
}
}
plane {
<0,1,0>, -3
texture {
pigment {
color rgb <0.1, 0.2, 0.05>
}
}
}
light_source {
<-1,-2,-3>
color rgb <3,3,3>
}
difference { object{kugel1} object{kugel2}}
- difference liefert die "Subtraktion" zweier Objekte
- union liefert die Vereinigungsmenge zweier Objekte
- intersection liefert die Durchschnittsmenge zweier Objekte
- ...
Zurück