- - Specifying pixel coordinates
- - Basic shapes: point, line, rectangle, eliipse
- - Color: grayscale, "RGB"
- - Color transparency
alpha: 0 being completely transparent (0% opaque) ans 255 completely opaque (100% opaque).
Processing
- - pmouseX: previous mouseX location
- - pmouseY: previous mouseY location
mousePressed(): Handles mouse clicks
keyPressed(): Handles key presses
frameRate(): which requires an integer between 1 and 60, enforces the speed at which Processing will cycle through draw(). frameRate(30) means 30 frames per second, a traditional speed for computer animation. If you do not include frameRate(), Processing will attempt to run sketch at 60 frames per second. Since computers run at a different speeds, frameRtae() is used to make sure that your sketch is consistent across multiple computers.
Color for given shape needs to be stored in the computer's memory. This memory is just a long sequence of 0's and 1's (a whole bunch of on or off switches). Each one of these switches is a bit, eight of them together is a byte. Imagine if we had eight bits in sequence - how many ways can we configure these switches? The answer is 256 possibilities, or a range of numbers between 0 and 255. We will use eight bit color for your grayscale range and 24 bit for full color (eight bits for each of the red, green, and blue color components).
No comments:
Post a Comment