I would like to know
1 Like
hi
read this
https://processing.org/reference/fill_.html
https://forum.processing.org/two/discussion/2866/simple-paint-program
Thanks jafal,
I’m familiar with the function fill().
My question was specific about triangle.
I know I can draw an ellipse or rectange, but I want to draw filled triangle
see this move your mouse
void setup () {
size (600,600);
colorMode(HSB);
}
void draw(){
for(int i= 500; i >0; i=i -2) {
fill((i/5) + (mouseX/3), 225,255);
//rect(i,1,i,height);
triangle(30, 75, 58, 20, 86, 75);
}
}
edit
2 Likes
Hello @yalaniv,
A good place to start looking is here:
Click here for resources
I encourage you to look at the resources available here:
Beginner
- The Processing website has references , examples , tutorials , etc.
https://processing.org/ - The Processing PDE (IDE) has lots to offer!
An exploration of the menu items will reveal what is available!
You will find libraries , tools , examples and more!
For example:
- The Coding Train
https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw
https://thecodingtrain.com/ - Happy Coding
https://happycoding.io/tutorials/processing/
Advanced
- The source code can give insight if you are adventurous:
GitHub - processing/processing: Source code for the Processing Core and Development Environment (PDE)
Many of the Processing functions are here:
https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java - And the Internet.
The references have all the shapes with examples.
:)
triangle() is the things I’ve been looking for but didn’t know it exist
Thanks