home *** CD-ROM | disk | FTP | other *** search
- The plane primitive is a fast, efficient way to define an infinite flat
- surface. The plane is specified as follows:
- plane { <NORMAL>, DISTANCE }
-
- The <NORMAL> vector defines the surface normal of the plane. A surface
- normal is a vector which points up from the surface at a 90 degree angle.
- This is followed by a float value that gives the distance along the normal
- that the plane is from the origin. For example:
- plane { <0, 1, 0>, 4 }
-
- This is a plane where 'straight up' is defined in the positive y direc-
- tion. The plane is 4 units in that direction away from the origin. Because
- most planes are defined with surface normals in the direction of an axis,
- you will often see planes defined using the 'x', 'y', or 'z' built-in vector
- identifiers. The example above could be specified as:
- plane { y, 4 }
-
- The plane extends infinitely in the x and z directions. It effectively
- divides the world into two pieces. By definition the normal vector points
- to the outside of the plane while any points away from the vector are defi-
- ned as inside. This inside/outside distinction is only important when using
- planes in CSG.
-
- As with the other shapes, planes can be translated, rotated, and scaled.
- Because they are infinite they do not respond to automatic bounding. Plane
- can be used freely in CSG because it has a clear defined 'inside'.
-
- A plane is called a 'polynomial' shape because it is defined by a first
- order polynomial equation. Given a plane:
- plane { <A, B, C>, D }
- it can be represented by the formula:
- A*x + B*y + C*z = D
-
- Therefore our example 'plane {y,4}' is actually the polynomial equation
- 'y = 4'. You can think of this as a set of all x,y,z points where all have
- y values equal to 4, regardless of the x or z values.
-
- This equation is a 'first order' polynomial because each term contains
- only single powers of x, y or z. A second order equation has terms like
- x^2, y^2, z^2, xy, xz and yz. Another name for a 2nd order equation is a
- quadric equation. Third order polys are called cubics. A 4th order equa-
- tion is a quartic. Such shapes are described in the sections below.
-