Description
This page is generated from the Processing project folder at /2018/Nguyen_Vincent_Assignment_01/A1Q1/A1Q1.pde.
Archive
No companion assets were found in this sketch folder.
/*
Assignment 01 - The Bouncing Ball
By Vincent Nguyen
STEP 01:
Make a red ball (30 x 30) move from the top of the
screen to the bottom, slowly and smoothly, with a
constant speed (call it ySpeed)
*/
float yPos;
float ySpeed;
void setup() {
size(600,600);
noStroke();
ellipseMode(CENTER);
yPos = 0;
ySpeed = 2;
}
void draw() {
background(0);
fill(#FF0000);
ellipse(300,yPos,30,30);
fill(#FFFFFF,80);
yPos += ySpeed; //Adds speed to position
} This page is generated from the Processing project folder at /2018/Nguyen_Vincent_Assignment_01/A1Q1/A1Q1.pde.
No companion assets were found in this sketch folder.