topical media & game development
graphic-processing-learning-04-example-4-6-example-4-6.pde / pde
// Learning Processing
// Daniel Shiffman
// http://www.learningprocessing.com
// Example 4-6: Ellipse with variables
// Declare and initialize your variables!
float r = 100;
float g = 150;
float b = 200;
float a = 200;
float diam = 20;
float x = 100;
float y = 100;
void setup() {
size(200,200);
background(255);
smooth();
}
void draw() {
// Use those variables to draw an ellipse
stroke(0);
fill(r,g,b,a); // (Remember, the fourth argument for a color is transparency.
ellipse(x,y,diam,diam);
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.