home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Late Night VRML 2.0 with Java CD-ROM
/
code.zip
/
Ch15
/
Refine.wrl
< prev
next >
Wrap
Text File
|
1997-01-23
|
3KB
|
95 lines
#VRML V2.0 utf8
EXTERNPROTO NurbsCurve [ field SFBool debug
field SFInt32 segments
field MFFloat knotSequence
field MFFloat controlPoints ]
"http://www.ocnus.com/NURBS/NurbsCurve.wrl"
Viewpoint {
position 0 0 5
orientation 0 0 1 0
fieldOfView 0.785398
description "NURBS Circle"
}
Shape {
appearance
Appearance {
material
Material { diffuseColor 1 0 0 }
}
geometry
NurbsCurve { # Circle
segments 0
debug FALSE
knotSequence [ 0.00, 0.0, 0.0, 0.25,
0.25, 0.5, 0.5, 0.75,
0.75, 1.0, 1.0, 1.00 ]
controlPoints [ 1 0 0 1,
0.707107 0.707107 0 0.707107,
0 1 0 1,
-0.707107 0.707107 0 0.707107,
-1 0 0 1,
-0.707107 -0.707107 0 0.707107,
0 -1 0 1,
0.707107 -0.707107 0 0.707107,
1 0 0 1, ]
}
}
Shape {
appearance
Appearance {
material
Material { diffuseColor 0 1 0 }
}
geometry
NurbsCurve { # Circle
segments 13
debug FALSE
knotSequence [ 0.00, 0.0, 0.0, 0.25,
0.25, 0.5, 0.5, 0.75,
0.75, 1.0, 1.0, 1.00 ]
controlPoints [ 1 0 0 1,
0.707107 0.707107 0 0.707107,
0 1 0 1,
-0.707107 0.707107 0 0.707107,
-1 0 0 1,
-0.707107 -0.707107 0 0.707107,
0 -1 0 1,
0.707107 -0.707107 0 0.707107,
1 0 0 1, ]
}
}
Shape {
appearance
Appearance {
material
Material { diffuseColor 1 1 0 }
}
geometry
NurbsCurve { # Circle
debug FALSE
segments 200
knotSequence [ 0.00, 0.0, 0.0, 0.25,
0.25, 0.5, 0.5, 0.75,
0.75, 1.0, 1.0, 1.00 ]
controlPoints [ 1 0 0 1,
0.707107 0.707107 0 0.707107,
0 1 0 1,
-0.707107 0.707107 0 0.707107,
-1 0 0 1,
-0.707107 -0.707107 0 0.707107,
0 -1 0 1,
0.707107 -0.707107 0 0.707107,
1 0 0 1, ]
}
}