katie bora math 198 december 15, 2014new.math.uiuc.edu/math198/ma198-2014/bora2/final...
TRANSCRIPT
![Page 1: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/1.jpg)
Katie Bora Math 198
December 15, 2014
![Page 2: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/2.jpg)
Goal: To create a fencer performing the Advance Lunge and hitting an opponent. Then, the fencer will retreat backwards. The opponent will remain stationary.
Use VPython
![Page 3: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/3.jpg)
En Garde Advance Lunge Retreat
![Page 4: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/4.jpg)
![Page 5: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/5.jpg)
![Page 6: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/6.jpg)
![Page 7: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/7.jpg)
First, created the frames Then, put objects within the frames
Frames review-hierarchy, top down process
![Page 8: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/8.jpg)
![Page 9: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/9.jpg)
![Page 10: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/10.jpg)
![Page 11: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/11.jpg)
fheart=frame() fhead=frame(frame=fheart, pos=(0,1.75,0)) ftorso=frame(frame=fheart, pos=(0,.75,0)) fwaist=frame(frame=ftorso, pos=(0,-2.5,0)) fshoulderL=frame(frame=ftorso, pos=(-sqrt(2)/2,-.75,sqrt(2)/2)) felbowL=frame(frame=fshoulderL, pos=(-.6,-2,0)) fwristL=frame(frame=felbowL, pos=(-.1,-2,0))
![Page 12: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/12.jpg)
Instead of rotating the body, I changed the positions of the frames to have the fencer start out in En Garde.
![Page 13: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/13.jpg)
![Page 14: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/14.jpg)
![Page 15: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/15.jpg)
fwaist.rotate(angle = ((pi/4)/5.4), axis = (0,1,0)) fshoulderL.rotate(angle = (-5*pi/4)/54, axis = (0,0,1))
fshoulderR.rotate(angle = (pi/4)/5.4, axis = (0,0,1)) felbowR.rotate(angle= (-pi/2)/5.4, axis = (0,0,1)) fweaponR.rotate(angle= (pi/4)/5.4, axis = (0,0,1)) fhipL.rotate(angle= (-pi/2)/5.4, axis=(-1,-1,1)) fkneeL.rotate(angle = (pi/3)/5.4, axis=(0,0,1)) fhipR.rotate(angle=(-pi/2)/5.4, axis=(1.5,0,0)) fkneeR.rotate(angle=(pi/2)/5.4, axis=(1.5,0,0))
![Page 16: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/16.jpg)
![Page 17: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/17.jpg)
![Page 18: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/18.jpg)
def lunge(j): for i in range (1,400,1): angle = math.radians(i) print i if 0 < i < 5.4: rate(10)
![Page 19: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/19.jpg)
Horizontal Translation
def advance(j): fheart.pos.x+=j
Call the function within the Lunge rotation.
![Page 20: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/20.jpg)
fweaponR.rotate(angle= (pi/4)/5.4, axis = (0,0,1)) advance(1) fhipL.rotate(angle= (-pi/2)/5.4, axis=(-1,-1,1))
![Page 21: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/21.jpg)
Horizontal Translation
def backwards(j): dir=1 fheart.pos.x-=dir
![Page 22: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/22.jpg)
Reverse the Lunge
Same code, but with opposite angles
Instead of going from top down, move from down up.
Also call the backwards function within the retreat lunge.
![Page 23: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/23.jpg)
Created a second wire frame Shifted the head and torso by 15 in the x direction
fheart2=frame() fhead2=frame(frame=fheart2,pos=(15,1.75,0)) ftorso2=frame(frame=fheart2,pos=(15,.75,0)) fwaist2=frame(frame=ftorso2, pos=(0,2.5,0))
![Page 24: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/24.jpg)
Rotated torso by pi to turn the opponent to face the moving fencer.
ftorso2.rotate(angle =(pi), axis = (0,1,0))
Changed “sock” colors
![Page 25: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/25.jpg)
![Page 26: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/26.jpg)
Fencing animation does not start until any key on the key board is pressed
After the frames and objects for body 1 and 2, add the following:
scene.waitfor('keydown') # wait for keyboard key press
![Page 27: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/27.jpg)
![Page 28: Katie Bora Math 198 December 15, 2014new.math.uiuc.edu/math198/MA198-2014/bora2/Final Presentation.pdfGoal: To create a fencer performing the Advance Lunge and hitting an opponent](https://reader034.vdocument.in/reader034/viewer/2022042200/5ea01eae4c964f7b885f5049/html5/thumbnails/28.jpg)
Have the opponent retreat and then parry riposte
Can demonstrate other fencing moves: • Feint
• Fleche
• Beat
Create a virtual fencing bout Add in the strip