Animation II: Revenge of the Clones CSC 161: The Art of Programming Prof. Henry Kautz 10/16/2009.

Slides:



Advertisements
Similar presentations
Microsoft Power Point for beginners.
Advertisements

Physics Major Field Test
Creating Online Presentations. Creating a Presentation To create a presentation 1.Open PowerPoint. In the task pane under New select From Design Template,
Graphics Shapes. Setup for using graphics You have to import the graphics library You can use either “import graphics” or “from graphics import *” or.
Spreadsheet Basics Computer Technology.
Editing Your Faculty Homepage  This tutorial will go through the steps for editing your Faculty homepage.  Thank you to Ryan Vyborny for letting me use.
Fireworks MX. 2 Lesson 1a—Create Slices & Hotspots n Fireworks allows you to add animation (behaviors) already written in ___________. n However, users.
Dates You Know December 9 – Today December 14 – Final Exam ( Last Day for this class)
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
© by Pearson Education, Inc. All Rights Reserved. continued …
Working with Vector Graphics – Lesson 21 Working with Vector Graphics Lesson 2.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
1 Python Programming: An Introduction to Computer Science Chapter 3 Objects and Graphics.
1 Advanced PowerPoint Cliff Solomon. 2 Presentation Outline Inserting Movies and Animations Into Your Presentations Using Progressive Disclosures and.
Create a Narrated Story with PowerPoint. Basics Enter Text. (Click in the text box and start typing. If a text box is not visible, go to Insert > Text.
With Microsoft Access 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Graphics - setCoords. The coordinate system of Zelle graphics The default coordinate system for GraphWin is that the origin is in the upper left hand.
Document Basics Lesson 2. Skills Matrix SKILL #MATRIX SKILL 1.1.2Apply Quick Styles to documents 1.1.3Format documents using themes 1.1.4Customize a theme.
Chapter 4 Objects and Graphics
Python: Graphics
Access Tutorial 10 Automating Tasks with Macros
Animation CSC 161: The Art of Programming Prof. Henry Kautz 10/14/2009.
CSC 110 Objects and Graphics [Reading: chapter 4] CSC 110 E 1.
Chapter 3 Working with Symbols and Interactivity.
XP Tutorial 7 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Working with Graphics Tutorial 7.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Chapter 5 Graphics.  We’ve been doing command line programming, but now it’s time to try GUI programming—programming in a graphical user interface, using.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Microsoft Office Illustrated Introductory, Premium Edition A Worksheet Formatting.
Microsoft Office XP Illustrated Introductory, Enhanced A Worksheet Formatting.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Working with Symbols and Interactivity
Lotus 认证培训 Notes Domino 6/6.5 Application Development Foundation Skills ( 610 ) Exam Number: 610 Competencies: Please see exam guide. Length:
Laboratory Exercise # 9 – Inserting Graphics to Documents Office Productivity Tools 1 Laboratory Exercise # 9 Inserting Graphics to Documents Objectives:
Creating a Custom Drawing Sheet Tutorial. Create a new standard drawing file from menu options Opening a Drawing Sheet.
Some Graphics CS303E: Elements of Computers and Programming.
CSC 157 (Blum)1 Hello World. CSC 157 (Blum)2 Start/Programs/Microsoft Visual Studio.NET 2003/Microsoft Visual Studio.NET 2003.
GRAPHICS MODULE 14 STUDY BOOK. Graphic commands SCREEN - puts the screen into graphics mode WINDOW - allows scaling of the screen LINE - 3 formats –LINE.
Strategy Using Strategy1. Scan Path / Strategy It is important to visualize the scan path you want for a feature before you begin taking points on your.
PowerPoint Presentation Part I Creating a PowerPoint Presentation The Basics.
Xiaojuan Cai Computational Thinking 1 Lecture 5 Objects and Graphics Xiaojuan Cai (蔡小娟) Fall, 2015.
Distributed Multimedia Programming Week - 3 Shape Tweening Symbols and Instances.
Chapter 3 Device Monitor Screen Otasuke GP-EX! Chapter 3 Device Monitor Screen Chapter 3 Device Monitor Screen.
1 Mapping Coordinates Find the x- and y- coordinates for the images, relative to the x-axis and y-axis In a coordinate pair, the first number is the x-coordinate.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
Interaction with Graphics Also displaying GIFs. Text Output on the graphics window There is a class called Text which will put the message on the graphics.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Microsoft PowerPoint Prepared by the Academic Faculty Members of IT.
5. COMPUTING WITH GRAPHICS OBJECTS Dennis Y. W. Liu and Rocky K. C. Chang October 8, 2015 (Adapted from John Zelle’s slides)
© Anselm Spoerri Lecture 7 Meaning –Guiding Principles for Term Project Mechanics –Interactivity Recap –Simple and Disjointed Rollovers and Image Map –Navigation.
CS 115 Lecture 7 Graphics – coordinate systems, Text, Entry, aliases Taken from notes by Dr. Neil Moore.
Vahé Karamian Python Programming CS-110 CHAPTER 4 Objects and Graphics.
CS 115 Lecture 6 Graphics Taken from notes by Dr. Neil Moore.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 4 Objects and Graphics Killer cars.
Graphics Taken from notes by Dr. Neil Moore & Dr. Debby Keen
GUI in Python Ismail Abumuhfouz.
Python Programming: An Introduction to Computer Science
Editing Your Faculty Homepage
Graphics Part I Taken from notes by Dr. Neil Moore
def plotDrugData4(data, data1, color, name, name1): plot(data, data1, color) show() xlabel(name) ylabel(name1) title(name + ' versus ' + name1)
Graphics Part I Taken from notes by Dr. Neil Moore
CS 115 Lecture Graphics II – coordinate systems, Text, Entry, aliases
CS 115 Lecture Graphics II – coordinate systems, Text, Entry, aliases
Benchmark Series Microsoft Word 2016 Level 2
Graphics Part I Taken from notes by Dr. Neil Moore
Working with Symbols and Interactivity
Introduction to PowerPoint
Topics Graphical User Interfaces Using the tkinter Module
Intro to Excel CSCI-150.
Presentation transcript:

Animation II: Revenge of the Clones CSC 161: The Art of Programming Prof. Henry Kautz 10/16/2009

Status Programming assignment 6: Graphics Part I: Due 10:00am, Sat 24 October Part II: Due 10:00am, Sat 31 October To be completed in teams of two assigned by Lab TA Next class: Midterm Exam You may bring and consult your text book Also bring 1 page of written notes (good practice!) Study guide Be sure to bring pencil & calculator For Monday Oct 26: pre-read Chapter 6 2

Today Graphics bits & pieces Animation examples Q & A 3

Coordinate Systems Default GraphWin Coordinates One unit == one pixel (0,0) is upper left corner Drawbacks: Using a larger or smaller window requires program to be rewritten Familiar geometry notation has (0,0) in lower left Graphwin method setCoord(xLL, yLL, xUR, yUR) Sets lower left corner to coordinate (xLL, yLL) Sets upper right corner to coordinate (xUR, yUR) All object coordinates are automatically scaled to pixels 4

Examples w = GraphWin('test', 800, 400) w.setCoords(0, 0, 8, 4) c = Circle(Point(4,2), 1) c.draw(w) Circle is rendered at pixel location (400,200) with radius 100 5

Examples w = GraphWin('test', 800, 400) w.setCoords(0, 0, 8, 4) c = Circle(Point(6.5,2.5), 0.75) c.draw(w) Circle is rendered at pixel location (650,250) with radius 75 6

Examples w = GraphWin('test', 801, 401) w.setCoords(0, 0, 800, 400) c = Circle(Point(400,200), 100) c.draw(w) Change (0,0) to lower left with no rescaling of units 7 There are 801 units between 0 and 800, including 0 and 800! (Similarly for height)

Examples w = GraphWin('test', 800, 400) w.setCoords(0, 0, 400, 400) c = Circle(Point(200, 200), 100) c.draw(w) Non-uniform scaling 8

Animating Objects In workshop, you have/will gain experience with animation Animation = illusion of motion created by rapidly displaying still images 9

Example c = Circle(Point(20,200), 20) c.setFill(‘blue’) c.draw(w) speed = 1.0 for x in range(200): c.move(speed,0) speed = 2.0 for x in range(200): c.move(speed,0) speed = 0.5 for x in range(200): c.move(speed,0) 10 Run speed.py

Changing Speed with Constant Distance c = Circle(Point(20,200), 20) c.setFill(‘blue’) c.draw(w) speed = 1.0 for x in range(int(200/speed)): c.move(speed,0) speed = 2.0 for x in range(int(200/speed)): c.move(speed,0) speed = 0.5 for x in range(int(200/speed)): c.move(speed,0) 11 Run distance.py

Moving at an Angle from math import * D = 30 for x in range(int(200/speed)): c.move(speed*cos(radians(D)), \ speed*sin(radians(D))) 12 sine(R) cosine(R) R Run diagonal.py

Text Display & Entry Entry class is like Text, but user can edit Method getText() returns what (if anything) user has typed in the box Need to know when to invoke getText(), e.g. after mouse click: label = Text(Point(200,300), 'Name:') label.setSize(24) label.draw(w) field = Entry(Point(200,200), 10) field.setSize(24) field.draw(w) w.getMouse() s = field.getText() label.setText('You entered:' + s) 13 Run entry.py

Pausing Pause the program: import time pauseDuration = 2 time.sleep(pauseDuration) Displaying dialog: dialog = Text(Point(200,200), ‘To be or not to be?’) dialog.draw(win) time.sleep(2) 14

Displaying Image Files Displaying GIF images: object = Image(centerpoint, filename) Example b = Image(Point(200,200), 'barak.gif') b.draw(win) 15

Cloning b1 = Image(Point(200,200), 'barak.gif') b1.draw(w) time.sleep(0.5) b2 = b1.clone() b2.move(100,100) b2.draw(w) time.sleep(0.5) b3 = b2.clone() b3.move(100,100) b3.draw(w) 16 Run clone.py

Animations Heider & Simmel (1944): An experimental study of apparent behavior. American Journal of Psychology, 57, 243–259. Chuck Jones (1965): The Dot and the Line Henry Kautz (2009): A Heartbreaking Work of Staggering Genius* * title stolen from a book by David Eggers 17