8.2: Fractal Recursion – The Nature of Code

This video looks at how to write functions in Processing that call themselves (recursion) for the purpose of drawing fractals.

(If I reference a link or project and it’s not included in this description, please let me know!)

Read along:

Cantor Set:
Serpinski Triangle:

Help us caption & translate this video!


17 responses to “8.2: Fractal Recursion – The Nature of Code”

  1. Final172 Avatar

    This person isa nerDDDDDDDD

  2. Julian Puppo Avatar

    Here´s fractal with infinite zoom .

    boolean flag;
    int count=0;
    int acc=50;
    double space=0.5;
    int stop=0;

    float angle;
    void setup() {
    size(600, 600, P3D);

    void draw() {
    println("FrameRate: ", frameRate);

    acc = int(map(mouseX, 0, width, -20, 20));
    if (count < 0) count += stop;
    //VARIABLE DEL MAGICO EFECTO DEL ZOOM : width*2+count%stop



    drawCircle(width/2, height/2, width*2+count%stop);


    void drawCircle(float x, float y, float radius) {
    ellipse(x, y, radius, radius);
    if (radius >20) {
    drawCircle(x + radius/2, y, radius/2);
    drawCircle(x – radius/2, y, radius/2);

  3. AboutDisneyFriendsGa Avatar

    Have you ever used grasshopper?

  4. LiquidAtom Avatar

    holy shit illuminati

  5. Dukkhan Avatar

    "You can stop the video now because you've probably done enough."
    Yeah right, because anyone who's made it that far isn't absolutely fascinated with your lessons.

  6. realcygnus Avatar

    loving this channel !……so neither the processing or the p5 IDEs have any form of an intellisense(I think thats what M$ calls theirs) ? to auto-list available items etc…or a type prediction or way to find other references of highlighted area etc…..I could swear i seen it active in one of you vids…….was it a different IDE….what was it ……& was it for pde or p5 or both ?…. does anyone know?

  7. Marko Ib Avatar

    Many thanks for the vids Dan, I appreciate them a lot 😀

  8. Angie K Avatar

    You're amazing :')

  9. Amit Thakkar Avatar

    this is wrong, you make coding sound like fun. 😀 .

  10. Onechill Braj Avatar

    WARNING!!! Do not google monster curve. NSFW

  11. Nishka Arora Avatar

    Hey! Do you think you could do a series on D3? I really like the way you teach and can't really find any good youtubers for D3. Thanks!

  12. Latif Guliyev Avatar

    Thanks for great tutorial, are there any IDE for Fractals or any apps that can use?

  13. DLC ENERGY Avatar

    12:09 The matrix is lagging again…

  14. oglop Avatar

    how could you learn all this?

  15. J Maelstrm Avatar

    Ever use Incendia EX?

  16. Fabrixe Kanart Avatar

    Great content quality

  17. DiamanteKlopman Avatar

    This videos are great, I wish they soon get the amount of views something this good deserve.

Leave a Reply

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