Using Coordinate Geometry to Create Moving Images In unit 29 we created a simple drawing for the background of a children’s game. We are going to start.

Slides:



Advertisements
Similar presentations
Using Microsoft PowerPoint in the Classroom
Advertisements

Creative Computing. \\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position.
To get to the moodle site the first thing you want to do is to go to the Great falls Public Schools Web site. Once you arrive here, you will want to click.
HTML Tags and Their Functions
Introduction to Programming
A Quick Introduction to Processing
Processing Lecture. 1 What is processing?
Checkers: Setting the Board Checkers and chess use an 8 by 8 board. Each box on the board alternates colors with the box next to it. The designer may choose.
 By carefully incrementing the X and/or Y values of our set of lines, we can create a game board for a boat game.  Lines that go from left to right are.
Introduction to Animation Programming Our next set of exercises will look at animation on the following link:
Click your mouse for next slide Dreamweaver – Colors and Page Properties So far things are going just dandy aren’t they? You’ve been following FST’s fun.
TITLE SHOULD BE ALL CAPS AND AROUND 75 FONT Author’s names should be around 62 pt font Emporia State University, Department of [enter department name here]
Aim: Use the given examples to record examples and our own ideas in our journal 1.Write technical examples in journal and/or participate in full.
Initializing The HTML Our initial HTML calls upon the API (application programming interface) and sets up the body of the page for use. We can make improvements.
Battleships Recognize Impact In this example, we will establish a Boolean variable (true or false) to decide if the boat has been hit. Then, we will adjust.
Clip Art Where to find it. How to use it.. Clip Art is previously created illustrations and graphics that you can use as is, or modify by ungrouping,
Introduction to Shape Programming When we make geometric shapes with computers, we have to give specific numbers to tell the computer exactly what to do.
 As you complete the assignment, go in order as the earlier bulleted parts provide an easier opportunity for points than the later.  This project is.
1.Learning the Terms Learning the TermsLearning the Terms 2.Accessing the Internet from a PC Accessing the Internet from a PCAccessing the Internet from.
Accessing the McDougal Littell Online Books. 1.Select High School Math 2.Select TX 3.Select GO 4.After the first time, the book you choose will appear.
Responsive Battleships The battleship animation we created needs to respond to user input to be considered a game. The user will be able to launch an attack.
GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.
Acadia Institute for Teaching and Technology Basic Web Page Design for Courses.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 41 How Animation on the Web Works.
JQuery Page Slider. Our goal is to get to the functionality of the Panic Coda web site.Panic Coda web site.
Creating an Attractive Site How will your site look. Think about what your customers are seeking and what type of Web site they find attractive.
Introduction to TouchDevelop
Click your mouse for next slide Flash – Introduction and Startup Many times on websites you will see animations of various sorts Many of these are created.
Web-designWeb-design. Web design What is it? Web-design features Before…
Animating Coordinate Geometry In this unit we will expand upon our knowledge of using counters to create motion pictures. By using incremental mathematics,
Locally Edited Animations We will need 3 files to help get us started at
1 Essential HTML coding By Fadi Safieddine (Week 2)
Spiral Rider PAGE 1. Set Up Scene 1.Add Stage-underwater scene 2.Add crab sprite 3.Add two fish sprites PAGE 2.
Game 1: Mr. Happy’s Quest For our original canvas, we had designed a child’s background using simple shapes. For this project, we will add objects that.
Getting Started with Canvas IDIA Spring 2013 Bridget M. Blodgett.
USER Guide. Why the Web Site To facilitate communication between The Board, Management and the Residents Educate and Inform Give insight to the residents.
Getting Started With HTML HTML code needs an editor for a programmer to be able to use. We can use Notepad on a PC or TextEdit on a Mac. However, it is.
Learn about the types of Graphics that are available Develop a basic Graphics applet Develop a basic Graphics application Review the Java API and use.
Getting Started with HTML Please use speaker notes for additional information!
Lesson 8. Test 1 Topics Browser incompatibility Design Tips Site Navigation Browser- safe color Monitor resolution Content Copyright Use of tables vs.
 HTML is hypertext markup language. It is a way for people to display their information with more complex pictures and text displays. Before HTML, messages.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Creating Art With Simple Shapes By carefully implementing simple shapes to an HTML canvas we can create useful graphics. With enough time, lines, ellipses.
