...
Code Block |
---|
int length1 = 150; int length2 = 200; size(300,300); // define window size background(0); // define background colour stroke(255,255,255); // define line colour line(100,10,100,length1); // draw a line line(150,10,150,length2); line(200,10,200,250); fill(0,0,0); // fill colour strokeWeight(5); // line thickness ellipse(100,length1,50,50); // draw an ellipse ellipse(150,length2,50,50); // draw an ellipse noFill(); // turn off fill ellipse(200,250,50,50); // draw an ellipse |
Exercise 2:
Take your results form exercise 1 and modify your code to use variables. Create a variable X and variable Y that can be used to position your graphic on the screen.