Caveats and Conclusions

text only
 
progress indicator progress indicator progress indicator progress indicator

Surfaces of Revolution

Another basic type of surface is a surface of revolution. The idea here is that you take one profile shape and rotate it around some axis of revolution. In manufacturing, this is the job of a lathe . A lathe is a machine that spins a piece of material and uses a cutting tool to cut the shape of the object as it spins. In most cases, the object is symmetric about the axis of revolution by virtue of the fact that the cutting tool cuts equally along the entire circumference as the object spins . Examples of such products are chair legs, candlesticks, and baseball bats.

One method for creating such a surface is to take a profile shape and interpolate over a circle using basic trigonometry. This is the most straightforward way, but you can use NURBS to do it in a much more flexible and elegant way. I'll explain the technique and then talk about why it is more flexible.

In Chapter 5, "NURBS," you learned that you could shape a NURBS curve into a circle with the appropriate control polygon and weight values. You can use the same basic approach to roll a NURBS surface into a cylinder. Simply adjust each of the control points to form circles in a given direction. Figure 10.3 shows two examples of cylinders "rolled" in the u direction.


Figure 10.3: NURBS cylinders.

The cylinder is the most basic surface of revolution. In the case of a cylinder, the profile curve is a straight line at a constant distance from the center. Before moving to more interesting shapes , I'd like to point out one more important feature of Figure 10.3. In the previous chapters, the control points were located such that the uv parametric plane was the same as the xz plane. This might have contributed to the false impression that the two planes were related . This is not the case. The two cylinders in Figure 10.3 are both exactly the same in regard to u and v. The only difference is that the layout of the control points changes the axis of the cylinder. To put it a different way, the control points determine the relationship between the uv parametric space and the visual xyz space.

If you think of each row of control points in the u direction as a distinct control polygon, you can see that all points on the surface of the cylinder are equidistant from the center axis because all of the individual control polygons form circles of equal radii. You can create more interesting shapes by adjusting the radii of each of these circles. The order and knot vector of the surface in the v direction will determine how these circles are interpolated over the length of the axis. Figure 10.4 shows one example of a more interesting shape.


Figure 10.4: A NURBS surface of revolution.

One could argue that this shape could have been created much more simply. You could have created the profile shape and rotated the shape about some axis. That's true, but remember that these shapes are very useful as starting points. The NURBS representation gives you far more flexibility to make the shape more interesting.

For instance, you might model a rocket by starting with a cylinder. The result would be a symmetric shape similar to the one shown in Figure 10.3. You might then decide to pull individual control points to create fins for the rocket. The resulting shape would be similar to the one shown in Figure 10.5.


Figure 10.5: A "rocket" with fins.

At this point, the shape is no longer technically a surface of revolution because it is no longer symmetric about its axis. This is not very important. What is important is that you were able to start with a basic, well- understood shape and quickly build interesting features onto it. You could not easily produce the shape in Figure 10.5 if you had started by simply rotating a profile curve around the axis.

Before moving on, I'd like to point out that a sphere can be modeled as a special case of a surface of revolution. In the case of a sphere, the profile curve is a semicircle. When the semicircle is rotated around a circular axis, the result is a sphere. Modeling a sphere with polygons is relatively straightforward, but the NURBS method would be better if you wanted to shape the model further. Once you start with a sphere, it would be very easy to model a teardrop or similar shapes. You could also animate the control points to easily "unwrap" the sphere.

progress indicator progress indicator progress indicator progress indicator


Focus on Curves and Surfaces
Focus On Curves and Surfaces (Focus on Game Development)
ISBN: 159200007X
EAN: 2147483647
Year: 2003
Pages: 104
Authors: Kelly Dempski

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net