****************************************** * Extensions of the Neutral File Format * * * * April 16, 1993 * ****************************************** Positional Light ================ Description: "l" X Y Z I R G B Format: l %g %g %g %g %g %g %g A light is now defined by it's XYZ position, intensity and color. Intensity is a value between 0 and 1 and color is defined as RGB with values between 0 and 1 like background color. Fill color and shading parameters ================================= Description: "f" red green blue Kd Ks Shine T index_of_refraction Ka Format: f %g %g %g %g %g %g %g %g %g A ambient component Ka was added to the original description of fill color and shading parameters. Ka should be between 0 and 0.3, the default value is 0.2. Bezier patch ============ Description: "pb" u_degree v_degree x00 y00 z00 x10 y10 z10 .. xmn ymn zmn // m==u_degree; m==v_degree Format: pb %d %d %g %g %g .. %g %g %g u_dgree and v_degree are the degrees of the Bezier patch in direction of parameters u and v. The description of the degrees is followed by the coordinates of the Bezier points. A Bezier patch is described by (u_degree+1)*(v_degree+1) points. The Bezier points are listed in columnwise order with u as line index and v as column index. NURBS ===== Description: "pn" u_degree v_degree u_count v_count u_points v_points u1 u2 ... u_u_points v1 v2 ... v_v_points x1 y1 z1 w1 .. xr vr wr zr // r = u_points * v_points [description of trimming curves] "pn_end" Format: pn %d %d %d %d %d %d %g %g .. %g %g %g .. %g %g %g %g %g .. %g %g &g &g [description of trimming curves] pn_end In the first line of a description of a non-uniform rational B-Spline patch the degree, the dimension of knot vectors and the number of control points in direction of parameter u and v are listed. This is followed by the listing of knot vectors, first in direction of u, then in direction of v. After that the control points (deBoor points) of the patch are listed. The deBoor points are described in homogeneous coordinates with the weight w as it's fourth component. The points have to be listed in linewise order with u as line index and v as column index. There is another kind of NURBS: "nonrational" NURBS. These have the same description as listed before, only with a new descriptor: "pnn" and without the weights "w..." in the control points. It is possible to list any number of trimming curves for a NURBS patch immediately after the description of the patch. Description of a trimming curve: t_ord t_count t_points t1 t2 .. t_t_count x1 y1 z1 w1 .. xr yr zr wr // r=t_points Format: %d %d %d %g %g .. %g %g %g %g %g .. %g %g %g %g t_ord is the order of the trimming curve, t_count is the dimension of the knot vector and t_points is the number of control points. The control points are listed after the description of the knot vector. The whole description of a NURBS patch including trimming curves has to be completed by the string "pn_end".