Nikos
June 24, 2020, 4:12pm
1
Hello! I’m a newbie on processing and I have a question about an academic exercise. I want to make diagonal points with degrading strokeWeight(starting at point 0,0 with the bigger point). I must use this semi completed program :
void setup {
size(400, 400);
background(0);
stroke(255);
if( int y = 400; y > 0; y-=10) {
strokeWeight(y*____);
point(y-400, y-400);
}
}
I have to fill the parenthesis in strokeWeight.
glv
June 24, 2020, 10:59pm
2
Fill it in and see what happens!
This will require a bit more work than that.
One of the best tools in a programmers tool chest is knowing the resources available to you and learning to navigate and use them.
This is a very short list:
Resources < Click here to expand !
I encourage you to review the resources available here:
:)
you have to decrement the size in a for loop, also the code block needs to be in draw. Can’t say anymore than that as its an assignment. Good luck.
1 Like
You have to try things and observe. It’ll make you feel like a scientist when you get it right.
1 Like
why would the code need to be in draw()
?
1 Like
Nikos:
void setup {
size(400, 400);
background(0);
stroke(255);
if( int y = 400; y > 0; y-=10) {
strokeWeight(y*____);
point(y-400, y-400);
}
}
it doesnt, I forgot you can draw straight from setup
2 Likes