media @ VU
vrml-math-NURBSdemo4.vr
vrml-math-NURBSdemo4.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
NavigationInfo{ type "EXAMINE" }
Background{ skyColor 1 1 1}
PROTO NURBSdemo[
field MFVec3f cPoint [-1 -1 0,1 -1 0, -1 1 0,0 0 1.41]
field SFInt32 uDim 2
field SFInt32 vDim 2 ]{
Transform{ scale 2 2 2 children[
Shape{ appearance Appearance{ material Material{ diffuseColor 1 1 1 transparency .2}}
geometry NurbsSurface{
uDimension IS uDim vDimension IS vDim
controlPoint IS cPoint
uOrder 4 vOrder 4
uKnot[0 0 0 0 1 1 1 1] vKnot[0 0 0 0 1 1 1 1]
# uTessellation 32 vTessellation 32
solid FALSE }}
Shape{ appearance Appearance{ material Material{ emissiveColor 0 0 1} }
geometry DEF grid IndexedLineSet{ coord Coordinate{ point IS cPoint} } }
]}
DEF SCR Script{
field SFInt32 uDim IS uDim
field SFInt32 vDim IS vDim
field SFNode grid USE grid
directOutput TRUE
url ["javascript:
function initialize() {
c = new MFInt32();
t= t1 =0;
for (i= 0; i< vDim; i++){
for (j= 0; j< uDim; j++) c[t++] = t1++;
c[t++] = -1;}
for (i= 0; i< uDim; i++){
t1= i;
for (j= 0; j< vDim; j++){
c[t++] = t1; t1 += uDim;}
c[t++] = -1;}
grid.set_coordIndex = c;
}
"]}
}
NURBSdemo{ uDim 4 vDim 4
cPoint[
-1,0,-1, -.5,.5,-1, .5,.5,-1, 1,0,-1,
-1,.5,-.5, -.5,1,-.5, .5,1,-.5, 1,.5,-.5,
-1,.5,.5, -.5,1,.5, .5,1,.5, 1,.5,.5,
-1,0,1, -.5,.5,1, .5,.5,1, 1,0,1]
}
(C) A. Eliëns
2/9/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.