#VRML V2.0 utf8 FlyInterpolator Demo, Evgeny Demidov, 3 April 2001 NavigationInfo{ type "EXAMINE" } Viewpoint {position 0 1.5 8 description "Ground"} DirectionalLight {direction 0 -1 0} #Background{ skyColor .5 .5 1} Background{ groundAngle[.9, 1.5, 1.57] groundColor [0 .3 0, 0 .4 0, 0 .5 0, .6 .7 .6] skyAngle[.9, 1.5, 1.57] skyColor[.2 .18 .66, .2 .44 .85, .5 .8 .95, .77 .8 .82] } PROTO FlyInterpolator[ eventIn SFFloat set_fraction eventOut SFVec3f position_changed eventOut SFRotation orientation_changed field SFInt32 num 3 field SFFloat alpha 4 field SFBool loop TRUE field MFFloat key [] field MFFloat phi [] field MFVec3f keyValue [] ]{ DEF Root Transform{ children[ Shape{ appearance Appearance{ material Material{ emissiveColor 1 1 1 } } geometry DEF spline IndexedLineSet{ coord DEF spCoord Coordinate{} } } ]} DEF PosInt PositionInterpolator{ set_fraction IS set_fraction value_changed IS position_changed } DEF OrInt OrientationInterpolator{ set_fraction IS set_fraction value_changed IS orientation_changed } Script{ field SFInt32 num IS num field SFBool loop IS loop field MFFloat key IS key field MFVec3f val IS keyValue field SFFloat alpha IS alpha field MFFloat phi IS phi field SFNode Root USE Root field SFNode spline USE spline field SFNode spCoord USE spCoord field SFNode PosInt USE PosInt field SFNode OrInt USE OrInt directOutput TRUE url ["javascript: function initialize() { n = key.length; str = 'PROTO M[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children['+ 'Shape{ appearance Appearance{ material Material{ diffuseColor 1 1 0}}'+ 'geometry Sphere{ radius .1 }}]}}'; for (i= 0; i< n; i++) str += ' M{ trans '+val[i]+' }'; Root.addChildren = Browser.createVrmlFromString(str); p = new MFVec3f(); p.length = (n-1)*num+1; c = new MFInt32(); c.length = (n-1)*num+1; k = new MFFloat(); k.length = (n-1)*num+1; ind = new MFInt32(); ind.length = (n-1)*num+1; r = new MFFloat(); r.length = (n-1)*num+1; if( loop ){ del0 = val[1].subtract(val[n-2]).divide(alpha); val[n] = val[1];} else{ del0 = val[1].subtract(val[0]).divide(alpha); val[n] = val[n-1];} st = 1/num; t = 0; kt = 0; rt = phi[0]; for (j= 0; j< n-1; j++){ del1 = val[j+2].subtract(val[j]).divide(alpha); delK = (Math.abs(key[j+1])-Math.abs(key[j]))/num; delR = (phi[j+1]-phi[j])/num; for (i= 0; i< num; i++){ u = i*st; u1 = 1-u; u12 = u1*u1; u2 = u*u; b0 = u1*u12; b1 = 3*u*u12; b2 = 3*u2*u1; b3 = u*u2; p[t]=val[j].multiply(b0).add( val[j].add(del0).multiply(b1) ) .add( val[j+1].subtract(del1).multiply(b2) ).add(val[j+1].multiply(b3)); k[t] = kt; if (key[j+1] < 0) ind[t] = -1; else ind[t] = 1; kt += delK; r[t] = rt; rt += delR; c[t] = t++;} del0 = del1;} p[t] = val[n-1]; c[t] = t; k[t] = kt; ind[t] = 1; r[t] = rt; spCoord.set_point = p; spline.set_coordIndex = c; PosInt.set_keyValue = p; PosInt.set_key = k; rot = new MFRotation(); rot.length = (n-1)*num+1; M = new VrmlMatrix(); M1 = new VrmlMatrix(); O = new SFVec3f(0,0,0); Rx = new SFVec3f(1,0,0); Ry = new SFVec3f(0,1,0); Rz = new SFVec3f(0,0,1); dum = new SFVec3f(0,0,0); for (i= 0; i< t; i++){ norm = p[i+1].subtract(p[i]).normalize(); th = Math.asin(norm.y); if (norm.x == 0) ph = 0; else ph = -Math.atan(norm.z / norm.x); if (norm.x < 0) if( ind[i] < 0) th = 3.1415 - th; else ph += 3.1415; ri = new SFRotation(Rx, r[i]); M1.setTransform(O, ri ); ri = new SFRotation(Rz, th); M.setTransform(O, ri ); M = M.multLeft(M1); ri = new SFRotation(Ry, ph); M1.setTransform(O, ri ); M = M1.multLeft(M); M.getTransform(dum, ri); rot[i] = ri; } rot[t] = rot[0]; OrInt.set_keyValue = rot; OrInt.set_key = k; } "]} } DEF FlyInt FlyInterpolator{ #loop FALSE num 7 keyValue [0 0 -2,2 0 0,0 0 2,-2 0 0,0 0 -2, 2 2 -2, 0 4 -2, -2 2 -2, 0 0 -2] phi [0 0 0 0 0 0 0 0 0] key [0 .125 .25 .375 .5 -.625 -.75 -.875 -1] } DEF TS TimeSensor{ cycleInterval 30 loop TRUE} #DEF FlyInt FlyInterpolator{ #loop FALSE # key [0 .1 .2 .25 .3 .35 .4 .65 .7 .75 .8 .85 .9 .95 1] # keyValue [0 -2 -2, 2 0 0, 0 2 0, -2 0 0, 0 -1.8 0, 2 -2.1 0, 4 -1 0, -4 4 0, # -5 3 -1, -4 2 -2, -3 1 -1, -4 0 0, -5 -1 -1, -4 -2 -2, 0 -2 -2] # phi [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] #} # fly Model DEF CI CoordinateInterpolator{ key [ 0 .33 .66 1 ] keyValue [] } DEF CI2 CoordinateInterpolator{ key [ 0 .33 .66 1 ] keyValue [] } DEF TSm TimeSensor{ cycleInterval .5 loop TRUE} PROTO ProLegs[ exposedField MFVec3f Pos1 [ .084 -.351 -.471 -.259 -.11 -.47 .181 -.308 -.65 -.159 -.0441 -.674 .213 -.615 -.471 .308 -.607 -.633 .178 -.309 -.289 -.162 -.0461 -.263 .305 -.608 -.307 .244 -.733 -.471 .35 -.725 -.651 .347 -.725 -.29 .438 -.693 -.469 .444 -.693 -.48 .444 -.693 -.459 .368 -.225 -.287 .0359 .0846 -.261 .492 -.594 -.306 .465 -.181 -.467 .136 .151 -.465 .587 -.587 -.468 .371 -.223 -.649 .0389 .0866 -.672 .495 -.594 -.631 .555 -.709 -.288 .66 -.702 -.467 .558 -.709 -.649 .456 -.692 -.459 .463 -.691 -.469 .457 -.692 -.48 -.16 .0959 -.468 -.141 .109 -.506 -.142 .109 -.429 -.106 .135 -.429 -.0872 .148 -.467 -.105 .135 -.506] exposedField MFVec3f Pos2 [ -.368 -.209 -.471 -.254 .111 -.47 -.282 -.27 -.65 -.161 .0351 -.674 -.623 -.499 -.471 -.533 -.53 -.633 -.284 -.268 -.289 -.164 .0374 -.263 -.536 -.529 -.307 -.641 -.62 -.471 -.54 -.654 -.651 -.543 -.653 -.29 -.447 -.66 -.469 -.441 -.662 -.48 -.441 -.662 -.459 -.114 -.389 -.287 .0191 -.113 -.261 -.358 -.59 -.306 -.0276 -.45 -.467 .112 -.189 -.465 -.268 -.62 -.468 -.111 -.391 -.649 .0219 -.115 -.672 -.355 -.591 -.631 -.346 -.721 -.288 -.246 -.726 -.467 -.343 -.722 -.649 -.429 -.666 -.459 -.424 -.668 -.469 -.429 -.666 -.48 .00133 .131 -.468 .0194 .118 -.506 .0188 .118 -.429 .0544 .0913 -.429 .0725 .0777 -.467 .0549 .0909 -.506 ] exposedField MFVec3f Pos3 [ .0793 -.211 -.471 -.204 -.146 -.47 .185 -.2 -.65 -.104 -.0792 -.674 -.134 -.243 -.471 -.0684 -.312 -.633 .181 -.2 -.289 -.107 -.0812 -.263 -.0704 -.31 -.307 -.203 -.293 -.471 -.135 -.375 -.651 -.137 -.373 -.29 -.0583 -.429 -.469 -.0544 -.434 -.48 -.0545 -.434 -.459 .389 -.177 -.287 .0906 .0494 -.261 .058 -.447 -.306 .494 -.165 -.467 .191 .116 -.465 .123 -.517 -.468 .392 -.177 -.649 .0937 .0514 -.672 .06 -.449 -.631 -.00438 -.533 -.288 .0393 -.582 -.467 -.00234 -.536 -.649 -.0467 -.443 -.459 -.0427 -.448 -.469 -.0466 -.443 -.48 -.148 .105 -.468 -.13 .118 -.506 -.13 .117 -.429 -.094 .143 -.429 -.0756 .157 -.467 -.0934 .144 -.506 ] ]{ Transform{ children[ Shape{ appearance Appearance{ material Material{ diffuseColor .5 .5 .5} } geometry IndexedFaceSet{ coord Coordinate{ point IS Pos1 } coordIndex[ 0 1 3 -1 0 3 2 -1 0 2 5 -1 0 5 4 -1 0 6 7 -1 0 7 1 -1 0 4 8 -1 0 8 6 -1 4 5 10 -1 4 10 9 -1 4 9 11 -1 4 11 8 -1 9 10 13 -1 9 13 12 -1 9 12 14 -1 9 14 11 -1 6 15 16 -1 6 16 7 -1 6 8 17 -1 6 17 15 -1 15 18 19 -1 15 19 16 -1 15 17 20 -1 15 20 18 -1 18 21 22 -1 18 22 19 -1 18 20 23 -1 18 23 21 -1 21 2 3 -1 21 3 22 -1 21 23 5 -1 21 5 2 -1 8 11 24 -1 8 24 17 -1 17 24 25 -1 17 25 20 -1 20 25 26 -1 20 26 23 -1 23 26 10 -1 23 10 5 -1 11 14 27 -1 11 27 24 -1 24 27 28 -1 24 28 25 -1 25 28 29 -1 25 29 26 -1 26 29 13 -1 26 13 10 -1 30 31 3 -1 30 3 1 -1 30 1 7 -1 30 7 32 -1 32 7 16 -1 32 16 33 -1 33 16 19 -1 33 19 34 -1 34 19 22 -1 34 22 35 -1 35 22 3 -1 35 3 31] solid FALSE creaseAngle 2} } ]} } # end ProLegs DEF Model Transform{ scale .4 .4 .4 children[ DEF Rot Transform{ children[ Viewpoint {position -1 1.5 0 orientation 0 1 0 -1.57 description "Fly"} Transform{ translation .3 -.5 0 children[ DEF Leg ProLegs{} ]} Transform{ translation .3 -.5 1 children[ USE Leg ]} Transform{ translation -.9 -.5 0 children[ DEF Leg2 ProLegs{} ]} Transform{ translation -.9 -.5 1 children[ USE Leg2 ]} DEF SCR Script{ field SFNode Leg USE Leg field SFNode CI USE CI field SFNode CI2 USE CI2 url ["javascript: function initialize(){ len = Leg.Pos1.length; len2 = len + len; len3 = len2 + len; key = new MFVec3f(); key.length = 4*len; for (i= 0; i< len; i++){ key[i] = Leg.Pos1[i]; key[i+len3] = Leg.Pos1[i]; key[i+len] = Leg.Pos2[i]; key[i+len2] = Leg.Pos3[i]; } CI.set_keyValue = key; for (i= 0; i< len; i++){ key[i] = Leg.Pos2[i]; key[i+len3] = Leg.Pos2[i]; key[i+len] = Leg.Pos3[i]; key[i+len2] = Leg.Pos1[i]; } CI2.set_keyValue = key; } "] } # body Transform{ children[ Shape{ appearance Appearance{ material Material{ diffuseColor .5 .5 .5}} geometry IndexedFaceSet{ solid FALSE creaseAngle 2 coord Coordinate { point [ .245 .661 .167 -.239 .785 .189 .24 .491 .484 -.247 .587 .561 .596 .501 .0812 .604 .429 .217 .248 .649 -.193 -.236 .772 -.232 .598 .497 -.0733 -1.04 .725 .182 -1.02 .533 .546 -1.04 .712 -.23 -1.42 .346 .112 -1.39 .226 .342 -1.41 .337 -.148 -1.44 -.156 .0112 -1.44 -.166 .033 -1.44 -.157 -.0135 .248 .459 -.499 -.237 .549 -.59 .609 .416 -.205 .246 .141 -.669 -.244 .178 -.788 .627 .281 -.278 .241 -.218 -.657 -.253 -.243 -.775 .646 .128 -.273 .236 -.524 -.467 -.262 -.601 -.553 .661 -.00286 -.191 .231 -.694 -.15 -.27 -.799 -.181 .669 -.0755 -.0553 .228 -.682 .21 -.273 -.786 .24 .667 -.0709 .0992 .227 -.492 .516 -.272 -.563 .598 .656 .00975 .231 .23 -.175 .686 -.265 -.192 .796 .638 .145 .304 .235 .185 .674 -.256 .229 .783 .619 .298 .299 -1 .497 -.58 -.947 .137 -.774 -.887 -.271 -.761 -.838 -.618 -.542 -.813 -.81 -.178 -.819 -.797 .234 -.853 -.582 .584 -.908 -.222 .778 -.968 .186 .764 -1.38 .202 -.368 -1.33 -.0221 -.49 -1.28 -.276 -.481 -1.23 -.492 -.343 -1.21 -.612 -.113 -1.21 -.603 .147 -1.25 -.468 .367 -1.29 -.244 .489 -1.35 .0103 .48 -1.44 -.168 -.0344 -1.43 -.187 -.0459 -1.42 -.209 -.0449 -1.41 -.227 -.0318 -1.4 -.237 -.00997 -1.4 -.237 .0147 -1.41 -.225 .0356 -1.42 -.206 .0471 -1.43 -.185 .0462 .835 .851 .124 .895 .75 .343 .841 .846 -.125 .911 .735 -.336 1.03 .548 -.453 1.16 .337 -.446 1.26 .156 -.315 1.32 .0544 -.0956 1.32 .0599 .153 1.25 .171 .364 1.13 .357 .482 1 .569 .474 1.29 1.02 .13 1.31 .903 .35 1.29 1.01 -.12 1.32 .886 -.333 1.36 .67 -.452 1.4 .424 -.446 1.44 .214 -.315 1.46 .0968 -.0951 1.45 .103 .155 1.43 .231 .368 1.39 .448 .487 1.34 .693 .48 1.87 .534 .144 1.79 .412 .232 1.88 .536 -.0732 1.8 .408 -.204 1.75 .205 -.202 1.75 .157 -.159 1.65 .0995 -.0982 1.76 .0585 -.0229 1.75 .0605 .0651 1.74 .0973 .132 1.74 .168 .204 1.75 .216 .232 2.07 .289 .0576 2.02 .221 .125 2.07 .287 -.0588 2.03 .233 -.111 1.94 .114 -.0501 1.94 .0877 -.00801 1.93 .0623 -.00186 1.93 .0537 .0129 1.93 .0565 .0371 1.93 .0689 .0553 1.93 .0823 .0709 1.95 .134 .0969 1.1 .69 -.313 .822 .735 -.969 1.21 1.12 -1.06 .883 .957 -1.38 1.29 1.38 -1.55 .957 1.22 -1.87 1.42 1.48 -2.12 1.09 1.32 -2.43 1.96 1.35 -2.51 1.63 1.18 -2.82 -.434 .311 -1.4 -.281 .138 -1.83 -.187 .257 -2.28 -.0425 .318 -2.87 .53 .0184 -3.22 1.1 .674 .343 .82 .719 .999 1.21 1.1 1.09 .881 .941 1.41 1.28 1.37 1.58 .955 1.2 1.9 1.41 1.46 2.15 1.08 1.3 2.46 1.96 1.33 2.54 1.63 1.17 2.85 -.436 .295 1.43 -.283 .122 1.86 -.189 .241 2.31 -.0443 .302 2.9 .528 .00243 3.25 2.19 .0965 .072 2.19 .0782 -.0329 2.21 .172 .0917 2.22 .232 .0439 2.22 .231 -.0391 2.21 .184 -.0761 2.39 .195 -.0213 2.33 .245 -.0528 2.38 .204 .0552 2.33 .237 .0696 2.3 .266 .0347 2.3 .266 -.0258 2.62 .187 -.0173 2.61 .254 -.0448 2.62 .199 .0494 2.61 .246 .0619 2.6 .285 .0316 2.6 .284 -.0212 -1.73 -.409 0 -1.58 -.255 0 -1.71 -.38 -.0146 -1.6 -.235 -.0264 -1.92 -.368 0 -1.71 -.38 .0146 -1.6 -.235 .0264 -1.72 -.367 0 -1.61 -.215 0 -1.4 -.244 0 -1.42 -.197 -.0531 -1.42 -.197 .0531 -1.45 -.149 0 1.74 .205 .212 1.94 .104 .283 1.69 .124 .224 1.91 .0428 .294 1.76 .18 .123 1.96 .0839 .221 1.71 .0992 .136 1.93 .0222 .233 2.12 .0575 .375 2.11 .0234 .381 2.13 .0461 .34 2.12 .012 .347 2.25 .0497 .452 2.25 .0481 .452 2.25 .0491 .45 2.25 .0475 .45 1.74 .19 -.178 1.94 .09 -.249 1.7 .109 -.191 1.91 .0284 -.26 1.76 .166 -.0894 1.96 .0695 -.187 1.71 .0848 -.102 1.93 .00778 -.199 2.13 .0431 -.341 2.11 .00894 -.347 2.14 .0317 -.306 2.12 -.00245 -.313 2.25 .0352 -.418 2.25 .0336 -.418 2.25 .0347 -.416 2.25 .0331 -.416 ] } coordIndex [ 0 1 3 -1 0 3 2 -1 0 2 5 -1 0 5 4 -1 0 6 7 -1 0 7 1 -1 0 4 8 -1 0 8 6 -1 1 9 10 -1 1 10 3 -1 1 7 11 -1 1 11 9 -1 9 12 13 -1 9 13 10 -1 9 11 14 -1 9 14 12 -1 12 15 16 -1 12 16 13 -1 12 14 17 -1 12 17 15 -1 6 18 19 -1 6 19 7 -1 6 8 20 -1 6 20 18 -1 18 21 22 -1 18 22 19 -1 18 20 23 -1 18 23 21 -1 21 24 25 -1 21 25 22 -1 21 23 26 -1 21 26 24 -1 24 27 28 -1 24 28 25 -1 24 26 29 -1 24 29 27 -1 27 30 31 -1 27 31 28 -1 27 29 32 -1 27 32 30 -1 30 33 34 -1 30 34 31 -1 30 32 35 -1 30 35 33 -1 33 36 37 -1 33 37 34 -1 33 35 38 -1 33 38 36 -1 36 39 40 -1 36 40 37 -1 36 38 41 -1 36 41 39 -1 39 42 43 -1 39 43 40 -1 39 41 44 -1 39 44 42 -1 42 2 3 -1 42 3 43 -1 42 44 5 -1 42 5 2 -1 7 19 45 -1 7 45 11 -1 19 22 46 -1 19 46 45 -1 22 25 47 -1 22 47 46 -1 25 28 48 -1 25 48 47 -1 28 31 49 -1 28 49 48 -1 31 34 50 -1 31 50 49 -1 34 37 51 -1 34 51 50 -1 37 40 52 -1 37 52 51 -1 40 43 53 -1 40 53 52 -1 43 3 10 -1 43 10 53 -1 11 45 54 -1 11 54 14 -1 45 46 55 -1 45 55 54 -1 46 47 56 -1 46 56 55 -1 47 48 57 -1 47 57 56 -1 48 49 58 -1 48 58 57 -1 49 50 59 -1 49 59 58 -1 50 51 60 -1 50 60 59 -1 51 52 61 -1 51 61 60 -1 52 53 62 -1 52 62 61 -1 53 10 13 -1 53 13 62 -1 14 54 63 -1 14 63 17 -1 54 55 64 -1 54 64 63 -1 55 56 65 -1 55 65 64 -1 56 57 66 -1 56 66 65 -1 57 58 67 -1 57 67 66 -1 58 59 68 -1 58 68 67 -1 59 60 69 -1 59 69 68 -1 60 61 70 -1 60 70 69 -1 61 62 71 -1 61 71 70 -1 62 13 16 -1 62 16 71 -1 4 5 73 -1 4 73 72 -1 4 72 74 -1 4 74 8 -1 8 74 75 -1 8 75 20 -1 20 75 76 -1 20 76 23 -1 23 76 77 -1 23 77 26 -1 26 77 78 -1 26 78 29 -1 29 78 79 -1 29 79 32 -1 32 79 80 -1 32 80 35 -1 35 80 81 -1 35 81 38 -1 38 81 82 -1 38 82 41 -1 41 82 83 -1 41 83 44 -1 44 83 73 -1 44 73 5 -1 72 73 85 -1 72 85 84 -1 72 84 86 -1 72 86 74 -1 74 86 87 -1 74 87 75 -1 75 87 88 -1 75 88 76 -1 76 88 89 -1 76 89 77 -1 77 89 90 -1 77 90 78 -1 78 90 91 -1 78 91 79 -1 79 91 92 -1 79 92 80 -1 80 92 93 -1 80 93 81 -1 81 93 94 -1 81 94 82 -1 82 94 95 -1 82 95 83 -1 83 95 85 -1 83 85 73 -1 84 85 97 -1 84 97 96 -1 84 96 98 -1 84 98 86 -1 86 98 99 -1 86 99 87 -1 87 99 100 -1 87 100 88 -1 88 100 101 -1 88 101 89 -1 89 101 102 -1 89 102 90 -1 90 102 103 -1 90 103 91 -1 91 103 104 -1 91 104 92 -1 92 104 105 -1 92 105 93 -1 93 105 106 -1 93 106 94 -1 94 106 107 -1 94 107 95 -1 95 107 97 -1 95 97 85 -1 96 97 109 -1 96 109 108 -1 96 108 110 -1 96 110 98 -1 98 110 111 -1 98 111 99 -1 99 111 112 -1 99 112 100 -1 101 113 114 -1 101 114 102 -1 102 114 115 -1 102 115 103 -1 103 115 116 -1 103 116 104 -1 104 116 117 -1 104 117 105 -1 105 117 118 -1 105 118 106 -1 107 119 109 -1 107 109 97 -1 120 121 123 -1 120 123 122 -1 122 123 125 -1 122 125 124 -1 124 125 127 -1 124 127 126 -1 126 127 129 -1 126 129 128 -1 130 131 123 -1 130 123 121 -1 131 132 125 -1 131 125 123 -1 132 133 127 -1 132 127 125 -1 133 134 129 -1 133 129 127 -1 135 136 138 -1 135 138 137 -1 137 138 140 -1 137 140 139 -1 139 140 142 -1 139 142 141 -1 141 142 144 -1 141 144 143 -1 145 146 138 -1 145 138 136 -1 146 147 140 -1 146 140 138 -1 147 148 142 -1 147 142 140 -1 148 149 144 -1 148 144 142 -1 119 150 151 -1 119 151 112 -1 119 109 152 -1 119 152 150 -1 109 108 153 -1 109 153 152 -1 108 110 154 -1 108 154 153 -1 110 111 155 -1 110 155 154 -1 111 112 151 -1 111 151 155 -1 151 156 157 -1 151 157 155 -1 151 150 158 -1 151 158 156 -1 150 152 159 -1 150 159 158 -1 152 153 160 -1 152 160 159 -1 153 154 161 -1 153 161 160 -1 154 155 157 -1 154 157 161 -1 162 163 157 -1 162 157 156 -1 162 156 158 -1 162 158 164 -1 164 158 159 -1 164 159 165 -1 165 159 160 -1 165 160 166 -1 166 160 161 -1 166 161 167 -1 167 161 157 -1 167 157 163 -1 168 169 171 -1 168 171 170 -1 168 170 172 -1 168 173 174 -1 168 174 169 -1 168 172 173 -1 173 175 176 -1 173 176 174 -1 173 172 175 -1 175 170 171 -1 175 171 176 -1 175 172 170 -1 177 178 171 -1 177 171 169 -1 177 169 174 -1 177 174 179 -1 179 174 176 -1 179 176 180 -1 180 176 171 -1 180 171 178 -1 181 182 184 -1 181 184 183 -1 181 185 186 -1 181 186 182 -1 185 187 188 -1 185 188 186 -1 187 183 184 -1 187 184 188 -1 182 189 190 -1 182 190 184 -1 182 186 191 -1 182 191 189 -1 186 188 192 -1 186 192 191 -1 188 184 190 -1 188 190 192 -1 193 194 190 -1 193 190 189 -1 193 189 191 -1 193 191 195 -1 195 191 192 -1 195 192 196 -1 196 192 190 -1 196 190 194 -1 197 198 200 -1 197 200 199 -1 197 201 202 -1 197 202 198 -1 201 203 204 -1 201 204 202 -1 203 199 200 -1 203 200 204 -1 198 205 206 -1 198 206 200 -1 198 202 207 -1 198 207 205 -1 202 204 208 -1 202 208 207 -1 204 200 206 -1 204 206 208 -1 209 210 206 -1 209 206 205 -1 209 205 207 -1 209 207 211 -1 211 207 208 -1 211 208 212 -1 212 208 206 -1 212 206 210 -1 ] }}]} Transform{ translation 1.57 .65 .3 children[ DEF eye Transform{ children[ Shape{ appearance Appearance{ material Material{ diffuseColor .3 .3 .3}} geometry Sphere{ radius .02}} ]} ]} Transform{ translation 1.57 .65 -.3 children[ USE eye]} ]} ]} ROUTE TSm.fraction_changed TO CI.set_fraction ROUTE TSm.fraction_changed TO CI2.set_fraction ROUTE CI.value_changed TO Leg.set_Pos1 ROUTE CI2.value_changed TO Leg2.set_Pos1 # end Model ROUTE TS.fraction_changed TO FlyInt.set_fraction ROUTE FlyInt.position_changed TO Model.set_translation ROUTE FlyInt.orientation_changed TO Model.set_rotation