Coding Challenge

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

КОМЕНТАРІ • 96

  • @riot1133
    @riot1133 5 років тому +109

    polar ᵖᵉʳˡᶦⁿ noise loops

  • @Aelidiil
    @Aelidiil 5 років тому +67

    LMAO the editing is so good in this one 😂 when you edited your self over the footage I was laughing so hard! I've learned so much from you sir keep up the fine work!

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

      That's all twitter.com/mathblank!

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

      yeah that was pretty funny lol
      and the two of him were equally energetic too

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

      I'm laughing

  • @Kupkeks
    @Kupkeks 5 років тому +4

    I love how enthusiastic you are about programming. Please never loose this!

  • @ahmedsami3569
    @ahmedsami3569 5 років тому +31

    Your videos became the best parts of my recent days, I like what you are doing, You are inspiring me to keep the passion and motivation to the thing I always enthusiastic about. Thank You so much! 👌

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

    You have the coolest job in the world. And not only that, you're the best at it. IMHO

  • @igricRBX
    @igricRBX 5 років тому +19

    The power of video editing. :)

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

    My dream is to be able to be as natural at coding on camera as you are, its so inspiring!
    Also this video was prettttyyyyyy freaking awesome.

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

    Just recently discovered your channel and absolutely love your videos. Very interesting topics and also (at least for me) just the right difficulty of challenges. So that sometimes I pause and code it myself first, then see if you've done it differently.
    Also, I am sure for newer coders it's very helpful to see you code something and sometimes it doesn't work at all at first. Keep it up :)

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

    you and code bullet are my favorite coding channel, but when it comes to the challenges you easilly win in cool points

  • @offtheball87
    @offtheball87 5 років тому +4

    I used polar noise in a sketch a while ago to generate random polygons to help create interesting continents for world building. It's a really cool technique!

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

    It absolutely makes sense not just to replace Perlin Noise with Simplex Noise since it would break some of the existing projects that use Perlin Noise.
    But that doesn't mean you can't add Simplex Noise under another function name and add a note in the documentation for the noise function that Perlin Noise shouldn't be used anymore but it won't be removed.

  • @johnj8639
    @johnj8639 5 років тому +4

    I love how creative your coding changes are you always have really interesting and artistic ways of demonstrating all these algorithms and programming concepts, I would love to see you come up with examples of how to use miltithreading in java. Maybe you could use it to make your own rendering engine to handle some types animations, or combine it with the project you used to render 3D objects, I think that would make an awesome coding challenge

  • @MC-rw9rk
    @MC-rw9rk 5 років тому +10

    "i don't know what a reasonable range is but lets give myself a range between zero and a million" this made me snort

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

    I was just thinking with the last video that it was kind of disappointing you didn't scale this stuff up to something large, so this is really satisfying. The best part about scaling up is that it's still mostly comprehensible, but it creates this immensely complex multi-layered image. It gives me the same feeling I got when I first started making spirographs with turtle.

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

    Wonderful!!! This Perlin noise loops are awesome!! Thanks!!!

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

    I like the edit! very dynamic.

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

    Your pronounciation of Étienne Jacob is damn fine. Also great video! MY MAN!

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

      I was going to go eat but I now have this to watch instead.

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

      @@Guil118 you could've taken the food with yourself and watch and eat simultaneously! I do it all the time!

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

      @@Kitulous But I would not have been able to entirely focus on the video.

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

      @@Guil118 teach that ability in yourself.

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

    Dude i love your stuff thank you for showing us these stuff i have fun following along it is so much fun

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

    I love your videos so much!

  • @albertrisenielsen1405
    @albertrisenielsen1405 5 років тому +7

    I love how everytime you pull up the gif in 1:29 the compression just dies.

  • @cheako91155
    @cheako91155 5 років тому +4

    You could give the movement speed a non uniformity by altering diamitamiter of x&yNoiseLoop with another NoiseLoop.

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

    what about making a derivative coding challenge?
    you draw a continuous function with your mouse (it draws as a shape with vertices) and simultaneously, on a different graph or with different color or both you get a derivative of this function! this would be cool to watch and also it is very educational!

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

    great job Dan!!

  • @VLS-Why
    @VLS-Why 5 років тому +2

    Yes yes yes! I've been hoping you would make a video on higher dimensional noise and simplex noise. You should look into opensimplex rather than simplex though because simplex still has active patents preventing it from being used commercially without licensing

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

      Yes, I'm planning to use this code: staffwww.itn.liu.se/~stegu/simplexnoise/ Any suggestions where I can read up on more about the patents, history?

    • @VLS-Why
      @VLS-Why 5 років тому

      @@TheCodingTrain Found it interesting that Nokia bought it and held onto it for a while
      patents.google.com/patent/US6867776

  • @morganstoodley8591
    @morganstoodley8591 5 років тому +4

    Please do a tutorial on ray tracing! Also great video!

  • @dkkoala1
    @dkkoala1 5 років тому +7

    You made a logical error when changing the "center" of the noise circle, because you are basically changing the diameter of the circle path instead of just moving the circle around in the noise space. The more appropriate place to change the center of your circle is in the noise(xoff, yoff) function and make it noise(xoff + cx, yoff +cy). Changing the diameter is bad because for large diameters you are losing the smooth property of perlin noise. This is because you are constantly moving around the circle with the same angle, but for bigger diameters the circle has a bigger circumference, which means you are technically moving larger distances in the noise space, which is designed to be smooth in small distances but not in large distances.

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

    You should be in the Unesco World Heritage List!

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

    perhaps, if you use vertex (x, y) for a single particle, you can detect the loop through your path through the canvas

  • @alejandroalfonsohernandez3766
    @alejandroalfonsohernandez3766 5 років тому +21

    Can u make a series of videos about Computer Graphics 3D? Like Raytracing, Z-buffers using OpenGL library (GLM : OpenGL Mathematics). And explaining all the math behind?Thanks in advance!

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

      OneLoneCoder has a great series with tons of videos about all that, wrapped up in a game engine that uses the windows console text output buffer

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

      I'd like to! You can follow topic ideas here: github.com/CodingTrain/Rainbow-Topics/issues

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

    amways there is new thank's a lot for you work go on and take us to the new ideas

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

    Love from Italy!!!! ❤️❤️❤️❤️ 🇮🇹 #LoveFromItaly6

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

    btw. to create a 1D looping path you could also:
    *) sample a 1D perlin noise P[0], ..., P[N] for the "first half" of the desired duration and then use P[N-1], ..., P[1] for the "second half" of it,
    *) sample a 1D perlin noise P[0], ..., P[N],
    construct a dotted line
    L[n] := 1/N * (P[N] - P[0]) * n + P[0], for 0

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

    24:50 - Duuuuuude, tlhe visually-significant directional artifacts are real, yo.

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

    heyy nice, another great video (at least I assume since all your videos are great!), I finished that snake game btw, should I submit that somewhere?

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

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

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

      @@TheCodingTrain Thanks! I will look into it, after the video ;D

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

    What is the round thing called at 01:26? I want to make one of those.

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

    You don’t have to use sin cos to loop, a simple number wrap will be more efficient.

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

    Thank you for informative tutorial, I hope you could make a tutorial about curl noise

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

    Did he ever make those two videos?

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

    17:37 OwO

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

    You should make a series of postgresql like u did for git and github

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

    If you programed the hairy ball theorem (a topological theorum) in 3D on a sphere and then used a vector field it would look cool

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

    To make a wibbly circle loop in time I guess you'd have to map through a torus in 3d noise.

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

      Stay tuned! Going to attempt this tomorrow with 4D noise.

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

    Choo Choo 🚂

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

    You should make some 3D renders using perlin noise, like mountains

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

    You NEED to do a slimemold, i really cant do something that organic myself o.o

  • @ДенисВьюхин-й1б
    @ДенисВьюхин-й1б 2 роки тому

    можно ли сделать чат с другом, например подключить телефоны, и можно ли сделать онлайн игру?

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

    Hi! Awesome video :) One tip: You should have done ffmpeg -i output/gif-%03d.png because your filenames have leading zeros. Therefore you probably lost 9 or 10 frames somewhere

  • @techlearner2746
    @techlearner2746 4 роки тому +2

    Sir have you completed Bsc . Please answer me.

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

    Why not clamp all the values down into a single circle in (n+1)D space so there is only one space to deal with?

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

    What library/graphical framework did you use to call render() and other draw methods?

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

      he uses processing.org/ which is like java but with all draw functions build-in.

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

      @@michalbotor What does processing use? I got it, but there are so many built-in libraries I can't see.

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

    "On purpose" :D

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

    The perlin in bee voice

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

    Okay, now make the animation tile-able (dots crossing the West edge appear on the East edge, etc.)!

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

    Hi!
    i'm making a litlle game in processing...But i got a problem that is i dont know how to set the coordinates to be the same on every monitor type using fullscreen...like in a 1920x1080 the coordinates are different from a 1600 x 900.
    Can anyone help?

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

    0:17 Like if you see a half face in shape)

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

    There is still a problem, or "problem", with the min and max value in your NoiseLoop class.
    No, it's actually a problem. But it's not a problem in the sense of an error.
    When you choose a min and a max value you expect two conditions to be true.
    A) No sampled value will be outside of that range. That's sometimes really important.
    B) When you sample a lot of values the lowest should be somewhere near min and the highest value should be somewhere near max.
    A is guaranteed this way as long the noise stays in the range [0, 1] (or [0, 1[ ? idk).
    But B will be more and more unlikely the smaller the radius gets. Of course, this condition can't be actually true or false. What's the exact definition of "somewhere near"? But I think we all agree 0.5 in the range [0.2, 0.8] is neither near 0.2 nor near 0.8. But if your radius gets small enough 0.5 could be your highest or lowest sample.
    So what's the problem with B?
    First, there's nothing going wrong. This is just how Perlin Noise works.
    Let's imagine this cloudy visualization of 2-dimensional Perlin Noise represents some height values of a landscape that has heights between 0 and 1. When you walk around in a big circle you will very likely walk through some of the lowest valleys and some of the highest hills. But when you only walk around in a very small circle you probably always stay on top of a hill, down in a valley or somewhere in between.
    How could we solve that problem?
    In the constructor of the class, we could go around the circle once with n samples, where n should be user-definable and/or the bigger the bigger the radius gets. Of course, when the radius is big enough the whole problem doesn't exist anymore and you could just skip this when the radius gets bigger than a certain threshold.
    You check those n samples for the highest and lowest sample and then you change the way you use the map function that returns the value. Don't map from [0, 1] to the range [min, max] but from [lowest sample, highest sample] to the range [min, max].
    But when you do this condition A can't be guaranteed anymore. Perhaps there is a higher or lower value between the n samples you checked. So before you return the value you also have to constrain it to the range [min, max]. The smaller n gets the more often values will be constrained. So choose n big enough so it won't be visible.
    This way the class will be much more controllable since it actually does what you would expect from it by using (more or less) the whole range between min and max.

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

      There is, though, another problem when the radius gets big enough. And that is that since we move through the circle using a fixed angle, as we increase the radius, so does the distance between each individual point, and so, they start to be less and less related to their neighbors, eventually losing all "fluidity".
      While this could be solved for a single particle by making the angle interval depend on the radius, making it smaller as the radius grows, it comes at the expense of having each particle individual on a different period, which would make setting up a perfect loop a lot harder.
      While I'm sure some could find a clever solution to this, I would try to stay away from bigger diameters past a certain point.

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

    Now let's code it in Python. 10x slower, but better in every other way.

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

    5:03 lmao

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

    Polin noise loops? Perlor noise loops?

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

    What language is he using to do this stuff?

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

      This video uses Processing (which is built on top of the Java programming language). For more info, visit processing.org and also this video might help ua-cam.com/video/AmlAiKsiy0o/v-deo.html.

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

    You missed an even better demonstration of this:
    Repeatedly draw a blobby circle like from the start but walk the noise round in a circle too
    At the beginning your code is
    for (float a=0; a

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

      Love this idea! If you implement it could you please addd here?
      github.com/CodingTrain/website/wiki/Community-Contributions-Guide

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

      It's been a long time since I did any real programming, um might tweak the JS one rather than Java though

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

      @@TheCodingTrain GAH I did the 'hard' coding work but the guide is not git hub newbie compatible if/when I work it out I might make a step by step for dummies guide cause I don't seem to be getting it xD I've been staring at it for 10 minutes already and I've only just realised I've missed step 0 upload my own version to my own repository... I kinda suck but I'll figure it out eventually. Thanks for the love and I here's the working version in the mean while:
      editor.p5js.org/JohnyDL/sketches/wZv0CEz7c
      Has a wibbliness slider, a loop speed slider (with reverse which shows off that it's repeatable) and a phase speed slider (which when at the same speed as the loop speed makes weird things happen which I could explain but I kind of saw coming)

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

    I want a simplex nose too

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

    unfortunately, saveFrame() does not work in p5.js. See p5js.org/reference/#/p5/saveFrames
    A bit more complicated

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

    Special guest Donald Trump at 1:12

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

    Can you do a series on Godot Engine with C++? Thanks++

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

    and😶‍🌫😶‍🌫😶‍🌫😶‍🌫😶‍🌫😶‍🌫😶‍🌫😶‍🌫... 😶‍🌫 you

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

    Thumbs up from me. My YT videos are very amateurish looking compared to yours 😄.

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

    😑 hay can not code this even thow it is "codeing"time... but i do not like it i mene you do not have to get rid of it...