![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAA-HZtg736lU6jpS_PNDfx0F_vhVia18Zj_vuTPk5NPVfzMV2jQR_rRnE96Xt3OD9Vwa0g3XE4gM2MO9Hlh6ka4-DzSBeQ-XfaUjA1LV-sbEnipaYiCCTcBbWBkjoUR6dWmNOtAYiSqoy/s1600/sier.png)
It's magical and hypnotic to watch the complex fractal of Sierpinski Triangle (like the Legend of Zelda Triforce sign taking acid) emerge from the simple rule of "draw a point, and then the next point is halfway between that last point and any one of the 3 corners, and repeat."
I ran into one clever little bit of p5 I hadn't seen before (and based on the trouble I ran into when I tried to use an old version of the library, must be new) - the random() function now can also take an array-like argument (rather than the typical numeric rangers) and it will return an item randomly selected from that array... very handy!
No comments:
Post a Comment