Jupyter at Bryn Mawr College |
|||
Public notebooks: /services/public/dblank / CS110 Intro to Computing / 2017-Fall / Notebooks |
Welcome to CS110: Introduction to Computing!
Jargon:
rect()
x, y, width, height
rect(20, 20, 40, 40);
You did it! You wrote your first Processing program, or sketch.
But it doesn't look exactly like our idea above. We'd like for the square to be black.
Another function: fill()
Another argument: grayscale, representing how much lightness:
Anything between 0 and 255 is a shade of gray, the larger the number, the lighter the gray. There are a total of 256 shades of gray counting 0, to 255.
fill(0);
rect(20, 20, 40, 40);
%activity /home/dblank/activities/01-intro