New View Solid:Final Zoom 80:Perspec 400 Center Universe Cam1 -40,20,0 Direct A,7,0,-46,46 Direct B,4,-46,46,0 Lton A:Lton B Getimage "A:\TUTORIAL\LIGHT.BL1",w,h Rstart "A:\TUTORIAL\ANIM2",M Loadspin "A:\TUTORIAL\HEAD.SPN":Fullspin head,7 Xlate 0,0,1900:Bounds xmin,ymin,zmin,xmax,ymax,zmax:;head bounds Grpcent hx,hy,hz:;center of head Wedge nose,14 Clrgrp:Select nose:Rotate 0,0,-90:Scale 50 Align B,(hz+zmin)/2:Align K,ymin-hy/2 Cube Body,14 Clrgrp:Select Body:;only the body is selected Axisscale 125,75,200:Align T,zmin Bounds bxmin,bymin,bzmin,bxmax,bymax,bzmax:;body bounds Cube rarm,7 Clrgrp:Select rarm:Axisscale 50,50,150:Axisscale 75,75,100 Clone rarm,larm:; make a copy of the right arm Clrgrp:Select rarm Align L,bxmax:Align T,bzmax Grpcent rarmx,rarmy,rarmz:;centers of the right arm Clrgrp:Select larm Align R,bxmin:Align T,bzmax Grpcent larmx,larmy,larmz:;centers of the left arm Cube rleg,7 Clrgrp:Select rleg:Axisscale 50,50,180 Clone rleg,lleg:; make a copy of the right leg Clrgrp:Select rleg Align R,bxmax:Align T,bzmin Grpcent rlegx,rlegy,rlegz:;centers of the right leg Clrgrp:Select lleg Align L,bxmin:Align T,bzmin Grpcent llegx,llegy,llegz:;centers of the left leg Bounds bxmin,bymin,bzmin,bxmax,bymax,bzmax:;bounds of left leg llegz=bzmax Wedge lfoot,14 Clrgrp:Select lfoot:Rotate 0,0,-90:Axisscale 50,100,100 Rotate -20,0,0 Align T,bzmin:Align L,bxmin:Align K,bymax:;align foot with leg Grpcent lfx,lfy,lfz:;centers of left foot Align T,bzmin+(bzmin-lfz) Clone lfoot,rfoot:;make copy of left foot--right foot Clrgrp:Select rleg Bounds bxmin,bymin,bzmin,bxmax,bymax,bzmax:; bounds of right leg rlegz=bzmax Clrgrp:Select rfoot Align R,bxmax:;align right foot with right leg Clrgrp:Select rarm Bounds bxmin,bymin,bzmin,bxmax,bymax,bzmax:;bounds of right arm rarmz=bzmax:larmz=bzmax Sph1 rhand,7:Clrgrp:Select rhand:Scale 50 Clone rhand,lhand Clrgrp:Select rhand:Xlate rarmx,0,0:Align T,bzmin:;align right hand Clrgrp:Select lhand:Xlate larmx,0,0:Align T,bzmin:;align left hand oxpos=90:oypos=192:dx=4:dy=10 Allgrp:Superview:Overlay L,oxpos,oypos:;robot in its initial position Record Center Arbitrary lewpend=7:Gosub Swing1 Gosub Swing2 lewpend=6:Gosub Swing1 Rstop End @Swing1: For lewp=1 to lewpend Clrgrp:Select larm,lhand Setarb larmx,larmy,larmz:Rotate 10,0,0 Clrgrp:Select rarm,rhand Setarb rarmx,rarmy,rarmz:Rotate -10,0,0 Gosub Rlegf:Gosub Llegb Clrgrp:Select head,nose Setarb hx,hy,hz:Rotate 0,0,13 Allgrp:oxpos=oxpos-dx:oypos=oypos-dy Superview:Overlay L,oxpos,oypos Record Next lewp Return @Swing2: For lewp=1 to 14 Clrgrp:Select larm,lhand Setarb larmx,larmy,larmz:Rotate -10,0,0 Clrgrp:Select rarm,rhand Setarb rarmx,rarmy,rarmz:Rotate 10,0,0 Gosub Rlegb:Gosub Llegf Clrgrp:Select head,nose Setarb hx,hy,hz:Rotate 0,0,-13 Allgrp:oxpos=oxpos-dx:oypos=oypos-dy Superview:Overlay L,oxpos,oypos Record Next lewp Return @Rlegf: Clrgrp:Select rleg,rfoot Setarb rlegx,rlegy,rlegz Rotate 8,0,0 Return @Llegb: Clrgrp:Select lleg,lfoot Setarb llegx,llegy,llegz Rotate -8,0,0 Return @Rlegb: Clrgrp:Select rleg,rfoot Setarb rlegx,rlegy,rlegz Rotate -8,0,0 Return @Llegf: Clrgrp:Select lleg,lfoot Setarb llegx,llegy,llegz Rotate 8,0,0 Return