Coding Challenge

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 120

  • @FluXR3LieF
    @FluXR3LieF 5 лет назад +23

    Fantastic as always! My favorite coding youtuber of all time.

  • @Couchwurst
    @Couchwurst 5 лет назад +1

    Wow, these necessary-disorder GIFs are a plethora of intriguing ideas! Thank you Dan, for taking us the first few steps in that direction!
    You always claim that you don't have a great artistic instinct, but you have an amazing eye for possibilities! And that fits perfectly to what you are doing here.

  • @Spikehead777
    @Spikehead777 5 лет назад +6

    I loved that ending, it's so different, but fitting! I'd love to see more of you outside of the studio talking about things, whether it's a whiteboard in a park or spheres and ropes on a sidewalk or stuff like that! =D

  • @Mastervidcritic
    @Mastervidcritic 5 лет назад +22

    Instead of simply mapping the noise to either 0 or 255, multiplying it by a large enough number will achieve a similar effect, but near the edges you'll get some anti-aliasing for free, which looks substantially better. You actually did that on accident in a previous video where you multiplied the value by 255 twice.

  • @firemarshal1bill
    @firemarshal1bill 5 лет назад +1

    Best ending to a Coding Train yet! Keep up the great work Dan.

  • @idontwantmynameinhere
    @idontwantmynameinhere 5 лет назад +12

    13:22 - Love how you just walk by the Pearle store when saying "... and I'll see you..." lol

  • @benjamindragon598
    @benjamindragon598 5 лет назад +1

    That vlog just cought me so off guard in the best possible way. More!

  • @OrangeC7
    @OrangeC7 5 лет назад +2

    This is really cool! There's so much you can do with this stuff, it's insane! :D

  • @beyondlwm
    @beyondlwm 2 года назад +1

    It's a little bit difficult to get that we need 4D coordinate to loop a 3D value. However, it really makes sense.
    Thanks for the sharing!

  • @sammygilliland7793
    @sammygilliland7793 3 года назад +1

    An interesting consequence of using this rotational plane approach: the difference in radius between one end of the plane and the other means one side of the image will be passing through the noise field at a higher rate than the other. The more you try to compensate for that difference, the longer the resulting loop.

  • @MasterHigure
    @MasterHigure 5 лет назад +2

    Are you not going to mention that 4D is needed so that the plane can loop but still every part of the plane moves through space at the same pace? (Which makes me curious as to what a 3D implementation would look like.)

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад +1

      Thank you for the comment, I should have been more clear about that I will try to come back to the topic!

  • @x-seronis-x
    @x-seronis-x 5 лет назад +1

    You only need one additional dimension to represent time so 3d noise is plenty to make a loop. You just need to move the entire coordinate space instead of only shifting a singular time axis. Kinda like looking at a cut-away slice of a torus.

  • @alexanderilivanov7432
    @alexanderilivanov7432 5 лет назад

    You are so awesome, stay positive!

  • @AeroAndZero
    @AeroAndZero 5 лет назад +4

    These Coding Challenges are like bob ross painting a picture but bob ross is very excited about his picture

    • @Nittiyh
      @Nittiyh 5 лет назад +1

      That's exactly it

  • @wouter11234
    @wouter11234 5 лет назад +1

    Loved the ending, you should do that more often haha

  • @naphipps28219
    @naphipps28219 5 лет назад

    I've always used a circle made from a Midpoint Circle algorithm. You'll avoid the trig functions, and have all the loop points at setup. And of course you can scale/stretch those points, etc.

  • @d14nc4r0
    @d14nc4r0 5 лет назад +2

    Snow day :D that was a good one... refreshing ending I may say :D

  • @PHENN7
    @PHENN7 4 года назад

    I have never seen you draw a decent rectangle. Time to practice!

  • @KaletheQuick
    @KaletheQuick 5 лет назад +1

    Now make it so it can take different paths through 4d space, render out multiple ones, then pay them in a random sequence to obfuscate the looping.
    THEN, have some and at other 4D points, with some starting there, with all paths leading to close loops.
    I call it a 4D time flower.

  • @gonzalochristobal
    @gonzalochristobal 4 года назад

    my life is a constant hurkey jurkey feeling

  • @mtvr3313
    @mtvr3313 4 года назад

    your videos are the BEST. I watch them when I have problems coding. one question: at the end, I see a familiar neighborhood. Do you by any chance live in New York? again, best RUclips channel I have ever seen.

  • @jedmoutahir
    @jedmoutahir 5 лет назад +2

    Could you do the one with the rock and the water going on it?????

  • @digitalArtform
    @digitalArtform 5 лет назад +2

    I think it’s possible you can implement your torus slice explanation more literally and not invoke noise of higher dimension than 3 and still loop 2D noise. Although if your torus is small there may be a visible ‘boiling speed’ gradient across the slice as the points more distant from the axis of revolution will boil faster than the inner points on the slice that are closer to the torus axis. You want a torus like a hula hoop, not like a donut. But with a hula hoop it’s hard to get both slow boiling and a short loop duration. While with a donut it’s hard to get even boiling speed across the slice.

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад +2

      Thank you so much for taking the time to write this and clarify! Super appreciated.

    • @digitalArtform
      @digitalArtform 5 лет назад +1

      The Coding Train actually it occurs to me, and maybe you mentioned this or the animator who makes the gifs mentions it already, that you could work with 3D noise but instead of it being a function of XYZ it could be a function of rho, theta, and z. Cylindrical coordinates. Then there would be no speed gradient penalty across the slice for small donuts.

    • @digitalArtform
      @digitalArtform 5 лет назад +1

      The Coding Train I thought I had it working in Maya, but I used the dot product for my cylindrical angle and it loops, but it goes backwards and forwards. I’m starting to see the problem with the cylindrical coordinate systems and 3d.

  • @NolleEveraert
    @NolleEveraert 5 лет назад +9

    Can you do a processing tutorial about Q learning please?

    • @nartgen
      @nartgen 5 лет назад +2

      It would actually be a great idea! And why not a following about Deep Q Learning with Tensorflow JS!

  • @erichlof
    @erichlof 5 лет назад +2

    How 'VSauce'ian of you at the end there! LoL Thanks for the great videos!

  • @_kett2164
    @_kett2164 5 лет назад +3

    Couldn’t you do this in 3 dimensions? By moving the plane around in a 3d circle?

    • @digitalArtform
      @digitalArtform 5 лет назад +1

      SweatersJPG yes, but even better would be in 3d cylindrical space, not 3d rectangular space.

    • @bleuje
      @bleuje 5 лет назад +3

      @@digitalArtform the parts near the center of the circle would change less than the parts far from the center. With 4D noise, we have uniform change

    • @digitalArtform
      @digitalArtform 5 лет назад +1

      Etienne Jacob not if your 3d noise is s function of rho, phi, and Z instead of x, y, and z. The cylindrical coordinate system will allow you to have constant evolution rate across the slice. The noise itself will be crushed into fanning planes that radiate from the central axis. And you'll still only be using 3D noise.

    • @digitalArtform
      @digitalArtform 5 лет назад +3

      Etienne Jacob I’ve been playing with it in Maya and I have a seamless cylindrical texture using the dot product for angle but half of it mirrors the other half. is the problem with 3d cylindrical coordinates that the texture goes backwards and forwards. I’m starting to see the problem now that I’m trying it.

    • @oldvlognewtricks
      @oldvlognewtricks 5 лет назад

      @@bleuje Move the plane around two Möbius loops? :P

  • @zeldamax4741
    @zeldamax4741 5 лет назад +1

    For everyone who's interested: pastebin.com/NGfVDiMS
    You can use the code when you run it inside Processing and you have the OpenSimplexNoise.java tab with the class inside it.
    Also you will need to install the PeasyCam Library so you can move the camera around freely.
    The library can be installed by going to Sketch -> Import Library... -> Add Library... and then searching for PeasyCam.
    There's also a second draw loop which does not use a circle but a 2d plane instead.

  • @RedSilencer
    @RedSilencer 5 лет назад

    Thanks, Mr. Shiffman!

  • @MistaGobo
    @MistaGobo 5 лет назад +1

    Does this mean that the outer edge of the torus would be travelling faster (and therefore, animating quicker) than the inner edge?

    • @loganthomas8872
      @loganthomas8872 5 лет назад +2

      At the whiteboard, he was suggesting that this looks like a 3D torus, but the implementation is in 4D. If it was a 3D torus as he drew, then yes one side would animate more quickly, but he rotates the 2D plane in two extra orthogonal directions. For a comparison that is easier to imagine, think of a line segment rotating about one end like a propeller in 2D (one extra dimension). In that case, the animation speed would vary place-to-place on the line. But if you imagine instead rotating the line in 3D (2 more dimensions) like it's travelling around the round side of a cylinder, then all the points of the line are moving at the same speed/animation rate.

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад +1

      Thanks for this explanation! Do you think my analogy of the torus is too misleading? It's the way I like to think of it, but I'm worried maybe I'm leading people astray. If you like to write a short explanation / correction I could include it in the description or pin a new comment!

  • @someordinarydude8813
    @someordinarydude8813 5 лет назад

    What an actual lad.

  • @igricRBX
    @igricRBX 5 лет назад +14

    You could've used two 2D noises with different offsets if you wanted to decrease lag.
    By the way your voice sounds different outside of your studio.

    • @n305
      @n305 4 года назад +2

      Can you elaborate how do I do that? I am actually trying to animate and loop a 3d noise which means I would need a 5d noise.

    • @madkwad
      @madkwad 3 года назад

      @@n305 Did you find how to it ?

  • @aryamaangoswamy179
    @aryamaangoswamy179 5 лет назад +1

    Mike Boyd's next challenge: draw dotted lines on a blackboard like Dan

  • @Uncle_Yam
    @Uncle_Yam 4 года назад +1

    Based on my understanding, does one side of the image loop "slower" than the other side?

    • @eyescreamcake
      @eyescreamcake 3 года назад

      Yes, if you didn't offset the rotating plane away from the rotation axis, the bottom edge of the screen would not change. I assume you have to get it far enough away from the rotation axis so that the difference in "speed" between bottom and top edges is not noticeable.
      Oh wait there are other comments about this and saying the 4D noise makes it irrelevant. ruclips.net/video/3_0Ax95jIrk/видео.html&lc=Ugw77BdmjxYhAylk9PF4AaABAg.8s60aNhK0jr8s62h3R6hVB

  • @perlindholm4129
    @perlindholm4129 5 лет назад

    Would it be possible to iterate some params for the noise to match the sun at a given instant. Then I would get a machine learning params = model() and the noise algorithm as the loss function. A way to figure out what the sun is doing and predict it.

  • @hascheidl
    @hascheidl 5 лет назад +1

    Is there also an opensimplex library for p5.js?

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      I found this but haven't used it yet! github.com/joshforisha/open-simplex-noise-js#readme

  • @angelcaru
    @angelcaru 5 лет назад +1

    "The last three hundred and seven coding challenges"
    Ok, since coding challenge number negative one hundred and seventy

  • @Weckacore
    @Weckacore 5 лет назад

    Could you show us how to calculate Worley noise? That could make some awesome terrain generation, but I'm not finding java or c# implementations!

  • @sweethomes674
    @sweethomes674 Год назад

    Awesome 😊

  • @elyaizen
    @elyaizen 5 лет назад +1

    This episode is stright from Dimension C-137
    . 😅
    CC_137_4D_Noise_Loop

  • @n305
    @n305 4 года назад

    But how do I actually loop a 4d noise without going 5d?

  • @jonnylaw4569
    @jonnylaw4569 5 лет назад

    Got a question, can you do a tutorial on how to install processing on a raspberry pi 3? I finally got my pi up nd going, but everything I find on getting the programming language on the pi is out dated and doesn't work.

  • @inhtaioan4457
    @inhtaioan4457 5 лет назад

    I really like your channel and I want to learn javascript here but I don't know which video to start.pls help me.

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      Start here! ruclips.net/p/PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

  • @johnmclennon7388
    @johnmclennon7388 5 лет назад

    As always awesome, but what's you think of create some like Angry Birds clone tutorial?

  • @soumilshah1007
    @soumilshah1007 5 лет назад

    Anyone know how we can generalize the 4d looping to n dimensions? For example if we wanted to create this exact coding challenge in 3d, we would need a 5d noise loop.

    • @KanalMcLP
      @KanalMcLP 5 лет назад +1

      just go in a circle within the last two dimensions (always use two more than you want to show for that reason)

  • @rubixman7x7
    @rubixman7x7 5 лет назад +1

    Couldn't you have just done it with 3D noise by moving through 3D space in a torus?

    • @dranorter
      @dranorter 4 года назад +1

      Yes, but there would have been one side of the image moving more quickly than the other.

  • @admin-pl8dk
    @admin-pl8dk 5 лет назад

    Height maps generated from looping simplex noise will achieve the ending 3d terrain

  • @muhammedshameel5684
    @muhammedshameel5684 5 лет назад

    Loved the ending. Are you planning to make something similar to the gif loops in necessary disorder posts?

  • @unkowndata2338
    @unkowndata2338 5 лет назад

    Dan do you think a masters in mathematics is worth it? I'd love to understand the higher level math that goes into graphics programming, and I think it would compliment a CS bachelors well.

  • @flowtinggod4617
    @flowtinggod4617 5 лет назад

    Can you show how to dowload plssdd

  • @couch9416
    @couch9416 5 лет назад

    What do you do outside of yt? (If you do sth) because this is all in like processing so more visual based. I know that you know alot about java outside of visual stuff but then why are the challenges always visual challenges?
    The cap at the end is nice on you btw

  • @DwAboutItManFr
    @DwAboutItManFr 4 года назад

    Now do 5D perlin noise so you can generate every possible timeline.

  • @AleksanderFimreite
    @AleksanderFimreite 5 лет назад +1

    Nice outro. Maybe we could do some episodes outside some time? =D

  • @ernststravoblofeld
    @ernststravoblofeld Год назад

    Is it just me, or did he bring trigonometry to a modulo fight?

  • @abhijitleihaorambam3763
    @abhijitleihaorambam3763 5 лет назад

    Please make a tutorial on processing.py

  • @rishav4343
    @rishav4343 5 лет назад +2

    Yay more random noise

  • @XKCDism
    @XKCDism 5 лет назад

    BTW just tested the 4D noise and it was not slow on my desktop, your laptop might just be having a hard time. love the video tho

    • @XKCDism
      @XKCDism 5 лет назад +2

      My own gif imgur.com/a/2NPNqsV

  • @theprogrammer2567
    @theprogrammer2567 5 лет назад

    Does anyone here continuously get errors for using the .mousePressed() function for DOM elements
    even though u are using it correctly?

  • @johaneric1400
    @johaneric1400 5 лет назад

    I hope u make this to p5 code.......thanks

    • @BrettCooper4702
      @BrettCooper4702 5 лет назад

      There is this js library. github.com/blindman67/SimplexNoiseJS
      I badly included it in this p5 sketch editor.p5js.org/hellonearthisman/sketches/deiJ6SL7K

  • @fareast1010
    @fareast1010 5 лет назад

    Thank u very much

  • @bobbob1278
    @bobbob1278 5 лет назад

    Can you make the snake game again and explain it more in depth because im in middle school and its hard for me to understanf when yoi are going fast. You could also help me or us out by explaining other videos too. Your videos are great and you are a funny person.

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      I did the snake game twice actually! Does this one help? ruclips.net/video/OMoVcohRgZA/видео.html

  • @careererrorr
    @careererrorr 5 лет назад

    love you bro...

  • @lucase6077
    @lucase6077 5 лет назад

    I caught up, at last.

  • @MrRube007
    @MrRube007 5 лет назад

    10:17 - make a Zebra noise loop pls :)

  • @atm8333
    @atm8333 5 лет назад

    Love your videos 😊

  • @aryamaangoswamy179
    @aryamaangoswamy179 5 лет назад

    Yay! Dan!

  • @jjrubes1880
    @jjrubes1880 5 лет назад +1

    Sometimes I forget you're talking to a camera in these vids.

  • @BrettCooper4702
    @BrettCooper4702 5 лет назад

    wow, close up ending. Don't see that much. :)

  • @Tordek
    @Tordek 5 лет назад

    Perlin noise and fractal noise aren't the same! Fractal noise is the sum of several "octaves" of noise.

    • @KanalMcLP
      @KanalMcLP 5 лет назад

      but perlin noise is by far the most common type of fractal noise if not the only

    • @Tordek
      @Tordek 5 лет назад

      ​@@KanalMcLP You can use Perlin noise to generate fractal noise. Perlin noise is not fractal (unless you claim "well yes but only one octave").
      Fractal noise is not perlin noise and perlin noise is not fractal noise.

    • @KanalMcLP
      @KanalMcLP 5 лет назад

      @@Tordek but what is perlin noise if not the sum of different octaves at different amplitudes of plain noise?

    • @Tordek
      @Tordek 5 лет назад

      @@KanalMcLP Perlin noise does not sum multiple octaves. Perlin noise only makes a continuous connection between discrete points in the n-plane. (Which is the same as (Open)Simplex noise does, only each differs in which points they choose to connect.)

    • @Tordek
      @Tordek 5 лет назад

      You can trivially see this: look at the images generated in this video, there's no cases where you'll see very high values very close to very low values, because the noise is generated with a single octave.

  • @good_boy_13
    @good_boy_13 5 лет назад

    How does this have a dislike? Who doesn't like this?

  • @vinc6966
    @vinc6966 5 лет назад

    0:29 Joy Division!

  • @zipnone1996
    @zipnone1996 5 лет назад

    neat!

  • @lorforlinux
    @lorforlinux 5 лет назад

    You are ❤️

  • @grainfrizz
    @grainfrizz 5 лет назад +3

    Dan, "entitled" means differently than "titled." Always love your videos, tho.

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад +4

      Zoinks!

    • @vezero317
      @vezero317 5 лет назад +2

      "Entitled" has two meanings. The first and more common is "to furnish with a right or claim to something". The second is "to give a name or title to". The various writing style guides are divided on whether "titled" and "entitled" can be used interchangeably.

    • @grainfrizz
      @grainfrizz 5 лет назад

      @@vezero317 nope u can't. And shouldn't.

    • @quillaja
      @quillaja 5 лет назад +1

      vezero317 is correct.

    • @vezero317
      @vezero317 5 лет назад

      @@quillaja yes but language is constantly evolving and it does feel correct. The only way "entitled" feels right with the second meaning is when it's is used as a past-particible adverb. Eg I read a book entitled "how to cook"

  • @papinkelman7695
    @papinkelman7695 5 лет назад +5

    The edditing of this video is not opensimplex... 😄😄😄

  • @josgielen8524
    @josgielen8524 5 лет назад +3

    There really is no need to use 4D noise here. 3D works too, just loop your XY plane around a circle in the XZ plane. it will produce a similar result and is much faster.

    • @zabotheother423
      @zabotheother423 5 лет назад +1

      That would work, however points closer to the axis of rotation will change more slowly to points on the outside.

    • @eyescreamcake
      @eyescreamcake 3 года назад

      @@zabotheother423 So use a radius far from the axis of rotation

  • @manishsahu8860
    @manishsahu8860 5 лет назад

    so nice and amazing. but i want to give coding challenge, to create a 4d universe using Einstein's field equation. i hope, you will accept my problem as well as challenge.

    • @manishsahu8860
      @manishsahu8860 5 лет назад

      otherwise guided me plz @the coding train

  • @KanalMcLP
    @KanalMcLP 5 лет назад

    your torus example is not very accurate, you are actually looping around the four-dimensional equivalent of the torus. you would loop in a torus-like shape if you changed y and z instead of u and v. but then the upper part of the image would change less than the lower part and you wouldnt wnat it to,

    • @digitalArtform
      @digitalArtform 5 лет назад

      McLP not if your 3D noise is a function of (radius, angle and Z) in cylindrical space, instead of regular XYZ space. Then there’s no speed gradient across the slice.

  • @Vinni-2K
    @Vinni-2K 5 лет назад

    now do 5D noise :D
    lol