13.07.2015 Views

NURBS in VRML

NURBS in VRML

NURBS in VRML

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2. PROPOSED NODESNurbsSurfaceNurbsSurface {field SFInt32 uDimension 0 # [0, ∞)field SFInt32 vDimension 0 # [0, ∞)field MFFloat uKnot [] # (-∞,∞)field MFFloat vKnot [] # (-∞,∞)field SFInt32 uOrder 3 # [2, ∞)field SFInt32 vOrder 3 # [2, ∞)exposedField MFVec3f controlPo<strong>in</strong>t [] # (-∞,∞)exposedField MFFloat weight [] # (0, ∞)exposedField SFInt32 uTessellation 0 # (-∞,∞)exposedField SFInt32 vTessellation 0 # (-∞,∞)exposedField SFNode texCoord []field SFBool ccw TRUEfield SFBool solid TRUE}uDimension and vDimension def<strong>in</strong>e the number of control po<strong>in</strong>ts<strong>in</strong> the u and v dimensions.uOrder and vOrder def<strong>in</strong>e the order of surface. From amathematical po<strong>in</strong>t of view, the surface is def<strong>in</strong>ed by polynomialsof the degree order-1. The order of the curves uOrder and vOrdermust be greater than or equal to 2. An implementation may limituOrder and vOrder to a certa<strong>in</strong> number. The most common ordersare 3 (quadratic polynomial) and 4 (cubic polynomial), which aresufficient to achieve the desired curvature <strong>in</strong> most cases.The number of control po<strong>in</strong>ts must be at least equal to the order ofthe curve. The order def<strong>in</strong>es the number of adjacent control po<strong>in</strong>tsthat <strong>in</strong>fluence a given control po<strong>in</strong>t.controlPo<strong>in</strong>t def<strong>in</strong>es a set of control po<strong>in</strong>ts of dimensionuDimension * vDimension. This set of po<strong>in</strong>ts def<strong>in</strong>es a meshsimilar to the grid of an ElevationGrid, whereas the po<strong>in</strong>ts do nothave a uniform spac<strong>in</strong>g. Depend<strong>in</strong>g on the weight values and theorder, this hull is approximated by the result<strong>in</strong>g surface. Thenumber of uDimension po<strong>in</strong>ts def<strong>in</strong>e a polyl<strong>in</strong>e <strong>in</strong> u-directionfollowed by further u-polyl<strong>in</strong>es with the v-parameter <strong>in</strong> ascend<strong>in</strong>gorder. The number of control po<strong>in</strong>ts must be equal to or greaterthan the order. A closed B-Spl<strong>in</strong>e surface can be specified byrepeat<strong>in</strong>g the limit<strong>in</strong>g control po<strong>in</strong>ts and by specify<strong>in</strong>g a periodicknot vectorThe control vertex correspond<strong>in</strong>g to the control po<strong>in</strong>t P[i, j] on thecontrol grid is:P[i,j].x = controlPo<strong>in</strong>ts[i + ( j × uDimension)].xP[i,j].y = controlPo<strong>in</strong>ts[i + ( j × uDimension)].yP[i,j].z = controlPo<strong>in</strong>ts[i + ( j × uDimension)].zP[i,j].w = weight[ i + (j × uDimension)]where 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!