So far, we've just used the sphere shape. There are many other types of
shapes that can be rendered by POV-Ray. First let's make some room in the
image by changing the sphere from a radius of 2 to a radius of 1 like this:
sphere {
<0, 1, 2>, 1
texture { ... and so on.
plane {
<0, 1, 0>, 0
pigment {
checker
color Red
color Blue
}
}
See the result.
plane {
y,0
pigment {... etc.
Note that you do not use angle brackets around vector identifiers.
Looking at the floor, you'll notice that the ball casts a shadow on the
floor. Shadows are calculated very accurately by the ray tracer and creates
precise, sharp shadows. In the real world, penumbral or "soft" shadows are
often seen. Later you'll learn how to use extended light sources to soften
the shadows.
box {
<-1,0 ,-1>, // Near lower left corner
< 1,0.5, 3> // Far upper right corner
pigment {
DMFWood4 // Pre-defined from textures.inc
scale 4 // Scale by the same amount in all
// directions
}
rotate y*20 // Equivalent to "rotate <0,20,0>"
}
In this example you can see that a box is defined by specifying the 3D
coordinates of opposite corners. The first vector must be the minimum
x,y,z coordinates and the 2nd vector must be the maximum x,y,z values. Box
objects can only be defined parallel to the axes. You can later rotate
them to any angle. Note that you can perform simple math on values and
vectors. In the rotate parameter we multiplied the vector identifier "y"
by 20. This is the same as "<0,1,0>*20" or "<0,20,0>".
cone {
<0,1,0>,0.3 // Center and radius of one end
<1,2,3>,1.0 // Center and radius of other end
pigment {DMFWood4 scale 4 }
finish {Shiny}
}
Click!
cone {
<0,1,0>,0.3 // Center and radius of one end
<1,2,3>,1.0 // Center and radius of other end
open // Removes end caps
pigment {DMFWood4 scale 4 }
finish {Shiny}
}
Click!
cylinder {
<0,1,0>, // Center of one end
<1,2,3>, // Center of other end
0.5 // Radius
open // Remove end caps
pigment {DMFWood4 scale 4 }
finish {Shiny}
}
Click!
object {
UnitBox
pigment {DMFWood4 scale 4 }
finish {Shiny}
scale 0.75
rotate <-20,25,0>
translate y
}
Click!Last modified: Tue Oct 8 12:30:24 1996