| OCR Text |
Show 28 surface is subdivided only in the direction that is curved . Otherwise the parameter the surface is split along alternates directions at each level of subdivision. If a surface is flat enough in both directions, two triangles are formed from the four corner points, and they are converted to Euclidean space by dividing out the rational (homogeneous) coordinate. Figure 3.2 shows the polygonal representation of a dart generated by the subdivision procedure. An important detail in surface subdivision is "crack prevention." If one surface is subdivided more than another, cracks can form in the final polygon mesh if it is derived directly from the control points. This is prevented by checking to see if a surface is adjacent to a straight edge (one meeting the flatness criterion) before subdividing it. If it is, the rrlidpoint of the straight edge is used instead of the control point, preventing cracks from appearing (see Figure 3.3.) In the Lane and Carpenter algorithm, the flatness criterion compares the flatness of the surface to the size of one raster unit in screen space. In the case of ray tracing, however, the subdivision resolution must be deterrrlined in object space, since no perspective transformation is done on the objects. In order to find the flatness criterion, the projection from object space to screen space must be done explicitly. Because of the convex hull property of B-splines, a reasonable approximation is to first find a bounding box for the surface by finding the minimum and maximum values of its control points. The center point of this bounding box is found, and the distance from it to the eyepoint is calculated. The object space resolution then becomes: subdiv_res = (2 * viewsize * ( -dist + viewdist)/( viewdist * number of _pixels) where dist is the distance from the center of the surface to the eyepoint, viewsize is the "radius" of the image plane, viewdist is the distance from the origin of the initial rays to the viewing plane, and number_of_pixels is the size of the final image |