Learning Unity. Getting Unity
CIS 3.5 Lecture 2.2 More programming with "Processing"
2-D Shapes, Color, and simple animation. 7 Basic Shapes Ellipse :: ellipse() Arc :: arc() Line :: line() Point :: point() Rectangle :: rect() Triangle.
Project Two Adding Web Pages, Links, and Images Define and set a home page Add pages to a Web site Describe Dreamweaver's image accessibility features.
Photoshop Image Slicing. Reasons to Image Slide To create links out of sliced images To optimise different areas. (flat areas of colour, such as logos,
Grade 4 Science.  -Click Start  -Click Programs  -Click IHMC Cmap Tools  -Click Cmap Tools.
Continuous. Flow of Control Programs can broadly be classified as being –Procedural Programs are executed once in the order specified by the code varied.
Graphics Primitives in Processing 1/14/2010. size(x, y) ; Sets the initial size of the screen Units are in pixels –Pixel == picture element –Small dots.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Motion Graphics & Animation.
Positioning Objects with CSS and Tables
What’s OPAC? A Guide to Acadia’s Online Catalogue.
TechKnowlogy Conference August 2, 2011 Using GoogleDocs for Collaboration.
Sound and more Animations
TITLE GOES HERE Your Subtitle PROFESSIONAL STARTER BUSINESS UNLIMITED
TITLE GOES HERE Your Subtitle PROFESSIONAL STARTER BUSINESS UNLIMITED
1.01 Investigate graphic types and file formats.
Web-design.
TITLE GOES HERE 03 OPTION 04 OPTION 02 OPTION 01 OPTION Your Subtitle
Chapter 7 Functions.
Chapter 7 Functions.
Creating & Working with Clipping Masks
The Canvas.
TITLE GOES HERE 03 OPTION 04 OPTION 02 OPTION 01 OPTION Your Subtitle
Using Netscape Page Composer
Lecture 7: Introduction to Processing
Tips on good web site Design
Moving Sprites at Random
Presentation transcript:

Using Coordinate Geometry to Create Moving Images In unit 29 we created a simple drawing for the background of a children’s game. We are going to start to move some of the objects in the game.

var x = 700; void draw() { fill(200,200,0); ellipse(x,100,150,150); x=x+1; }

Changing Directions on the End of the Screen void draw() { if(x>800) t = -t; if(x<0) t = -t; //other draw code }

 Use the example code to make it so that the sun or any object bounces back and forth on the simple picture.  Increase the aesthetics of the movement by altering the speed, colors, reducing the “smear” affect and/or improving the look of the picture.

Review Using Coordinate Geometry to Create Moving Images Moving the Sun Right Changing Directions on the End of the Screen Practice 1

Moving the Star The star is a very complicated set of lines that will require significant changes to create aesthetically pleasing results. Remember, the line consists of 4 variables that says the first X the first Y then the second X and the second Y. X moves right and left. Y moves up and down.

void draw() { background(255,255,255); //top left part of star line(x,0,300,300); line(x,20,280,300); line(x,40,260,300); //many more lines x=x+t; }

Bouncing Off the Walls var x = 300; var t=1; void draw() { if(x>600) t = -t; if(x<0) t = -t; //other code }

 Make the star stretch back and forth by altering the X values of the first coordinates in the lines.  Improve the aesthetics of the drawing with original colors, settings and placement.  Note: there are many other ways the star can be moved by changing the variables. Experiment with them.

Driving Up the Road The screen has a limited amount of room that does not allow the car to drive very far. Instead of moving the car, we can move the road in the opposite direction and give the illusion of the car moving.

var y = 0; void draw(){ background(100,100,100); stroke(255,255,0); y = y + 1; if (y>50) y = 0; //other code }

Lines With Variables line(150,y+0,150,y+50); line(150,y+100,150,y+150); line(150,y+200,150,y+250); Line(150,y+300,150,y+350);

 Create the illusion of the car moving up by having the road move down.  Improve the aesthetics of the road and the car by adding details.  Make the car bounce left and right using the same concepts from previous practices.

Review Driving Up the Road Changing the Variables Lines With Variables Practice 3, 20%

Aircraft Through the Sky The aircraft will move through the sky until it gets to the end of the screen. However, this is not very far, and a good programmer can take steps to give the illusion of further movement. By having the background move left, a programmer can give the illusion of the aircraft moving right.

Moving the Background tx = 800; x = 0; void draw(){ background(50,50,255); //tree noStroke(); fill(102,51,0); rect(tx-10,350,20,200); fill(0,255,0); ellipse(tx,375,150,100); tx = tx - 10; if (tx < 0) tx = 1200; //other code }

Moving the Airplane //jet strokeWeight(2); stroke(120,120,255); fill(110,111,200); rect(x+150,150,100,100); triangle(x+200,100,x+200,300,x+400,200); triangle(x+100,125,x+100,275,x+200,200); x= x+1; if (x>800) x = 800;

Practice 4, 20% The aircraft should move towards the right until it gets to the end of the screen. The tree and/or other background elements should continue and repetitiously move left. Improve the aesthetics of both the aircraft and the background to make the scene look more realistic.

Review Aircraft through the Sky Moving the Background Moving the Airplane Practice 4, 20%

Accessing Online Documents The program we are using refers to two online documents to create functionality on our graphics scripts. To make our games load faster, we should get a copy of these online documents and keep them locally. Additionally, it is good practice to keep documents locally called in case the other web site stops working.

Accessing the Documents Locally The program’s head element currently calls for documents like this: Get a copy of the document, safe it locally and then call it with the src = “/processing.js“ ***note, there are TWO files to change like this***

Linking to the Index When some one is done with our current web page, we don’t want them to leave our company completely. Students should give the end user an option to go back to their index so that other parts of the web site can be explored. Click here to see more great stuff

Linking From the Index to the File Our index file lists all the great stuff we have created on our web site. It is important to update the index to reflect the new projects we have added. We can cheat ourselves out of credit if we do good work and then no one knows about it.

Review Accessing Online Documents Accessing the Documents Locally LInking to the Index Linking From the Index to the File

Happy Drawing size(800, 600); background(00,00,200); fill(200,200,0); ellipse(700,100,150,150); stroke(0,200,0); strokeWeight(4); fill(0,200,0); rect(0,400,800,400); fill(200,200,200); stroke(200,0,200); rect(400,250,200,200); triangle(395,250,500,200,600,250); size(600, 600); background(255,255,255); stroke(0,0,255); strokeWeight(1); //top left part of star line(300,0,300,300); line(300,20,280,300); line(300,40,260,300); line(300,60,240,300); line(300,80,220,300); line(300,100,200,300); line(300,120,180,300); line(300,140,160,300); line(300,160,140,300); line(300,180,120,300); line(300,200,100,300); line(300,220,80,300); line(300,240,60,300); line(300,260,40,300); line(300,280,20,300); line(300,300,0,300); //bot left part of star line(300,600,300,300); line(300,580,280,300); line(300,560,260,300); line(300,540,240,300); line(300,520,220,300); line(300,500,200,300); line(300,480,180,300); line(300,460,160,300); line(300,440,140,300); line(300,420,120,300); line(300,400,100,300); line(300,380,80,300); line(300,360,60,300); line(300,340,40,300); line(300,320,20,300); line(300,300,0,300); size(300, 1600); background(100,100,100); stroke(255,255,0); strokeWeight(10); line(150,0,150,50); line(150,100,150,150); line(150,200,150,250); line(150,300,150,250); line(150,400,150,350); line(150,500,150,450); line(150,600,150,550); line(150,700,150,650); line(150,800,150,750); line(150,900,150,850); line(150,1000,150,950); line(150,1100,150,1050); line(150,1200,150,1250); noStroke(); fill(0,0,0); rect(35,55,100,30); //tires rect(35,200,100,30); fill(200,50,50); rect(40,50,90,200);//car size(1200, 500); background(50,50,255); //jet strokeWeight(2); stroke(120,120,255); fill(110,111,200); rect(150,150,100,100); triangle(200,100,200,300,400,200); triangle(100,125,100,275,200,200);