home *** CD-ROM | disk | FTP | other *** search
- set paraboloid(color) {1.0 0.0 0.0}
- set paraboloid(rMax) .5
- set paraboloid(zMin) .2
- set paraboloid(zMax) .7
- set paraboloid(thetaMax) 360.0
- set paraboloid(xScale) 1
- set paraboloid(yScale) 1
- set paraboloid(zScale) 1
- set paraboloid(xTranslate) 0
- set paraboloid(yTranslate) 0
- set paraboloid(zTranslate) 0
- set paraboloid(xRotate) 0
- set paraboloid(yRotate) 0
- set paraboloid(zRotate) 0
-
-
-
- proc drawInsideAndBottom {thetaMax zMin zMax rMin rMax innerXMin innerYMin innerXMax innerYMax} {
- if {[expr int($thetaMax)] % 360} \
- { Patch bilinear P "0 0 $zMax \
- $rMax 0 $zMax \
- 0 0 $zMin \
- $rMin 0 $zMin \
- ";
- Patch bilinear P "0 0 $zMax \
- $innerXMax $innerYMax $zMax \
- 0 0 $zMin \
- $innerXMin $innerYMin $zMin \
- ";
- } {}
- if {$zMin > 0} \
- { Disk $zMin $rMin $thetaMax;
- } {}
- }
-
- loadControlPanel controls.nib
-
- startShape aParaboloid
- animatable: {set paraboloid(rMin) [expr {$paraboloid(rMax) * sqrt([expr {$paraboloid(zMin) / $paraboloid(zMax)}])}]}
- animatable: {set paraboloid(innerXMax) [expr {$paraboloid(rMax) * cos(radians($paraboloid(thetaMax)))}]}
- animatable: {set paraboloid(innerYMax) [expr {$paraboloid(rMax) * sin(radians($paraboloid(thetaMax)))}]}
- animatable: {set paraboloid(innerXMin) [expr {$paraboloid(rMin) * cos(radians($paraboloid(thetaMax)))}]}
- animatable: {set paraboloid(innerYMin) [expr {$paraboloid(rMin) * sin(radians($paraboloid(thetaMax)))}]}
- animatable: {Color $paraboloid(color)}
- animatable: {Scale $paraboloid(xScale) $paraboloid(yScale) $paraboloid(zScale)}
- animatable: {Translate $paraboloid(xTranslate) $paraboloid(yTranslate) $paraboloid(zTranslate)}
- animatable: {Rotate $paraboloid(xRotate) 1 0 0 }
- animatable: {Rotate $paraboloid(yRotate) 0 1 0 }
- animatable: {Rotate $paraboloid(zRotate) 0 0 1 }
- SolidBegin primitive
- EveProc {drawInsideAndBottom $paraboloid(thetaMax) $paraboloid(zMin) $paraboloid(zMax) \
- $paraboloid(rMin) $paraboloid(rMax) \
- $paraboloid(innerXMin) $paraboloid(innerYMin) \
- $paraboloid(innerXMax) $paraboloid(innerYMax)}
- animatable: {Paraboloid $paraboloid(rMax) $paraboloid(zMin) $paraboloid(zMax) $paraboloid(thetaMax)}
- animatable: {Disk $paraboloid(zMax) $paraboloid(rMax) $paraboloid(thetaMax)}
- SolidEnd
- endShape
-