![]() |
| jit.gl.nurbs | Generate NURBS surface |
A control matrix may specify the control points. The order of the curve may be specified for both the x and y axes (which are sometimes referred to as the u and v surface axes). The order of the curve must be less than the number of control points across the associated dimension. The default order is 3 (i.e., cubic).
At present, the knots sequence is automatically generated based a sum equal to the curve + number of control points. Control points may be non uniformly weighted if the control matrix has 4 planes(x, y, z, w) where w is the weight value. By default, the control matrix is a random 4x4 matrix of uniformly weighted points.
The jit.gl.nurbs object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it. This value may also be set via the OB3D drawto attribute.
| GL Group |
| Attributes: |
| Name | Type | Description |
| closed | int list[2] | The closed flag for each axis inf the form x y (default = 0 0). If closed about an axis, the nurbs surface will knot to smoothly close the surface across that axis. |
| ctlshow | int | Control point rendering flag (default = 0) When the flag is set, the control points are rendered. |
| dim | int list[2] | The dimensions of the grid (default = 20 20) |
| displaylist | int | Cache in displaylist flag (default = 0) This feature may be used to speed up rendering time by creating and storing a list of gl drawing commands on the graphics card. This will have no effect if matrixoutput turned on. |
| order | int list[2] | The interpolation order in the form x y (default = 3 3). The minimum interpolation order is 1 1. The maximum order is set by the values (control; max = control matrix width-1 height-1) |
| Messages: |
| ctlmatrix [matrix-name (symbol)] |
| Copies the named matrix to the control point matrix. Matrices must have a planecount of 3 or 4, and should be type float32 or float64 |
| rand |
| Generates a random set of control points. |
| Example: |
