Coding Challenge #55: Mathematical Rose Patterns

In this Coding Challenge, I attempt to create rose (rhodonea) curves using trigonometry function and polar coordinates. This is based on:

Support this channel on Patreon:

Send me your questions and coding challenges!:

The Coding Train website:

Source Code for the all Video Lessons:


For More Coding Challenges:
For an Intro to Programming using p5.js:

Help us caption & translate this video!






34 responses to “Coding Challenge #55: Mathematical Rose Patterns”

  1. Mostafa Khamis Avatar

    I loved this video so much …. thank you

  2. Benjamin Philippe Avatar

    That french wasn't too bad.

  3. Jerome GB Avatar

    came across the same formula by accident recently. great videos!

  4. Charbel Sarkis Avatar

    hi can anyone help me make this program animated. i want to see every vertex drawn.

  5. Aurelio Ogliari Avatar

    I feel like I have my new obsession…. this just looks way too interesting

  6. vemuganti satvik Avatar

    Can anyone please tell me what coding language is this? (I have no idea)

  7. Max Holford Avatar

    What program does he code in?

  8. Mindseas Avatar

    This was amazing to watch! Couldn't nearly keep up, but I'm so happy you posted this. I have a serious crush with geometrical shapes like these, there's something very pleasing about them. Thanks for posting and being so energetic! 🙂

  9. MrMile40 Avatar

    what is your job in real life ??

  10. Łukasz Herzyk Avatar

    why arent you using es6 features?

  11. Djilani Belila Avatar

    maths + programming = nice and amazing

  12. Joseph Chiang Avatar

    Would you challenge using anti-aliasing tech to draw a line, arc, circle or whatever on none vector graphic map?

  13. Kingfoot__ Avatar

    How would you clean up the close? The line can be taken away but it's still technically a problem. I have it oscillating the values with a nice sin() map, but the line really kills the visual aspect of it transitioning.

  14. MrElLoki Avatar

    Hi Dan,
    thank you for your great work. It inspired me to create a 3D color cube in processing. If you like to have a look at it I created a fork on GitHub
    Cheers, Timo

  15. Justin Ward Avatar

    1) Codes this up.

    2) Gives to girl he loved.

    3) Gets called a weird nerd.

    4) #ForeverAlone

  16. Hayopapayo Avatar

    Hello can someone please tell me which coding language that is? thanks in advance

  17. arie brons Avatar

    dear mr shiffman,

    might i suggest klicking skech/import library as an alternative to uncommentig the HTML file?

  18. HackerZone InfoTech Avatar

    on which programing language u r doing this.!!

  19. gazzaka Avatar

    Great, but whenever his hand gets near his nose, I have a drink 🙂

  20. Handika Syahputra Avatar

    watch all of your videos and sadly I'm here with visual basic and c#. how do I start with js?

  21. Aya Sakuraba Avatar

    Actually, you have a pretty decent french accent, it was completely recognizable. Thanks for the fun mathematical video. Keep up the excellent work, and your contagious good mood ! 😉

  22. Antonytdu82 Avatar

    Je suis français !!! : D

  23. Joseph Carpenter Avatar

    Link for wikipedia is broken you can still easily find what you wanted just had to comment

  24. Paddy McCarthy Avatar

    Please, calm down. Some of your antics detract from your message.

  25. Douglas Allen Avatar

    I have a Ruby Shoes program like this in a gist here.
    I've had this for a long time and even before that did one like this in BASIC on a Radio Shack TRS-80 Model I level II. That's why I'm brain damaged when it comes to programming.

  26. Douglas Allen Avatar

    You should write an extension for VS Code since it is all javascript. see

  27. Halo Gene Avatar

    Your pronunciation of "René Descartes" was good 🙂

  28. MrElLoki Avatar

    If I watch you coding everything seems to be so easy. It makes me a lot of fun 😉 Thank you Dan doing this

  29. Tommy Avatar

    ur videos are sooo good. thank u for making these videos

  30. Yaksh shah Avatar

    do your setup tour.

  31. alvaro obyrne Avatar

    sorry for suggeting that in atom editor with shift-cmd-d one duplicates current line, you copy many lines so i dare

  32. pimmoool Avatar

    Super cool to see a video about this. Like all your other video's I love it!
    A while back I did some experimenting with drawing 'roses':

  33. Ruchir Bapat Avatar

    Your quirky personality brightens my day.

Leave a Reply

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