Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup() {
- createCanvas(900, 600);
- background(50, 100, 150);
- // drawing at rectangle, starting at x=100, y=100
- // uncomment rectMode(CENTER) if you want the x and y to be the center of the rectangle
- // rectMode(CENTER);
- rect(100, 100, 50, 50);
- // drawing an ellipse at the same location
- ellipse(100, 100, 50, 50)
- // drawing an ellipse with its center at the bottom right
- ellipse(width, height, 100, 100);
- // drawing an ellipse in the middle of the screen
- ellipse(width/2, height/2, 100, 100);
- // drawing an ellipse at a random location
- ellipse(random(width), random(height), 50,50);
- }
- function draw() {
- }
Add Comment
Please, Sign In to add comment