Advertisement
xeromino

sketch01_a

Oct 17th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function setup() {
  2.   // defining the size of the canvas, in pixels
  3.   createCanvas(900,600);
  4.   // setting the background color, based on the RGB model
  5.   background(50,100,150);
  6.   // stetting the stroke to white: stroke(255,255,255) can be replaced by stroke(255)
  7.   stroke(255);
  8.   // drawing a point
  9.   point(50,50);
  10.   // drawing a line from a first point at x=50,y=100 to a second point at x=150,y=400
  11.   line(50,100,150,400);
  12.   // drawing a random line, width in this case = 900 and height = 600 (see createCanvas)
  13.   line(random(width), random(height), random(width), random(height));
  14.  
  15. }
  16.  
  17. function draw() {
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement