<
head>
</
head>
<!--
Index for DEF nodes:
aft,
angledsupport,
angledsupport2,
Axle,
black,
clear,
clock,
CowSound,
flinger,
flingerangles,
Front,
halfsling,
HamsterSound,
HolyGrail,
HolyHandGrenadeSound,
horizontalsupport,
hub,
invisiable,
Launch,
launch,
LauncheeChoice,
LauncheeScript,
MonkSound,
Mover,
panel,
PigdogMonk,
PigdogMonkScript,
PigDogSound,
Pin,
pinpath,
plank,
projectile,
projectilename,
ProjectileTransform,
projectiletransform,
RnS,
RnSAngels,
rope,
ropes,
screw,
sling,
TextAppearance,
Torus,
tracks,
verticalsupport,
verticalweight,
verticalweightpath,
Weight,
WeightScript,
weightselector,
wheel,
wood,
woodTexture
Index for Viewpoint images:
Viewpoint_1,
Viewpoint_2,
Viewpoint_3,
Viewpoint_4
-->
<
Scene>
<
Background groundAngle='
1.309 1.571'
groundColor='
.1 .1 0 .4 .25 .2 .6 .6 .6'
skyAngle='
1.309 1.571'
skyColor='
0 .2 .7 0 .5 1 1 1 1'
backUrl='
http://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_back.jpg '
bottomUrl='
http://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_bottom.jpg '
frontUrl='
http://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_front.jpg '
leftUrl='
http://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_left.jpg '
rightUrl='
http://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_right.jpg '
topUrl='
http://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_top.jpg '/>
<
Sound maxBack='
1000'
maxFront='
1000'>
</
Sound>
<
Shape>
<
Box size='
10000 1 10000'/>
<
Appearance>
</
Appearance>
</
Shape>
<
Transform rotation='
0 1 0 1.57'
scale='
.5 .5 .5'
translation='
10.5 6.5 4.5'>
<
Shape>
<
Appearance DEF='
TextAppearance'>
<Material diffuseColor='1 0 0' emissiveColor='1 1 0'/>
</
Appearance>
<
Text string='
Click Sling to Select Projectile'
solid='
true'>
<FontStyle/>
</
Text>
</
Shape>
</
Transform>
<
Transform rotation='
0 1 0 1.57'
scale='
.5 .5 .5'
translation='
11 5.5 6'>
<!--
Weight ROUTE:
[
from WeightScript.whichchoice to whichChoice
]
-->
<
Switch DEF='
Weight'
whichChoice='
0'>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Click Here to Change Counter Weight (50 lbs)'
solid='
true'/>
</
Shape>
</
Group>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Click Here to Change Counter Weight (500 lbs)'
solid='
true'/>
</
Shape>
</
Group>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Click Here to Change Counter Weight (1000 lbs)'
solid='
true'/>
</
Shape>
</
Group>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Click Here to Change Counter Weight (10000 lbs)'
solid='
true'/>
</
Shape>
</
Group>
</
Switch>
<!--
weightselector ROUTE:
[
from isActive to WeightScript.set_boolean
]
-->
<
TouchSensor DEF='
weightselector'
description='
weight selector'/>
<
Transform translation='
8 0 0'>
<
Shape>
<
Box size='
20 1 1'/>
<
Appearance>
<Material transparency='1'/>
</
Appearance>
</
Shape>
</
Transform>
</
Transform>
<
Transform rotation='
0 1 0 1.57'
translation='
10 .5 4.5'>
<
Transform DEF='
launch'
translation='
0 2 5'>
</
Transform>
<
Transform>
<!--
projectilename ROUTE:
[
from LauncheeScript.whichchoice to whichChoice
]
-->
<
Switch DEF='
projectilename'
whichChoice='
0'>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Bowling Ball (10 lbs)'
solid='
true'>
<FontStyle size='.5'/>
</
Text>
</
Shape>
<
Sound maxBack='
1000'
maxFront='
1000'
priority='
1'>
</
Sound>
</
Group>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Cow (1000 lbs)'
solid='
true'>
<FontStyle size='.5'/>
</
Text>
</
Shape>
<
Sound maxBack='
1000'
maxFront='
1000'>
</
Sound>
</
Group>
<
Group>
<
Shape>
<
Appearance USE='
TextAppearance'/>
<
Text string='
Chicken (5 lbs)'
solid='
true'>
<FontStyle size='.5'/>
</
Text>
</
Shape>
<
Sound maxBack='
1000'
maxFront='
1000'
priority='
1'>
</
Sound>
</
Group>
</
Switch>
</
Transform>
</
Transform>
<
Transform rotation='
0 1 0 -1.67'>
<
Transform DEF='
aft'
translation='
5 5 15'>
<
Transform translation='
-2.5 -4.5 -2'>
</
Transform>
</
Transform>
</
Transform>
<
Transform translation='
0 3 0'>
<
Shape DEF='
plank'>
<
Box size='
25 1 1'/>
<
Appearance DEF='
wood'>
</
Appearance>
</
Shape>
<
Transform DEF='
angledsupport'
rotation='
0 0 1 1'
translation='
-5 10 0'>
</
Transform>
<
Transform DEF='
angledsupport2'
rotation='
0 0 1 -1'
translation='
5 10 0'>
</
Transform>
<
Transform DEF='
verticalsupport'
rotation='
0 0 1 1.57'
scale='
.9 1 1'
translation='
0 11 0'>
<
Shape USE='
plank'/>
<!-- Main Verticle Support -->
</
Transform>
<
Transform DEF='
horizontalsupport'
scale='
.4 1 1'
translation='
0 10 0'>
</
Transform>
<
Transform rotation='
0 0 1 1.57'
scale='
.6 1 1'
translation='
0 5 10'>
<
Transform rotation='
0 1 0 .4'>
</
Transform>
</
Transform>
<
Transform DEF='
panel'
translation='
0 18.2 -.3'>
<
Shape>
<
Box size='
5 5 .5'/>
<
Appearance USE='
wood'/>
</
Shape>
</
Transform>
<
Transform rotation='
1 0 0 -1.57'
translation='
0 0.6 2.5'>
<
Transform rotation='
0 0 1 1.57'>
<
Shape>
<
Extrusion beginCap='
false'
crossSection='
1.0 -.38 .92 -.38 .71 -.71 .38 -.92 0.0 -1.0 -.38 -.92 -.71 -.71 -.92 -.38 -1.0 -.38 -1 -1.1 1 -1.1 1.0 -.38'
endCap='
false'
solid='
false'
spine='
0 6 0 0 -11 0'/>
<
Appearance USE='
wood'/>
</
Shape>
</
Transform>
</
Transform>
<!--
flinger ROUTE:
[
from flingerangles.value_changed to set_rotation
]
-->
<
Transform DEF='
flinger'
center='
7 0 0'
rotation='
0 0 1 .82'
scale='
.9 1 1'
translation='
-7 18 2.5'>
<
Transform>
<
Shape>
<
Box size='
35 1 1'/>
<
Appearance USE='
wood'/>
</
Shape>
<
Transform translation='
7 0 0'>
<
Shape>
<
Box size='
8 2 2'/>
<
Appearance USE='
wood'/>
</
Shape>
</
Transform>
</
Transform>
<
Transform rotation='
1 0 0 1.57'
scale='
.2 .2 .2'
translation='
-15 -1 0'>
<
Shape DEF='
Torus'>
<
Appearance>
<Material specularColor='1 1 1'/>
</
Appearance>
<
Extrusion beginCap='
false'
convex='
false'
creaseAngle='
1.57'
crossSection='
.90 0.00 0.81 -0.34 0.63 -0.63 0.34 -0.83 0.00 -.9 -0.34 -0.81 -0.63 -0.63 -0.81 -0.34 -.90 -0.00 -0.81 0.34 -0.63 0.63 -0.34 0.81 0.00 .90 0.38 0.81 0.63 0.63 0.81 0.34 .90 0.00'
endCap='
false'
spine='
2.00 0.0 0.00 1.85 0.0 0.77 1.41 0.0 1.41 0.77 0.0 1.85 0.00 0.0 2.00 -0.77 0.0 1.85 -1.41 0.0 1.41 -1.85 0.0 0.77 -2.00 0.0 0.00 -1.85 0.0 -0.77 -1.41 0.0 -1.41 -0.77 0.0 -1.85 0.00 0.0 -2.00 0.77 0.0 -1.85 1.41 0.0 -1.41 1.85 0.0 -0.77 2.00 0.0 0.00'/>
</
Shape>
<
Transform translation='
1 0 2'>
<
Shape>
<
Appearance DEF='
rope'>
</
Appearance>
<
Sphere radius='
1.5'/>
</
Shape>
<!-- knott -->
</
Transform>
</
Transform>
<!-- The Unicorn -->
<
Transform rotation='
0 0 1 1.2'
scale='
.2 .2 .2'
translation='
-18.3 0.3 0'>
<
Shape>
<
Cylinder height='
10'/>
<
Appearance>
<Material specularColor='1 1 1'/>
</
Appearance>
</
Shape>
<
Transform translation='
0 -2.5 0'>
<
Shape USE='
Torus'/>
<!-- The Unicorn -->
<
Transform translation='
-2 -0 0'>
<
Shape>
<
Sphere radius='
1.5'/>
<
Appearance USE='
rope'/>
</
Shape>
<!-- Knott -->
</
Transform>
</
Transform>
<
Transform rotation='
0 0 1 1.2'
translation='
15 55 -11'>
<
Transform scale='
5 5 5'>
<
Shape>
<
Appearance USE='
rope'/>
<
Extrusion beginCap='
false'
creaseAngle='
0.76'
crossSection='
.100 0.00 0.092 -0.038 0.071 -0.071 0.038 -0.092 0.00 -.100 -0.038 -0.092 -0.071 -0.071 -0.092 -0.038 -.100 -0.00 -0.092 0.038 -0.071 0.071 -0.038 0.092 0.00 .100 0.038 0.092 0.071 0.071 0.092 0.038 .100 0.00'
endCap='
false'
solid='
false'
spine='
-15.2 1.4 2.2 -12 -.8 2.2'/>
</
Shape>
</
Transform>
</
Transform>
</
Transform>
<
Transform rotation='
1 0 0 -1.7'
translation='
-17 -4.5 0'>
<
Transform scale='
.2 .2 .2'>
<
Shape USE='
Torus'>
<!-- Knot -->
</
Shape>
<
Transform translation='
-1 0 1.7'>
<
Shape>
<
Sphere radius='
1.5'/>
<
Appearance USE='
rope'/>
</
Shape>
</
Transform>
</
Transform>
</
Transform>
<
Transform DEF='
RnS'>
<
Transform DEF='
ropes'>
<
Transform rotation='
0 0 1 -.82'
translation='
7 -26 -2.5'>
<
Shape>
<
Appearance USE='
rope'/>
<
Extrusion beginCap='
false'
creaseAngle='
0.76'
crossSection='
.100 0.00 0.092 -0.038 0.071 -0.071 0.038 -0.092 0.00 -.100 -0.038 -0.092 -0.071 -0.071 -0.092 -0.038 -.100 -0.00 -0.092 0.038 -0.071 0.071 -0.038 0.092 0.00 .100 0.038 0.092 0.071 0.071 0.092 0.038 .100 0.00'
endCap='
false'
solid='
false'
spine='
-33 .9 2.5 -18.5 1.9 2.55'/>
</
Shape>
<
Shape>
<
Appearance USE='
rope'/>
<
Extrusion beginCap='
false'
creaseAngle='
0.76'
crossSection='
.100 0.00 0.092 -0.038 0.071 -0.071 0.038 -0.092 0.00 -.100 -0.038 -0.092 -0.071 -0.071 -0.092 -0.038 -.100 -0.00 -0.092 0.038 -0.071 0.071 -0.038 0.092 0.00 .100 0.038 0.092 0.071 0.071 0.092 0.038 .100 0.00'
endCap='
false'
solid='
false'
spine='
-35.7 -.8 2.5 -18.8 -.8 2.55'/>
</
Shape>
</
Transform>
</
Transform>
<
Transform DEF='
sling'
rotation='
0 0 1 -.82'
translation='
-4 -15.3 0'>
<
Transform>
<
Transform rotation='
0 1 0 -1.57'
scale='
1 1.3 1'
translation='
.5 0 -1'>
<
Transform rotation='
0 0 1 1.57'>
<
Transform scale='
.3 .3 .3'>
<
Shape DEF='
halfsling'>
<
Appearance DEF='
clear'>
<Material transparency='.5'/>
</
Appearance>
<
Extrusion crossSection='
0 0 0 5 .5 7 1 8 2 9 3 11 3.5 11.2 4 11 5 9 6 8 6.5 7 6.7 5 6.7 0 0 0'
spine='
0 0 0 .1 0 0'/>
</
Shape>
<
Transform scale='
.3 .3 .3'
translation='
0 -3.5 11.5'>
<
Shape USE='
Torus'/>
<
Transform translation='
0 0 2'>
<
Shape>
<
Appearance USE='
rope'/>
<
Sphere radius='
1.5'/>
</
Shape>
</
Transform>
</
Transform>
</
Transform>
<
Transform scale='
.3 .3 .3'
translation='
2 0 0'>
<
Shape USE='
halfsling'/>
<
Transform scale='
.3 .3 .3'
translation='
0 -3.5 11.3'>
<
Shape USE='
Torus'/>
<
Transform translation='
0 0 2'>
<
Shape>
<
Appearance USE='
rope'/>
<
Sphere radius='
1.5'/>
</
Shape>
</
Transform>
</
Transform>
</
Transform>
<
Transform translation='
1 -1 0'>
<
Shape>
<
Extrusion beginCap='
false'
creaseAngle='
0.785'
crossSection='
1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00'
endCap='
false'
solid='
false'
spine='
0 -1 0 0 1 0'/>
<
Appearance USE='
clear'/>
</
Shape>
</
Transform>
</
Transform>
<!--
LauncheeChoice ROUTEs:
[
from touchTime to HolyHandGrenadeSound.set_startTime
]
[
from touchTime to CowSound.set_startTime
]
[
from touchTime to HamsterSound.set_startTime
]
[
from isActive to LauncheeScript.set_boolean
]
-->
<
TouchSensor DEF='
LauncheeChoice'
description='
launcher choice'/>
</
Transform>
<!--
projectiletransform ROUTE:
[
from invisiable.value_changed to set_scale
]
-->
<
Transform DEF='
projectiletransform'
scale='
.01 .01 .01'>
<!--
projectile ROUTE:
[
from LauncheeScript.whichchoice to whichChoice
]
-->
<
Switch DEF='
projectile'
whichChoice='
0'>
<
Group>
<
Transform translation='
0 .7 0'>
<
Shape>
<
Sphere radius='
.7'/>
<
Appearance DEF='
black'>
<Material diffuseColor='0 0 0' specularColor='1 1 1'/>
</
Appearance>
</
Shape>
</
Transform>
</
Group>
<
Group>
</
Group>
<
Group>
<
Transform rotation='
0 1 0 1.57'
scale='
.4 .4 .4'
translation='
0 .7 0'>
</
Transform>
</
Group>
</
Switch>
</
Transform>
</
Transform>
</
Transform>
</
Transform>
</
Transform>
<
Transform rotation='
1 0 0 1.57'
translation='
0 18 2.5'>
<
Shape>
<
Cylinder height='
8'
radius='
.4'/>
<
Appearance>
<Material diffuseColor='0 0 0' specularColor='1 1 1'/>
</
Appearance>
</
Shape>
<!-- Top Pivot -->
</
Transform>
<!--
verticalweight ROUTE:
[
from verticalweightpath.value_changed to set_translation
]
-->
<
Transform DEF='
verticalweight'>
<
Transform translation='
4 18 1.8'>
<
Shape>
<
Box size='
1 10 .5'/>
<
Appearance USE='
wood'/>
</
Shape>
</
Transform>
<
Transform translation='
4 18 3.2'>
<
Shape>
<
Box size='
1 10 .5'/>
<
Appearance USE='
wood'/>
</
Shape>
</
Transform>
<
Transform translation='
4 14 2.5'>
<!-- CounterWeight -->
<
Shape>
<
Cylinder height='
4'
radius='
1.5'/>
<
Appearance>
<Material diffuseColor='0 0 0' specularColor='1 1 1'/>
</
Appearance>
</
Shape>
</
Transform>
<
Transform rotation='
1 0 0 1.57'
translation='
4 22 2.5'>
<
Shape>
<
Cylinder height='
2.5'
radius='
.3'/>
<
Appearance>
<Material diffuseColor='0 0 0' specularColor='1 1 1'/>
</
Appearance>
</
Shape>
</
Transform>
</
Transform>
<
Transform rotation='
0 0 1 1.57'
scale='
.2 .2 .2'
translation='
-11.5 -1 2'>
<
Transform DEF='
screw'
rotation='
1 0 0 1.57'>
<
Shape USE='
Torus'/>
<
Transform rotation='
1 0 0 -1.57'
translation='
0 0 7'>
<
Shape>
<
Cylinder height='
10'
radius='
.7'/>
<
Appearance>
<Material specularColor='1 1 1'/>
</
Appearance>
</
Shape>
</
Transform>
</
Transform>
<
Transform translation='
0 0 7'>
</
Transform>
<!-- Release Pin -->
<!--
Pin ROUTE:
[
from pinpath.value_changed to set_translation
]
-->
<
Transform DEF='
Pin'
rotation='
1 0 0 -1.57'
translation='
0 0 -3'>
</
Transform>
</
Transform>
<
Transform translation='
0 0 5'>
<
Shape USE='
plank'/>
<
Transform USE='
angledsupport'/>
<
Transform USE='
angledsupport2'/>
<
Transform USE='
verticalsupport'/>
<
Transform USE='
horizontalsupport'/>
<
Transform rotation='
0 1 0 1.57'
scale='
.6 1 1'
translation='
0 -11 -2.5'>
</
Transform>
<
Transform rotation='
0 0 1 -1.57'
scale='
.6 1 1'
translation='
0 5 -10'>
<
Transform rotation='
0 1 0 .4'>
</
Transform>
</
Transform>
<
Transform translation='
0 0 .6'>
</
Transform>
</
Transform>
<
Transform translation='
10 -1 2.5'>
<
Shape DEF='
Axle'>
<
Box size='
1 1 8'/>
<
Appearance USE='
wood'/>
</
Shape>
<
Transform rotation='
1 0 0 1.57'
translation='
0 0 4.5'>
<
Shape DEF='
wheel'>
<
Cylinder radius='
2'/>
<
Appearance USE='
wood'/>
</
Shape>
<
Shape DEF='
tracks'>
<
Sphere radius='
1.5'/>
<
Appearance USE='
black'/>
</
Shape>
<
Transform translation='
0 .55 0'>
<
Shape DEF='
hub'>
<
Sphere radius='
1.5'/>
<
Appearance USE='
black'/>
</
Shape>
</
Transform>
</
Transform>
<
Transform rotation='
1 0 0 1.57'
translation='
0 0 -4.5'>
<
Shape USE='
wheel'/>
<
Shape USE='
tracks'/>
<
Transform translation='
0 -.55 0'>
</
Transform>
</
Transform>
</
Transform>
<
Transform translation='
-10 -1 2.5'>
<
Shape USE='
Axle'/>
<
Transform rotation='
1 0 0 1.57'
translation='
0 0 4.5'>
<
Shape USE='
wheel'/>
<
Shape USE='
tracks'/>
<
Transform translation='
0 .55 0'>
</
Transform>
</
Transform>
<
Transform rotation='
1 0 0 1.57'
translation='
0 0 -4.5'>
<
Shape USE='
wheel'/>
<
Shape USE='
tracks'/>
<
Transform translation='
0 -.55 0'>
</
Transform>
</
Transform>
<
Transform rotation='
0 1 0 -.6'
translation='
0 100 400'>
<
Transform translation='
1 3 0'>
</
Transform>
<
Transform USE='
launch'/>
<
Transform>
<
TouchSensor USE='
LauncheeChoice'/>
<
Switch USE='
projectilename'
whichChoice='
-1'/>
<
Transform translation='
2.5 0 0'>
<
Shape>
<
Box size='
5 .5 .5'/>
<
Appearance>
<Material transparency='1'/>
</
Appearance>
</
Shape>
</
Transform>
</
Transform>
<
Transform scale='
.5 .5 .5'
translation='
0 -1 0'>
<
TouchSensor USE='
weightselector'/>
<
Switch USE='
Weight'
whichChoice='
-1'/>
<
Transform translation='
8 0 0'>
<
Shape>
<
Box size='
17 1 .5'/>
<
Appearance>
<Material transparency='1'/>
</
Appearance>
</
Shape>
</
Transform>
</
Transform>
</
Transform>
<!--
ProjectileTransform ROUTEs:
[
from Mover.value_changed to set_translation
]
[
from Mover.transparent to set_scale
]
-->
<
Transform DEF='
ProjectileTransform'
translation='
14.25 1.25 0'>
<
Switch USE='
projectile'
whichChoice='
-1'/>
<
Transform rotation='
0 1 0 1.57'
translation='
0 1 0'>
<
Viewpoint description='
Projectile Cam'
position='
0 0 15'/>
</
Transform>
</
Transform>
<
Transform translation='
20 2 0'>
<
Transform DEF='
Front'
rotation='
0 1 0 1.57'>
</
Transform>
</
Transform>
<
Transform translation='
-8 4 0'>
<
Transform rotation='
0 1 0 -1.57'>
</
Transform>
</
Transform>
<!--
WeightScript ROUTEs:
[
from weightselector.isActive to set_boolean
]
[
from CounterWeight to Mover.set_MassCounterWeight
]
[
from whichchoice to Weight.whichChoice
]
-->
<
Script DEF='
WeightScript'>
<field name='set_boolean' type='SFBool' accessType='inputOnly'/>
<field name='whichchoice' type='SFInt32' accessType='outputOnly'/>
<field name='CounterWeight' type='SFFloat' accessType='outputOnly'/>
<![CDATA[
ecmascript:
function initialize ()
{
whichchoice =0;
CounterWeight=100;
}
function set_boolean ( boolean_input, eventTime)
{
if ( boolean_input== false ) { return; } // ignore the unclick
whichchoice = whichchoice +1;
if (whichchoice == 0)CounterWeight=50.00;
if (whichchoice == 1)CounterWeight=500.00;
if (whichchoice == 2)CounterWeight=1000.00;
if (whichchoice == 3)CounterWeight=10000.00;
if ( whichchoice ==4 ) { whichchoice = 0; CounterWeight=50; }
Browser.print ('CounterWeight ='+CounterWeight);
}
]]>
<![CDATA[
ecmascript:
function set_boolean (boolean_input, eventTime)
{
if ( boolean_input== false ) { return; } // ignore unclick
whichchoice = whichchoice +1;
if (whichchoice == 0)ProjectileWeight=10.00;
if (whichchoice == 1)ProjectileWeight=1000.00;
if (whichchoice == 2)ProjectileWeight=5;
if ( whichchoice ==3 ) { whichchoice = 0; ProjectileWeight=10.00; }
Browser.print ('Projectile Weight'+ProjectileWeight);
}
]]>
<![CDATA[
ecmascript:
function set_boolean (boolean_input, eventTime)
{
if ( boolean_input== false ) { return; } // ignore unclick
whichchoice = whichchoice +1;
if ( whichchoice ==2 ) whichchoice = 0;
}
]]>
<![CDATA[
ecmascript:
function initialize ()
{
MassCounterWeight=100;
MassProjectileWeight=10;
Browser.print ('MassCounterWeight =' + MassCounterWeight);
Browser.print ('MassProjectileWeight =' + MassProjectileWeight);
}
function set_MassProjectileWeight (value, timestamp)
{
MassProjectileWeight = value;
Browser.print ('new MassProjectileWeight =' + MassProjectileWeight);
}
function set_MassCounterWeight (value2, timestamp)
{
MassCounterWeight = value2;
Browser.print ('new MassCounterWeight =' + MassCounterWeight);
}
function set_fraction ( fraction, eventTime )
{
var TrebuchetHeight=45;
var Height =25;
x = (2*(MassCounterWeight/MassProjectileWeight)*Height*fraction)-.5*TrebuchetHeight;
// start at TrebuchetHeight and keep along z axis (z=zero)
y = (MassCounterWeight/MassProjectileWeight)*Height*Math.sin(fraction*3.14);
z = 0;
transparent = new SFVec3f (1,1,1);
if (y <1.5*TrebuchetHeight )if (x<TrebuchetHeight)
{
x=x-10;
y=y+1;
transparent = new SFVec3f(.01, .01, .01);
}
value_changed = new SFVec3f (x, y, z);
Browser.print ('x=' + value_changed[0] + ' y=' + value_changed[1] + ' z=' + value_changed[2]);
}
]]>
</
Scene>
</