Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presentations PowerPoint. Presentation A series of pictures (slides) to present in sequence What is a picture? –An array of graphical elements Lines,

Similar presentations


Presentation on theme: "Presentations PowerPoint. Presentation A series of pictures (slides) to present in sequence What is a picture? –An array of graphical elements Lines,"— Presentation transcript:

1 Presentations PowerPoint

2 Presentation A series of pictures (slides) to present in sequence What is a picture? –An array of graphical elements Lines, rectangles, ovals, text, images, curves What is a presentation?

3 Presentation is an array of pictures 0) slide 1 0) line(10,20,30,20,black) 1) text(10,35,”Greetings earthlings”) 2) text(10,50,”Alien Enterprise Society”) 1) slide 2 0) image(10,10,”earth.gif”) 1) text(10,100,”Conquest is our goal!”) 2) slide 3.....

4 Two functions function drawPicture( picture ) {image = new array(screenWidth, screenHeight); for (each index, i, in picture) {draw picture[i] into image } return image; } function show(image) {show image on the screen; }

5 Events CurrentSlide –index of the slide we are currently showing onLeftClick - click the left mouse button CurrentSlide=CurrentSlide + 1; image = drawPicture(Presentation[CurrentSlide]); show(image); What happens if currentSlide >= Presentation.length?

6 Events onLeftClick - click the left mouse button if (CurrentSlide < Presentation.length) {CurrentSlide = CurrentSlide + 1; image = drawPicture(Presentation[CurrentSlide]); show(image); } else {show end of show image }

7 Events onRightClick - right mouse button clicked CurrentSlide = CurrentSlide - 1; image = drawPicture(Presentation[CurrentSlide]); show(image); What if CurrentSlide is already zero?

8 Events onRightClick - right mouse button clicked if (CurrentSlide > 0) {CurrentSlide = CurrentSlide - 1; image = drawPicture(Presentation[CurrentSlide]); show(image); } else {do nothing and stay at slide zero; }

9 The Presentation Tree PowerPoint SlideShow 1 mySlideShowyourSlideShow 0)Intro 1)Body2)End 0)line1)rect2)oval3)text Program File (slide show) Slides Graphics

10 Attributes in the tree Where is the Font? –graphic Color –graphic Bold –graphic Color Scheme –slide Default Color Scheme (color scheme for a new slide) –file (slideshow) Program - PowerPoint File - slideshow Slide Graphic

11 Animations Appear from Left Magically appear Drop from top Dissolve

12 Adding Animations Right Click on object to animate

13 Magically Appear To each graphic add a “visible” boolean field

14 Magically Appear function drawPicture( picture ) {image = new array(screenWidth, screenHeight); for (each index, i, in picture) {if (picture[i].visible) {draw picture[i] into image } } return image; }

15 Magically Appear A = index of the graphic to animate; picture[A].visible = true; image = drawPicture(picture); show(image);

16 Blend function B - blend value that varies from 0.0 to 1.0 Start - value we want to start with End - value we want to end with val = (1.0-B)*Start + B*End; B==0.0 then val==Start B==1.0 then val==End B==0.5 then val == average of Start and End

17 Appear from Left StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); }

18 Appear from Left StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); } B = 0.0

19 Appear from Left B = 0.1 StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); }

20 Appear from Left B = 0.3 StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); }

21 Appear from Left B = 0.5 StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); }

22 Appear from Left B = 0.7 StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); }

23 Appear from Left B = 1.0 StartX = value of X way off the left of the screen EndX = value of X where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].X = (1.0-B)*StartX+B*EndX; image = drawPicture(picture); show(image); }

24 Drop from Top StartY = value of Y way above the top of the screen EndY = value of Y where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].Y = (1.0-B)*StartY+B*EndY; image = drawPicture(picture); show(image); }

25 Rise from Bottom StartY = value of Y way below the bottom of the screen EndY = value of Y where we want the graphic Steps = number of steps in animation sequence A = index of the graphic to animate; for (each blend value, B, between 0.0 and 1.0) {picture[A].Y = (1.0-B)*StartY+B*EndY; image = drawPicture(picture); show(image); }

26 Dissolve newImage - image after the dissolve oldImage - image before the dissolve start with oldImage copy every 20th pixel from newImage copy every 19th pixel from newImage copy every 18th pixel from newImage.. copy every pixel from newImage


Download ppt "Presentations PowerPoint. Presentation A series of pictures (slides) to present in sequence What is a picture? –An array of graphical elements Lines,"

Similar presentations


Ads by Google