Coding Challenge

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 95

  • @phrebh
    @phrebh 5 років тому +24

    I've been recreating this in every language I've learned since the early 90s when I first played it with an actual marker and six-sided die. Including a Windows 95/98 screensaver written in VB3 (that's not a joke). Great video!

    • @Brahvim
      @Brahvim 3 роки тому +2

      :0
      Immediate edit: a very nicely running gaming channel, I see, Sir.

  • @Mavhawk64
    @Mavhawk64 3 роки тому +1

    THIS IS AMAZING!!! I CANNOT BELIEVE HOW PERFECT THIS IS.

  • @silviodc1309
    @silviodc1309 5 років тому +1

    your enthusiasm is incredible!

  • @Israel220500
    @Israel220500 5 років тому +16

    By coincidence I watched the chaos game video on Numberphile a couple days ago and found it pretty interesting.

    • @UnitSe7en
      @UnitSe7en 5 років тому +3

      That's not coincidence - That's UA-cam algos.

    • @Israel220500
      @Israel220500 5 років тому

      @@UnitSe7enNot quite. The coincidence I was referring is not the UA-cam recommending me this video, but the fact that Dan Shiffman made a video on the subject just some days after I watched the Numberphile video.

    • @UnitSe7en
      @UnitSe7en 5 років тому +1

      @@Israel220500 The machinations of the Universe and it's sense of ironic humour.
      Video ID *fUsePzlOmxw* for some more chaos goodness.

  • @jenner247450
    @jenner247450 5 років тому +1

    Something amasing. I tried similar thing in 2d editor, make a some 3x3 rule box (black point - set rule, white point - not set), and rule was to place rule box into bigger cell (by step equal of width/height of rule box). in case of rule box is black and central point is white - we have a Menger sponge. In case of diagonal white dots - we have a slightly tilted Koch snowflake. So on.

  • @shubhamkhare8749
    @shubhamkhare8749 5 років тому +16

    One day I'll be capable enough to code like you do, kind sir

  • @bourneaparte
    @bourneaparte 5 років тому +3

    10:25 Trifor- oh, yeah, right, Serpinski Triangle...

  • @jahquantum420
    @jahquantum420 5 років тому

    OOH man! this program is so excitement, thank you for doing this, I remember program this sierpinsky triangle in c++ years ago. Now I will try do this caos in Python! :D Greetings from Mexico!!

  • @fedot_compot180
    @fedot_compot180 5 років тому

    Looool i'v already done this by myself in python last year😂
    You are the beeest😘

  • @lowercase_
    @lowercase_ 5 років тому

    Thank you for this tutorial, Alan.

    • @Brahvim
      @Brahvim 3 роки тому

      ...is that your name or-
      The name of the person teaching here is "Professor Daniel Shiffman" from the ITP, NYU.

  • @kubaissen
    @kubaissen 5 років тому

    That wos realy nice. Waiting for more!!

  • @an0nsaiko890
    @an0nsaiko890 5 років тому +52

    What if you did the same thing but in 3d space

    • @felixbrumm9699
      @felixbrumm9699 5 років тому +2

      i think its much more complex to let the points randomly move around on a 3 dimension.

    • @an0nsaiko890
      @an0nsaiko890 5 років тому +6

      @@felixbrumm9699 It may be, but It would be really interesting to see what would happen.

    • @madkinggaming3744
      @madkinggaming3744 5 років тому +6

      An0nSaiKo working on it now using unity

    • @JocelynDaPrato
      @JocelynDaPrato 5 років тому +3

      It will work for sure. Here a test I did after doing the Sierpinsky triangle, I thought my self what if I move randomly the 3 vertices but also play with the indice of fraction (because the seirpinsky is vertex to vertex divided by 2) here I animated the divided by. Creating an illusion of 3d. ua-cam.com/video/wXilfmrXq9E/v-deo.html

    • @Rocknoob49
      @Rocknoob49 5 років тому +1

      Try doing the same thing with 4 starting points ;)

  • @bastienpabiot3678
    @bastienpabiot3678 5 років тому +6

    Coding is fun

  • @MahmudulHasan-du2nw
    @MahmudulHasan-du2nw 5 років тому +2

    Really enjoy your video, man...though I don't understand anything of your programming😁

    • @TheCodingTrain
      @TheCodingTrain  5 років тому +1

      You can start here! ua-cam.com/users/shiffmanplaylists?view=50&shelf_id=2&sort=dd

  • @codechapter6960
    @codechapter6960 5 років тому

    "numberfIIIle video" nice vid

  • @diederikgeertzen9469
    @diederikgeertzen9469 5 років тому

    Could you please make a video about test driven development and robustness. It's a really great way to make a program to work!

  • @brucewayne.2003
    @brucewayne.2003 5 років тому

    Make a video just changing the parameters or adding lines or something, coding it's awesome.

  • @funkyb6598
    @funkyb6598 5 років тому

    Tic-tac-toe minimax!

  • @vlmarshal3527
    @vlmarshal3527 5 років тому +1

    good video

  • @xDMan131
    @xDMan131 5 років тому +16

    4:01 thank me later

  • @roscocsa
    @roscocsa 5 років тому +1

    Sorry to hear about your new X.

  • @NeoxX317
    @NeoxX317 5 років тому

    hahahaahahahaahaha that songggg !!! made me laugh !!! love your channel

  • @my_artysytd9776
    @my_artysytd9776 5 років тому

    Hello! I really like computers and someday I want to learn Java too!

  • @GeeVaaz
    @GeeVaaz 5 років тому

    Dan is now being careful to not pronounce the variables 'cx' =P

  • @davutsauze8319
    @davutsauze8319 4 роки тому +1

    I managed to do 3D Sierpinski triangle by accident while I was trying to make the code able of generating any chaos game depending on the number of dots, the code is in the description (put the slider's value at 4)

    • @davutsauze8319
      @davutsauze8319 4 роки тому

      let pointsArray = [];
      let pointsLength = 3;
      let x, y;
      let slider;
      function setup() {
      colorMode(HSB);
      createCanvas(windowWidth, windowHeight);
      slider = createSlider(0, 20, 3, 1);
      background(0);
      angleMode(RADIANS);
      strokeWeight(8);
      stroke(255);
      for(var i = 0; i < pointsLength; i++){
      pointsArray.push(createVector((cos(PI / pointsLength * i * 2) + 1) * (width / 2), (sin(PI / pointsLength * i * 2 ) + 1) * (height / 2)));
      point(pointsArray[i].x, pointsArray[i].y);
      }
      x = random(width);
      y = random(height);
      }
      function draw() {
      if(pointsLength != slider.value()){
      pointsLength = slider.value();
      pointsArray.splice(0, pointsArray.length-1);
      print(pointsLength);
      background(0);
      strokeWeight(8);
      stroke(255);
      for(var i = 0; i < pointsLength; i++){
      pointsArray.push(createVector((cos(PI / pointsLength * i * 2) + 1) * (width / 2), (sin(PI / pointsLength * i * 2 ) + 1) * (height / 2)));
      point(pointsArray[i].x, pointsArray[i].y);
      }
      x = random(width);
      y = random(height);
      }
      for(let a = 0; a < 100; a++){
      strokeWeight();
      let r = floor(random(pointsLength + 1));
      for(let i = 0; i < pointsLength; i++) {
      point(x, y);
      if(r == i){
      stroke(255 / (pointsLength - 1) * i, 255, 255);
      x = lerp(x, pointsArray[i].x, 0.5);
      y = lerp(y, pointsArray[i].y, 0.5);
      }
      }
      }
      }

  • @anteconfig5391
    @anteconfig5391 5 років тому

    This is crazy

  • @codechapter6960
    @codechapter6960 5 років тому

    OMG the like to dislike ratio is more than 220 to 1 well done !!!!!!!!!!!!

  • @nishantingle1438
    @nishantingle1438 5 років тому +1

    We would like to see one playlist on solving real world problems with #dataStructures (basic to expert :p ).

  • @Mempler
    @Mempler 5 років тому

    Greetings from the legend of zelda.

  • @lillyanjohnson5545
    @lillyanjohnson5545 5 років тому

    I call that the infinite triforce.

  • @khushitshah979
    @khushitshah979 5 років тому +1

    Hey, would you like to share your secret.from where you fine these challenges? I also wanna solve some without watching video pls

    • @TheCodingTrain
      @TheCodingTrain  5 років тому +1

      People suggest them here! github.com/CodingTrain/Rainbow-Topics/issues

  • @swinbtr
    @swinbtr 5 років тому +2

    I did this in python's turtle module when I was 14

  • @welliton7924
    @welliton7924 5 років тому

    Coding the Triforce, Zelda fans would say.

  • @jesusmarcano1640
    @jesusmarcano1640 5 років тому

    nice triforce

  • @WildAnimalChannel
    @WildAnimalChannel 5 років тому

    If you have a low calorie diet you will be thin and hyperactive and also live a long time. This is why I think Dan will live to 100 years old.

  • @josvromans
    @josvromans 5 років тому +2

    I played with the Chaos Game as well, from triangles to 15-gons as starting points, and using different percentages.
    Just uploaded an animation to my new channel. More variations are coming soon!
    Please have a look, cheers!

    • @josvromans
      @josvromans 5 років тому

      Thank you very much for the highlight!
      (too bad that I have to figure out how to not loose so much quality after the video upload, but I will improve soon)

  • @proxy1035
    @proxy1035 5 років тому

    godamn LERP, i wanted to see the actual math... basically the reason i looked it up :c

    • @deanolium
      @deanolium 3 роки тому

      well lerp(a,b,t) is really just (b*t) + (a*(1-t)) -- so pretty basic math

  • @soumyamohapatra7621
    @soumyamohapatra7621 5 років тому

    I'm going to make an octagonal chaosgame
    IT DID NOTHING😭😭

  • @thetastefultoastie6077
    @thetastefultoastie6077 5 років тому +3

    function setup() {
    for (let n = 70000, _ = (createCanvas(800, 800), stroke(220), background(20)), p, col, points = [Object.defineProperty(createVector(width * 0.5, 0), 'color', { value: color(255, 0, 255) }), Object.defineProperty(createVector(0, height), 'color', { value: color(0, 255, 255) }), Object.defineProperty(createVector(width, height), 'color', { value: color(255, 255, 0) })], currentPoint = random(points).copy(), i = n; i--; currentPoint.lerp(p = random(points), 0.5), stroke(p.color)) point(currentPoint.x, currentPoint.y)
    }

  • @sanketshirke185
    @sanketshirke185 5 років тому

    can u teach python code like that

  • @salifymedia
    @salifymedia 5 років тому +1

    X, Y. What about Z?

    • @ArneiroS
      @ArneiroS 5 років тому

      is 2d no 3d

    • @salifymedia
      @salifymedia 5 років тому

      @@ArneiroS I mean, I wonder how it will function in three-dimensional space.

  • @tomsmith3403
    @tomsmith3403 5 років тому

    hey I've just started using p5 with vs code as my text code editor but I can't seem to get IntelliSense working for the p5 library. I've downloaded the p5 @types using npm but it is not being detected by vs code and intellisense is not working. I've spent hours trying to figure out using google but I haven't found a solution to my problem. Any help would be greatly appreciated.

    • @TheCodingTrain
      @TheCodingTrain  5 років тому

      Do my workflow videos help? ua-cam.com/play/PLRqwX-V7Uu6Zu_uqEA6NqhLzKLACwU74X.html)

  • @DennisM1997
    @DennisM1997 5 років тому

    whats the name of the book with the numbers? :D

  • @a7c7q7
    @a7c7q7 5 років тому

    Yo im so suck i cant even understand this

  • @saadouch
    @saadouch 5 років тому +1

    for once i did something faster than u. man do i love this Chanel. ps used python

    • @Metabyte149
      @Metabyte149 5 років тому

      If you used processing.py could you share it with me?

    • @saadouch
      @saadouch 5 років тому

      @@Metabyte149 nah man i actually used spyder with the turtle module

  • @honza1052
    @honza1052 2 роки тому

    Can I do the coding challenge without all that cocaine?

  • @beyondcatastrophe_
    @beyondcatastrophe_ 5 років тому

    Next one is already out (unlisted): ua-cam.com/video/A0NHGTggoOQ/v-deo.html

  • @ahmetakil787
    @ahmetakil787 5 років тому

    I did a version of this where there is 3 input boxes and we can modify the number of points, leap amount and fps
    github.com/DeathOfTime8/Chaos-Game

    • @TheCodingTrain
      @TheCodingTrain  5 років тому

      Nice work! You can submit a link to the coding train website if you like!
      github.com/CodingTrain/website/wiki/Community-Contributions-Guide

  • @johnkilty976
    @johnkilty976 5 років тому

    This is the weirdest shit i have seem in a while

  • @lendelgalyna1042
    @lendelgalyna1042 5 років тому

    програмісти отруюють

  • @mallucommenter4071
    @mallucommenter4071 3 роки тому

    Only 9 dislikes

  • @elmo8696
    @elmo8696 5 років тому

    Second

  • @jamesb9120
    @jamesb9120 5 років тому

    First

  • @gazehound
    @gazehound 5 років тому

    Second?