Processing is for writing software to make images, animations, and interactions. The idea is to write a single line of code, and have a circle show up on the screen.
Code:
void setup(){
size(480,120);
ellipse(50,50,60,60);
}
}
The size(width,height) function has two parameters: the first sets the width of window and the second sets the height of window.
The ellipse(x,y,width,height) function has four parameters: the first sets the x-coordinate of center, the second sets the y-coordinate of center, the third sets the width of ellipse and fourth sets the height of ellipse. The x and y coordinates for ellipse are the center of the shape. Processing doesn't have separate functions to make circle. To make this shape, use the same value for the width and the height parameters to ellipse().
No comments:
Post a Comment