Coding Challenge

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

КОМЕНТАРІ • 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

  • @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

  • @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.

  • @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

  • @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.

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

    What an actual lad.

  • @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.

  • @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

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

    Loved the ending, you should do that more often haha

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

    Thanks, Mr. Shiffman!

  • @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.

  • @sweethomes674
    @sweethomes674 Рік тому

    Awesome 😊

  • @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.

  • @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 UA-cam channel I have ever seen.

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

    my life is a constant hurkey jurkey feeling

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

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

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

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

  • @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!

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

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

  • @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.

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

    Yay! Dan!

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

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

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

    Yay more random noise

  • @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!

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

    Thank u very much

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

    love you bro...

  • @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!

  • @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 3 роки тому +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 ?

  • @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. ua-cam.com/video/3_0Ax95jIrk/v-deo.html&lc=Ugw77BdmjxYhAylk9PF4AaABAg.8s60aNhK0jr8s62h3R6hVB

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

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

  • @_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

  • @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

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

    Love your videos 😊

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

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

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

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

  • @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!

  • @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?

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

    neat!

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

    I caught up, at last.

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

    You are ❤️

  • @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.

  • @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.

  • @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.

  • @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! ua-cam.com/play/PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA.html

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

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

  • @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)

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

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

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

    0:29 Joy Division!

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

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

  • @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.

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

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

  • @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

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

    Can you show how to dowload plssdd

  • @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? ua-cam.com/video/OMoVcohRgZA/v-deo.html

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

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

  • @ernststravoblofeld
    @ernststravoblofeld Рік тому

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

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

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

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

    Please make a tutorial on processing.py

  • @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

  • @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

  • @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.

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

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

  • @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... 😄😄😄

  • @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