Primitives in POV-Ray
Introduction
In the last section, you saw a simple sphere. This was pretty cool,
but in order to generate more interesting images, you'd probably like
to see some other primitive objects as well. POV-Ray defines a number
of primitive objects. They are all pretty powerful, and not terribly
difficult to learn.
The sphere
| parameter |
type |
description |
| Center |
vector |
Where the center of the sphere is located |
| Radius |
float |
The radius of the sphere |
//sphere.pov
//Andy Harris
#include "colors.inc"
light_source {
<0, 3, -15>
color White
} // end light source
camera {
location <0, 1, -3>
look_at <0, 0, 0>
} // end camera
sphere {
<0, 0, 0>, 1
pigment { color White }
} // end sphere
The cylinder
| parameter |
type |
description |
| cap_point |
vector |
center of one end of cylinder |
| base_point |
vector |
center of other end of cylinder |
| radius |
float |
radius of cylinder |
//cylinder.pov
//Andy Harris
#include "colors.inc"
light_source {
<0, 3, -15>
color White
} // end light source
camera {
location <0, 1, -3>
look_at <0, 0, 0>
} // end camera
cylinder {
<0, 0, 0>
<0, 1, 0>, .5 pigment { color White }
} // end sphere
The Cone
| parameter |
type |
description |
| base_point |
vector |
center of base |
| base_radius |
float |
radius of base |
| cap_point |
vector |
center of point |
| cap_radius |
float |
radius of point (usually zero) |
//cone.pov
//Andy Harris
#include "colors.inc"
light_source {
<0, 3, -15>
color White
} // end light source
camera {
location <0, 1, -3>
look_at <0, 0, 0>
} // end camera
cone {
<0, 0, 0>, 0.5
<0, 1, 0>, 0
pigment { color White }
} // end sphere
The Box
| parameter |
type |
description |
| corner_1 |
vector |
one corner of the box |
| corner_2 |
vector |
diagonally opposite corner of the box |
//box.pov
//Andy Harris
#include "colors.inc"
light_source {
<0, 3, -15>
color White
} // end light source
camera {
location <0, 1, -3>
look_at <0, 0, 0>
} // end camera
box {
<-.5 0 -.5>
<.5, .5, .5>
pigment { color White }
} // end sphere
The Plane
| parameter |
type |
description |
| normal |
vector |
a line from the origin to this point will be perpendicular to
the plane |
| distance |
float |
distance along the vector from the origin to the plane |
//plane.pov
//Andy Harris
#include "colors.inc"
light_source {
<0, 3, -15>
color White
} // end light source
camera {
location <0, 1, -3>
look_at <0, 0, 0>
} // end camera
plane {
<0 1 0>,
-1
pigment { color White }
} // end sphere