ICM week 4 : For Loop

ICM week 4 : For Loop

Using for loop is kind of changing my way of think about drawing up side down and make me understand how to actually use P5 much better since I always approach drawing in a doodle / rough sketch way. Though, thinking about the final sketch first is also interesting.

Screen Shot 2019-10-03 at 1.50.32 PM copy.png

I try to drew the rectangle first and rotate it in for loop but coundn’t manage to do it so I try to use quad() instead. Anyway, for using quad I need to read back about sin, cos, tan and ended up using sqrt() for square 2 which is pretty confusing to understand since it can not use as a global variable.

Funniest topic I learnt this week

Funniest topic I learnt this week

So here is the code I ended up with :

Screen Shot 2019-10-03 at 2.03.32 PM.png