Difference between revisions of "Graphics With Processing II"

From CompSciWiki
Jump to: navigation, search
Line 6: Line 6:
 
When you draw anything, the method draw is actually called repeatedly to form the shape.  
 
When you draw anything, the method draw is actually called repeatedly to form the shape.  
  
 +
{{CodeBlock
 +
|Code=PImage img;
  
 +
void setup()
 +
{
 +
  img = loadImage("Stairs3.jpg");
 +
  size(480,320);
 +
  frameRate(15);
 +
}
 +
}}
 
}}
 
}}

Revision as of 11:19, 3 April 2012

COMP 1010 Home > Back to Extra Labs

Introduction

In this lab, we'll learn how to create animation using Processing language.

Step 1: Setting up the animation with frame rate

When you draw anything, the method draw is actually called repeatedly to form the shape.

 PImage img;

void setup()
{
  img = loadImage("Stairs3.jpg");
  size(480,320);
  frameRate(15);
}