Coding Challenge #30: Phyllotaxis

In this Coding Challenge, I continue one of my favorite subjects: Algorithmic Botany! This video covers the subject of Phyllotaxis, what it is and how it can be used to generate sunflower-like patterns inspired by nature.

Support this channel on Patreon:

Send me your questions and coding challenges!:


Links discussed in this video:
Phyllotaxis on Wikipedia:
Algorithmic Botany – Phyllotaxis:
Phyllotaxis example:

Source Code for the Video Lessons:


For More Coding Challenges:

Help us caption & translate this video!






35 responses to “Coding Challenge #30: Phyllotaxis”

  1. David Portilla Avatar

    i love so much those videos <3

  2. Clint Street Avatar

    From Calgary, you are awesome, I have seen comments stating you are the boss Ross of coding, I have to agree!

  3. Frederico Ludwig Avatar

    if you :
    cx = map(x,0,width,0,255);
    fill(cx % 256,255,220);
    you will have a nice rainbow like your pretty nice channel
    thanks so much

  4. Milenko Petrovic Avatar

    Make rubics cube solver pleaseeee

  5. Luk45135 :D Avatar

    Why do you not use

  6. Nobes Avatar

    I created a cool version from this on my channel

  7. Nobes Avatar

    if you increase n with 0.01 every draw it look awesome!

  8. Samuel Chen Avatar

    how do you run the code in the chrome browser can't seem to get mine to work

  9. Craig the Cat Avatar

    Making everything look super easy!

  10. Akarsh Rastogi Avatar Created a new, gorgeous Pattern with "Vehicles" as points and implemented Steering behaviour algorithms + zoom/reverse target setting, to create BEAUTIFUL GENERATIVE ART..

  11. Adam L. Avatar

    i am really confused with index.html and when forexample i live preview something like snake.js it says that i am missing index.html or something, if you can please explain how i can load my project (preview it on a website) that would be great, thank you

  12. Sam Avatar

    love watching your videos, but HSB takes a hue argument in [0,360] not [0,255], in case you were wondering why your rainbows aren't periodic. keep up the good work!

  13. Won Burgandy Avatar

    This guy is great!

  14. Channing Hurley Avatar

    Could you do a video that goes over you're setup for programs like this? I.e. What editor/ide you use and what languages you use, and maybe a quick getting started guide? I love the vids and I want to do this stuff myself but I've never worked with this language before… just need a starting point

  15. W Boumans Avatar

    Why is it so slow? I would assume it would be instant.

  16. PsychoPhluff Avatar

    Here is a little something I did with quite a bit of workaround via processing.

  17. Maja Kawaliło Avatar

    can anyone help me with "Cannot find a class or type named "var" ? I am noob yes

  18. morlai kamara Avatar

    pls help, i want to download p5js on my windows 10, but when i go i cant find the p5js EDITOR.

  19. Casey Wyker Avatar

    Dont know if theres already an answer to this but is it possible to use p5.js on windows? Last time I tried downloading it off the website it said that p5 couldnt be executed

  20. Faith Wilkins Avatar

    how do you do this in processing?

  21. Krondelo Avatar

    Daniel I've recently discovered your videos. Amazing stuff! It really makes me wish I was better/understood math better, but I'm going to school for that. I love programming visual stuff like this so these are great!

  22. Anon Ymous Avatar

    HSBs H goes from 0 to 360, so you may have noticed it changing from blue to red (255 is a bluish color). Just pointing that out!

  23. BoaZosen Avatar

    Dude you are the one from my book! Learning Processing! Great book and channel 😀

  24. John Smith Avatar

    To be honest I dont understand shit on those formula.

    I may have ignored this on my school, didnt knew it was important.

    What should I study to be able to understand this?

  25. Flamouye Avatar

    It's so cool to watch your videos and learn how to program.
    Here's a rainbow coloured pattern just for you
    (it's fullscreen !)

  26. James Dean Avatar

    Lol nice!! Go Dino's!!

  27. Franklin Hunt Avatar

    This coding challenge was awesome 🙂 simple enough for me to make in processing

  28. Tim Glenn Avatar

    Wow I was looking for an algorithm to generate a galaxy and all his time it was a flower pattern

  29. Deepak Singh Avatar

    Ii have nature of code book but i didnt know that we have a playlist on youtube.
    Thank you

  30. TheLordIsMyStrength Avatar

    This angle is an approximation of (360/ Phi^2) or (360 / (Phi+1))
    Phi = Golden Ratio = [ 1 + Sqrt(5) ] / 2

  31. Jawhar Azzoun Avatar

    how to change angle mode on processing 3 ?

Leave a Reply

Your email address will not be published. Required fields are marked *