www.pudn.com > HF¶àýÌå.rar > fan1.wrl, change:2003-05-22,size:2657b


#VRML V2.0 utf8 
#fan.wrl 
 
Transform { 
    children [ 
    	DEF Arms Transform { 
        	children [ 
				#add timesensor to turn on/off fan 
				DEF Time TimeSensor { 
					enabled FALSE 
					cycleInterval 0.1  
					loop TRUE 
					startTime 0 
					stopTime -1 
				} 
				#make fan rotate 
				DEF ArmsRotationInterp OrientationInterpolator { 
				key	[ 0, 0.5, 1 ] 
				keyValue	[ 0 1 0  0, 
							  0 1 0  1.0472, 
			    			  0 1 0  2.0944 
							] 
				} 
 
				DEF	Arm1 Transform { 
					translation	0.0 0 -0.1 
					rotation 0 0 1 0.15 
					children 
        			Shape { 
						appearance Appearance { 
	    					material Material { 
	    						ambientIntensity	0 
								shininess 0 
	    					} 
							texture	ImageTexture { 
								url	"fan.jpg" 
							} 
						} 
    					geometry DEF _0 IndexedFaceSet { 
    						coord Coordinate { 
								point	[ -0.0007 0.28394 0.84058, 
										  0.07966 0.28394 0.7972, 
										  0.06782 0.28394 0.2371, 
										  -0.01134 0.28394 0.20358, 
										  -0.06922 0.28394 0.2371, 
									      -0.08106 0.28394 0.7972, 
										  0.00994 0.28394 0.20358 ] 
    						} 
 
    						coordIndex	[ 0, 1, 2, -1, 3, 4, 5, 0, 
	        							  -1, 0, 2, 6, 3, -1 ] 
    						solid FALSE 
						} 
					} 
				} 
    			Transform { 
					children USE Arm1 
					rotation 0 1 0  2.0944 
				} 
    			Transform { 
					children USE Arm1 
					rotation 0 1 0  4.1888 
				} 
			] 
    		rotation 0 0 1  0 
    	} 
		DEF Ntransphere Transform { 
			translation	0 0.28 0 
			children [ 
				Shape { 
					appearance Appearance { 
						material Material {} 
						texture ImageTexture { 
							url "fanmotorside.jpg" 
						} 
					} 
					geometry Cylinder { 
						radius 0.145  
						height 0.06  
						bottom FALSE  
					} 
    			} 
    			Shape { 
					appearance Appearance { 
						material Material {} 
						texture ImageTexture { 
							url "fanmotorbottom.png" 
						} 
					} 
					geometry Cylinder { 
						radius 0.145  
						height 0.06  
						side FALSE  
					} 
    			} 
			] 
		} 
		DEF TURNON TouchSensor {} 
	] 
} 
 
Transform { 
	translation	0 0.32 0 
	children DEF fangan Shape { 
		appearance Appearance { 
			material Material { 
			} 
		} 
		geometry Cylinder { 
			radius 0.06 
			height 0.12 
		} 
	} 
} 
 
Transform { 
	translation	0 0.6 0 
	scale 0.8 1 0.8 
	children USE fangan 
} 
 
Transform { 
	translation	0 0.6 0 
	scale 0.3 5 0.3 
	children USE fangan 
} 
 
ROUTE TURNON.isActive TO Time.enabled 
ROUTE Time.fraction_changed TO ArmsRotationInterp.set_fraction 
ROUTE ArmsRotationInterp.value_changed TO Arms.set_rotation 
 
#fan.wrl