Drawingwithcode
Drawingwithcode
Tipo Lectura
Revisado
NOTAS
Think about the dimensions of the
window you’re drawing on.
Usually, the predetermined width for a window is 640, and the height is 360.
So the center coordinates would be (320,180)
When you highlight a function, you can right click it and select “Find in
reference” to find it in the reference page of processing.
Every shape has a reference point. For the circle, its the center. For the
square, its the top left. If you want to change it, you have to change the
rectMode to center.
Processing takes the order of lines you are writing the code in, and layering
the visuals on top of each other.
COLOR
background ( )
stroke ( )
fill ( )
Color as an argument -
RGB
1. Red
2. Green
3. Blue
Remember to check the order of the code. It will change the properties of the
shape above the lines, or all together if it is above any shape command.
COLOR MODES
There are other ways to define color. how yo define it is called “Color mode”.
colorMode ( )
Other arguments:
noStroke ( )
noFill ( )
ALPHA TRANSPARENCY
In actuality, the pixels aren’t really transparent, but the program recognizes the
effect you want it to have and does some math to apply a color that merges into a
“transparent” effect.
2 are important because they’re directly related to the primary language of the
computer: Binary code-
DUDAS
RESUMEN