Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup() {
- // defining the size of the canvas, in pixels
- createCanvas(900,600);
- // setting the background color, based on the RGB model
- background(50,100,150);
- // stetting the stroke to white: stroke(255,255,255) can be replaced by stroke(255)
- stroke(255);
- // drawing a point
- point(50,50);
- // drawing a line from a first point at x=50,y=100 to a second point at x=150,y=400
- line(50,100,150,400);
- // drawing a random line, width in this case = 900 and height = 600 (see createCanvas)
- line(random(width), random(height), random(width), random(height));
- }
- function draw() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement