xeromino

sketch02_a

Oct 17th, 2016
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function setup() {
  2.   createCanvas(900, 600);
  3.   background(50, 100, 150);
  4.   // drawing at rectangle, starting at x=100, y=100
  5.   // uncomment rectMode(CENTER) if you want the x and y to be the center of the rectangle
  6.   // rectMode(CENTER);
  7.   rect(100, 100, 50, 50);
  8.   // drawing an ellipse at the same location
  9.   ellipse(100, 100, 50, 50)
  10.   // drawing an ellipse with its center at the bottom right
  11.   ellipse(width, height, 100, 100);
  12.   // drawing an ellipse in the middle of the screen
  13.   ellipse(width/2, height/2, 100, 100);
  14.   // drawing an ellipse at a random location
  15.   ellipse(random(width), random(height), 50,50);
  16.  
  17. }
  18.  
  19. function draw() {
  20.  
  21. }
Add Comment
Please, Sign In to add comment