Coding Challenge

Sdílet
Vložit
  • Äas pÅ™idán 1. 07. 2024
  • In this multi-part coding challenge I show how to use a noise field and polar coordinates to create a perfect GIF loop. Code: thecodingtrain.com/challenges...
    p5.js Web Editor Sketches:
    ðŸ•¹ï¸ Polar Perlin Noise Loops: editor.p5js.org/codingtrain/s...
    ðŸ•¹ï¸ Perlin Noise GIF Loops: editor.p5js.org/codingtrain/s...
    Other Parts of this Challenge:
    📺 Perlin Noise GIF Loops: • Coding Challenge #136....
    🎥 Previous video: • Coding Challenge #135:...
    🎥 Next video: • Coding Challenge #137:...
    🎥 All videos: • Coding Challenges
    References:
    ðŸ–‹ï¸ Ã‰tienne Jacob's tweet: / 1096403588069425152
    📓 Étienne Jacob's Blog Post: necessarydisorder.wordpress.c...
    🔗 noise() reference: processing.org/reference/nois...
    💻 ffmpeg: ffmpeg.org/
    🗄 Perlin Noise: en.wikipedia.org/wiki/Perlin_...
    Videos:
    🚂 Blobby!: • Coding Challenge #36: ...
    🚂 Drawing with Fourier Transform and Epicycles: • Coding Challenge #130....
    🚂 Heart Curve: • Coding Challenge #134....
    🚂 GIF Loop: • Coding Challenge #135:...
    🎥 Perlin Noise: • 13: What is Perlin Noise?
    🔴 Coding Train Live 169: • Coding Train Live 169:...
    Related Coding Challenges:
    🚂 #36 Blobby!: • Coding Challenge #36: ...
    🚂 #130 Drawing with Fourier Transform and Epicycles: • Coding Challenge #130....
    🚂 #134 Heart Curve: • Coding Challenge #134....
    🚂 #135 Making a GIF Loop in Processing: • Coding Challenge #135:...
    Timestamps:
    0:00 Introduce coding challenge
    1:35 Let's code
    1:45 Recreate coding challenge 'Blobby'
    4:18 Add Perlin noise
    5:25 Highlight the artifact in the blobby shape
    6:30 Illustrate Perlin noise in one dimension
    7:18 Explain Perlin noise in two dimensions
    8:24 Walk noise space in a loop
    9:20 Visualize noise space in two dimensions
    10:16 Implement noise in two dimensions
    11:41 Refine how noise values change over time
    12:21 Experiment with different parameters
    14:28 Update how noise values change
    17:25 Consider creative possibilities
    19:04 Additional notes on the noise space
    19:21 Explain noise seed
    19:47 Introduce noise in higher dimensions
    21:28 Conclude coding challenge
    Editing by Mathieu Blanchette
    Animations by Jason Heglund
    Music from Epidemic Sound
    🚂 Website: thecodingtrain.com/
    👾 Share Your Creation! thecodingtrain.com/guides/pas...
    🚩 Suggest Topics: github.com/CodingTrain/Sugges...
    💡 GitHub: github.com/CodingTrain
    💬 Discord: thecodingtrain.com/discord
    💖 Membership: czcams.com/users/thecodingtrainjoin
    🛒 Store: standard.tv/codingtrain
    ðŸ–‹ï¸ Twitter: / thecodingtrain
    📸 Instagram: / the.coding.train
    🎥 Coding Challenges: • Coding Challenges
    🎥 Intro to Programming: • Start learning here!
    🔗 p5.js: p5js.org
    🔗 p5.js Web Editor: editor.p5js.org/
    🔗 Processing: processing.org
    📄 Code of Conduct: github.com/CodingTrain/Code-o...
    This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
    #gifloop #perlinnoise #polarcoordinates #p5js #processing

Komentáře • 227

  • @DonSolaris
    @DonSolaris PÅ™ed 5 lety +377

    This dude resonates positive energy.

  • @cameron6464
    @cameron6464 PÅ™ed 5 lety +233

    Truly earns his title of "Bob Ross of programming".

    • @aram285
      @aram285 PÅ™ed 5 lety +2

      his new title you just assigned to him.

    • @alastairlocke4621
      @alastairlocke4621 PÅ™ed 5 lety +2

      Which I like

    • @KundoKun
      @KundoKun PÅ™ed 5 lety +2

      random = happy accidents

    • @amogh3275
      @amogh3275 PÅ™ed 4 lety +6

      "Blob Ross"
      Sorry i had to

  • @NatetheAceOfficial
    @NatetheAceOfficial PÅ™ed 5 lety +181

    It's dark in the room, quiet. Daniel stirs slightly in his slumber.
    Suddenly he is sat bolt upright!
    "Perlin Noise!"

  • @JonathanChute
    @JonathanChute PÅ™ed 5 lety +44

    14:20 - you eluded to an interesting challenge. You should create a program that creates a font based off of this noise so that each time you write down the letter "o" for example you'll get one of these subtly off circles that is constantly different, and then extrapolate that to the entire alphabet so when you type in your keyboard you get the computer "handwriting" your sentence. Each letter would look unique, similar to handwriting, whereas fonts each letter is made exactly equal.

    • @TheCodingTrain
      @TheCodingTrain  PÅ™ed 5 lety +12

      Love this idea! You should make it!

    • @flameofthephoenix8395
      @flameofthephoenix8395 PÅ™ed rokem

      Well, this would be great in a video game or something like that, you wouldn't be able to use it as easily for messenger apps, of course you could have it to where it has each person see a different variation of the same text, and no one would likely notice.

  • @remcodejong2651
    @remcodejong2651 PÅ™ed 5 lety +59

    The edits in this video are sooooo good!

  • @user-cb3zx2qv7p
    @user-cb3zx2qv7p PÅ™ed 5 lety +24

    Love your channel. At first it felt to me as "obnoxious youtuber tries to teach basic programming techniques to people who never tried programming". But later you did such an amazing job with some advanced algorithms like quadtree and some machine learning you've earned a lot of my respect. Keep up the good work, dude!

  • @willb.755
    @willb.755 PÅ™ed 5 lety

    You channel is always so exciting! Thanks for all the great content over the years.

  • @marcoronzani7197
    @marcoronzani7197 PÅ™ed 5 lety +22

    Unbelievable, i needed this kind of thing right now for a project i'm working on, i was going to watch back your asteroids video cause i remember from there something similar, all in all...perfect timing, you are the chosen one!

  • @Cosmoandcracker
    @Cosmoandcracker PÅ™ed 5 lety +1

    Dude, I am watching your videos for a while now, and i have never seen someone with this kind of sunshine-happyness while coding. Your videos are great! Keep it like this. Awesome work!

  • @TechnicJelle
    @TechnicJelle PÅ™ed 5 lety +12

    I just started making an Asteroids game today! Loved the video! Thanks, Dan!

  • @mehdiikbal1244
    @mehdiikbal1244 PÅ™ed 5 lety +8

    Love from France Dan! You are so inspiring and positive. I began coding thanks to you and it was the best thing that could happen to me. Merci beaucoup!!!

  • @NatetheAceOfficial
    @NatetheAceOfficial PÅ™ed 5 lety +6

    The edits were so fun!

  • @DodaGarcia
    @DodaGarcia PÅ™ed rokem

    Perlin noise is so awesome, I love learning more about it from this channel

  • @erumabo
    @erumabo PÅ™ed 5 lety

    Man, I like emotion you put on this, you got a new subscriber.

  • @markuzj.k9445
    @markuzj.k9445 PÅ™ed 5 lety +6

    As always You made it very clear :).thanks.

  • @jakehenri9608
    @jakehenri9608 PÅ™ed 4 lety

    I am so glad you finally did this! I have been wondering about how to fix that blob for over a year now!

  • @waynewedge
    @waynewedge PÅ™ed 5 lety +3

    Very inspiring. Thank you. Once again, I need to go and program my brains out.

  • @alex_bc
    @alex_bc PÅ™ed 3 lety

    EXACTLY the information I was looking for! Thank you so much

  • @Unplanted
    @Unplanted PÅ™ed 5 lety +4

    Kudos to the subtitler! Great work!

  • @airxperimentboom
    @airxperimentboom PÅ™ed 4 lety +1

    I love this !

  • @dejoker9042
    @dejoker9042 PÅ™ed 5 lety +1

    Im 0 seconds in to the video and the like button is already pressed. Love your videos!

  • @MahBor
    @MahBor PÅ™ed 4 lety

    You're such an amazing teacher. I finally understand what 2D perlin noise means.

  • @devi_buns
    @devi_buns PÅ™ed 5 lety

    Your videos always inspires me ♥

  • @scalarnomad9330
    @scalarnomad9330 PÅ™ed 4 lety

    This dude is the best!

  • @iamjimgroth
    @iamjimgroth PÅ™ed 8 mÄ›síci

    This guy is amazing!

  • @eideticex
    @eideticex PÅ™ed 5 lety +3

    Never realized this was it's own concept. Used a very similar approach about 6 or 7 years ago to test attenuating light geometry. The renderer I was working on used calculated geometry to represent lights, everything from spheres, cones, toriods to exotic super shapes. After implementing improved perlin noise in HLSL, up to 4 dimensions I was itching to apply it all over the place in the renderer. One of the first things I did was sample noise space at each vertex of the geometry for the lights and passing that into my lighting equations as an attenuation of the radius. Made lights have the familiar imperfection we see in real life and when animated across time, made for very convincing incandescent light sources even though I kept the attenuation so small that the final image showed no more than a delta of 10 in RGB values. Didn't even occur to me while doing that, that I was playing with a rather interesting usage of perlin noise. Then again are there really any non-interesting uses of perlin noise?

  • @iwantedtohaveabigytnamepsi2007

    Omg, that's so amazing

  • @paulusul
    @paulusul PÅ™ed 5 lety +1

    Perlin noise is always positive
    That made me really happy :)

  • @granteadie2616
    @granteadie2616 PÅ™ed 3 lety

    you're a national treasure my friend 10/10

  • @drsmek
    @drsmek PÅ™ed rokem

    I love how I found this video and it actually helped me solve a problem I was working on 😅

  • @jolly8953
    @jolly8953 PÅ™ed 4 lety

    this channel is a real inspiration for stuff to do lol

  • @listeningcosmos
    @listeningcosmos PÅ™ed 2 lety

    Was struggling with this problem, thanks for the solution. Tried this method for my music visualizations and it worked well. Now I think I'll try to improve it by adding a sound reacting component to make it interactive.

  • @user-xb5uu5sk2k
    @user-xb5uu5sk2k PÅ™ed 2 lety

    Great video!

  • @kautukkundan8001
    @kautukkundan8001 PÅ™ed 5 lety

    Just amazing

  • @monochromatech
    @monochromatech PÅ™ed rokem

    Hey I just found your channel and I love it.

  • @kushagraverma9452
    @kushagraverma9452 PÅ™ed 5 lety +1

    Nice editing!

  • @kreuznachpham1208
    @kreuznachpham1208 PÅ™ed 5 lety

    Amazing. Thank you so much

  • @wkool9430
    @wkool9430 PÅ™ed 5 lety +1

    Great video! You inspired me to make Snake (the game) in JavaScript. The twist is that i am not using any form of grid other than just the loose pixels... It's really close to being done. Thanks again for the inspiring video's

  • @jazonjiao638
    @jazonjiao638 PÅ™ed 5 lety

    Awesome! Finally fixed the broken blobby!

  • @cielregister8828
    @cielregister8828 PÅ™ed 5 lety +1

    good video Dan!

  • @poplikes
    @poplikes PÅ™ed 2 lety

    brilliant!

  • @porknwithbill
    @porknwithbill PÅ™ed 5 lety

    I love how human and practical your code is. We don’t have to talk about the semi colons

  • @iamsushi1056
    @iamsushi1056 PÅ™ed rokem +1

    What an awesome video for inspiration! You could theoretically make a 3d random or self-avoiding walk through spherical coordinates (or a 2d polar random walk) and use that as the coordinates for your perlin noise to be able to just have so many random loops

  • @edwinjones134
    @edwinjones134 PÅ™ed 3 lety

    Best teacher on the internet

  • @roykepoyke
    @roykepoyke PÅ™ed 3 lety

    That is my favorite video of yours

  • @kenan2386
    @kenan2386 PÅ™ed 3 lety +1

    How does he have all of that energy
    Keep up your work!

  • @mujaahidhaywood9843
    @mujaahidhaywood9843 PÅ™ed 5 lety

    I swear Mr Shiffman, you acknowledge every comment. Thanks for another intriguing video.

  • @aram285
    @aram285 PÅ™ed 5 lety +31

    Polar Perlin Loops, part of a balanced developer’s diet.
    edit: oops I did a mispelliginationating but its fixed now

    • @ABaumstumpf
      @ABaumstumpf PÅ™ed 5 lety

      But he didn't use Perlin noise.

    • @ABaumstumpf
      @ABaumstumpf PÅ™ed 5 lety +1

      @Manan Karnik No, it is *not*.
      IN processing and p5js at the very least it returns a fractal noise - that is NOT Perlin noise.
      Fractal noise is a form of noise generated by adding several different noises together. In case of processing/p5js that becomes apparent when you look at the "NoiseDetail" function: It set the number and falloff for the used noise-layers.
      Perlin Nosie itself is a very regular grid-based noise with uniform feature size and smooth transitions. Adding several layer of that with decreasing size and amplitude gives the nice rugged result that resembles a terrain.

    • @aram285
      @aram285 PÅ™ed 5 lety

      @@ABaumstumpf It was a joke k dude. Calm.

    • @Dalendrion
      @Dalendrion PÅ™ed 5 lety +1

      According to the documentation, it's Perlin noise. processing.org/reference/noise_.html
      It is of course possible that the documentation is wrong. If it is, it's understandable where the confusion comes from.

  • @ericschneider4919
    @ericschneider4919 PÅ™ed 5 lety +1

    This is fantastic. Cyclic noise feels like the kind of thing a lot of people have wanted and I didn’t realize it existed without summing some sort of time-shifted noise function or some other mumbo jumbo. This is a super elegant solution!
    I’m wondering if circles would be any better than, say, a square in this context. Surely any closed loop would have this property, but intuitively it feels like a circle is the “most random,†even though something like a square is less computationally taxing.
    Also, it would be interesting to see what would happen if you put multiple shapes in a perlin noise “field†that acted as a displacement map. If you varied each vertex in a shape by the value of the noise at that vertex, i’d imagine you’d get a really cool effect by moving that shape around or varying the field in 3d.
    Anyways, great video!

  • @pinkierar_real
    @pinkierar_real PÅ™ed 5 lety

    ПотрÑÑающе

  • @hendasheng
    @hendasheng PÅ™ed 3 lety

    thank you for your help:)

  • @slyer7695
    @slyer7695 PÅ™ed 5 lety +10

    Love from Italy â¤ï¸â™¥ï¸ðŸ‡®ðŸ‡¹, #LoveFromItaly5

  • @BIG_CLARKY
    @BIG_CLARKY PÅ™ed 4 lety +1

    This guy has crazy math/science teacher vibes

  • @JBahrsShiz
    @JBahrsShiz PÅ™ed 5 lety +1

    First of all, you rock. Thank you for your videos. As a newbie, I feel overwhelmed, but inspired by your videos. I guess it's like someone learning to play the drums and watching Neal Pert thinking, 'I have a long way to go' and 'man, that's awesome' all at the same time. What is your advice to the noob? I am currently more than half way through the codecademy full stack web development course and plan to finish that, but was curious to hear from the community what "best practices" are recommend for new guys/gals.

  • @JackLaidlaw
    @JackLaidlaw PÅ™ed 5 lety

    Wonderful

  • @d_v_d1070
    @d_v_d1070 PÅ™ed 5 lety

    18:03 in he plays the cards and lures you in with that oneliner, your passion for code ignites "if......the creative possibilities expl...." o yeszz :)

  • @elyaizen
    @elyaizen PÅ™ed 5 lety

    Wow Dan. ðŸ‘

  • @AidanNorde
    @AidanNorde PÅ™ed 5 lety

    wow awesome

  • @turnipzoxi2853
    @turnipzoxi2853 PÅ™ed 5 lety +11

    Chaotic good coding.

  • @user-nl3xs7xv8x
    @user-nl3xs7xv8x PÅ™ed rokem

    Супер. Вы крутой!

  • @mahirdaiyansafwaan2148
    @mahirdaiyansafwaan2148 PÅ™ed 5 lety

    Awesome

  • @cellininicholas
    @cellininicholas PÅ™ed 5 lety +4

    As well as changing the Z-Offset, could you also move the centre of the circle (that is sampling values in 2D perlin noise)?
    You could also play with that circle in other ways... Maybe use an oval and slowly change it's shape over time?

  • @monlewi1976
    @monlewi1976 PÅ™ed 5 lety

    Perfect spin loader

  • @hund4440
    @hund4440 PÅ™ed 4 lety +1

    You can get a 2d tileable perlin noise texture by cutting a thorus through 3d perlin noise

  • @aaronrothwell7615
    @aaronrothwell7615 PÅ™ed 5 lety +1

    This is a really fun one to add alpha clearing to, so you get blurred lines as the shape morphs. So instead of background(0) you would use color(0,0,0,25); rect(0,0,width,height); and this will draw a rectangle over the entire screen that is slightly faded out and because these are layered on top of each other each previous generation of line is more blurred out and so slowly transitions to black. Hopefully this makes sense, not sure how to format code in comments.

  • @DustinGunnells
    @DustinGunnells PÅ™ed 5 lety

    I don't know what you found here, but I'm still studying it. I think you found something extremely important on accident. That phase thing is incredible!

    • @JNCressey
      @JNCressey PÅ™ed 5 lety +1

      As the phase changes, the orbit of (cos(A+phase), sin(A)) over A morphs as follows:
      Phase=0: counterclockwise circle
      Phase=pi/2: oscillating along the straight line between (1,-1) and (-1,1)
      Phase=pi: clockwise circle
      Phase=3pi/2: oscillating along the straight line between (-1, -1) and (1,1)
      And between those, it is various elliptical shapes.

  • @deadend8111
    @deadend8111 PÅ™ed 5 lety

    Nice video!! I challenge you to make a drawing predictor (simple neural network that calculates the next points locations from few starting points)

  • @Wobbern
    @Wobbern PÅ™ed 5 lety +3

    You would be a great teacher! I can tell it on the way you leave the mouse in the middle of the images you want to show.

    • @prakharlondhe3876
      @prakharlondhe3876 PÅ™ed 5 lety

      he is a *professor*

    • @Wobbern
      @Wobbern PÅ™ed 5 lety

      ​@@prakharlondhe3876 and this was a *joke*

  • @johnterpack3940
    @johnterpack3940 PÅ™ed 5 lety

    It looks like the perfect technique for modeling a realistic planet. Just apply the exact same technique to spherical coordinates instead of polar coordinates. Maybe add a couple octaves of additional noise or an underlying sine wave pattern to help create larger scale areas like continents. At any rate, it certainly gives me a better idea of where to start than anything else I've found. Thank you.

  • @aryamankejriwal5959
    @aryamankejriwal5959 PÅ™ed 5 lety +4

    Anyone else remember the debate about whether it was polar noise, perlin noise, polin noise or perlar noise?

  • @WildAnimalChannel
    @WildAnimalChannel PÅ™ed 5 lety +4

    I use 3d fractal noise to make mountains on the 2D surface of planets in my game I'm making. You're giving away my secrets!

  • @pdutube
    @pdutube PÅ™ed 5 lety +1

    The segment at 16:34 looks like the continent of Antarctica is morphing with Earth's rotation. Trippy. Another cool way to implement 3+ dimensions is to make the extra dimensions color based or sound based. Then a rotation/translation/etc., would change colors and sounds.

  • @inusahrauf1810
    @inusahrauf1810 PÅ™ed 5 lety

    very good video

    • @inusahrauf1810
      @inusahrauf1810 PÅ™ed 5 lety

      Please how do i build my own live video streaming website in my shared hosting Cpanel?

  • @azomtech4852
    @azomtech4852 PÅ™ed 5 lety +4

    wonderful wonderful wonderful wonderful wonderful wonderful wonderful wonderful wonderful wonderful wonderful wonderful

  • @execskies4245
    @execskies4245 PÅ™ed 2 lety

    Now I want to see rolling Perlin noise

  • @abdelrhmandameen2215
    @abdelrhmandameen2215 PÅ™ed 3 lety

    I’m here for the hands gestures.

  • @VictorNascimentoo
    @VictorNascimentoo PÅ™ed 5 lety

    Do a next challenge on Hilbert Curves and other space filling curves :)

  • @praveshgaire3437
    @praveshgaire3437 PÅ™ed 5 lety

    Never though noise would be that useful

  • @Confuseddave
    @Confuseddave PÅ™ed 5 lety +1

    I was thinking about whether you could make a seamless 2-dimensional texture (there was a video were you used Perlin noise to create a vector field and had particles flow through it, but it had artefacts at the edges where the vector directions would change abruptly). My first thought was to use the surface of a 3D torus to give a looping 2d texture in the same way you're using the edge of a 2D circle to generate cyclic 1D noise here.
    Then I twigged that the would cause distortion in the texture, since the outer edges of the Torus would sweep through a larger length of the noise pattern than the inner surface for the same angle. You could minimise it by turning the minor circle so it's tangent to the major circle rather than radial (so your torus would be flattened as if you sucked all the air out of it) but it'd still have a slight distortion to it unless you actually projected the circle onto the surface of a cylinder (sounds complicated, but probably just needs the coordinate calculations to come in the right order).
    Part of me wonders if it would be simpler just to write a Perlin noise class that interpolates smoothly between the edges, but that would limit the scale of the noise to integer fractions of the screen space, and might cause issues if you wanted to create images with odd aspect ratios.

  • @vadsavin
    @vadsavin PÅ™ed 5 lety +1

    Do you remember your Perlin noise example with moving particles? Please, try to make the same staff but let particles move like drawing contours of input image.

  • @JonDavies-Shiftbulk
    @JonDavies-Shiftbulk PÅ™ed rokem

    Continuously good videos. Can you do one with the polar noise mapping seamlessly to a sphere. it is tricky as you change the radius the polar mapping the noise texture distorts.

  • @pluffcrock3438
    @pluffcrock3438 PÅ™ed 2 lety

    21:35 that shooting sound resonates in my nose

  • @diligar
    @diligar PÅ™ed 5 lety +4

    What if, when moving through 3D Perlin space, instead of looking at circles in x,y with increasing z, you looked at circular cross-sections of a torus? Then it’d definitely loop :D

  • @DotNetRussell
    @DotNetRussell PÅ™ed 5 lety

    This would be cool to use to generate random terrain

  • @Mortagus
    @Mortagus PÅ™ed 5 lety

    Wiggle wiggle wiggle 😛

  • @topa9487
    @topa9487 PÅ™ed 5 lety +47

    *give me the polar perlin noise LÖÖPS brother*

  • @anthonytonev1357
    @anthonytonev1357 PÅ™ed 5 lety

    Welcome back to Polar Perlin Noise Loop Thing of a Blob

  • @AuraVFX
    @AuraVFX PÅ™ed rokem

    how do you make the noise loop follow a certain shape like the heart you showed in the start

  • @mohamedmorh
    @mohamedmorh PÅ™ed 5 lety

    First comment love you bro

  • @SaifUlIslam-db1nu
    @SaifUlIslam-db1nu PÅ™ed 4 lety

    Is there any possible chance you can arrange to teach professors and teachers how to make animations like this? Your graphics really help to understand Mathematics and Physics. I think it would help quite a lot in the class room!

  • @DanilaBou
    @DanilaBou PÅ™ed 4 lety

    While moving through 3D perlin map with zoff, does it loop? Because now that we are moving in a straight line on the z axis, the values will not repeat their initial values

  • @jedmarshall217
    @jedmarshall217 PÅ™ed 5 lety

    What if you moved where you were getting your perlin noise valises from, instead of moving around the circle? Say, having the circle trace around another circle in the perlin plain? Seems like this might be a cool way to add some more “randomness†to the space without having repeats before the end.

  • @ahmedsharif9193
    @ahmedsharif9193 PÅ™ed 3 lety

    Actually, negative values for xoff & yoff are supported in the p5 Perkins noise function

  • @user-hi6jn4mw2o
    @user-hi6jn4mw2o PÅ™ed 9 mÄ›síci

    /** ì ì™¸ì„  ì„¼ì„œì— ë¬¼ì²´ê°€ ê°ì§€ë˜ë©´, 시리얼 ëª¨ë‹ˆí„°ì— "Detected"ë¼ëŠ” ë¬¸ìž¥ì„ ì¶œë ¥*/int sensor = A0; // ì„¼ì„œí•€ì€ A0ë²ˆì— ì—°ê²°int val;void setup() { Serial.begin(9600); pinMode(sensor, INPUT); // ì„¼ì„œê°’ì„ ìž…ë ¥ìœ¼ë¡œ 설정 Serial.println("arduino starts");}void loop() { val = digitalRead(sensor); // 센서값 ì½ì–´ì˜´ if (val == LOW) { // IR센서는 LOW ACTIVEë¡œ íƒì§€ ì‹œ LOWê°’ì„ ì „ì†¡í•¨ Serial.println("Detected"); delay(300); } else Serial.println("0"); delay(300);}

  • @user-rv9vk8by5i
    @user-rv9vk8by5i PÅ™ed 4 lety

    So. You use one noise loop to make sure that the circle is perfectly closed.
    At the end you also introduced the possibility of a z-offset. Could you use 4 dimensional perlin noise, use dimensions 1 and 2 for the perfectly closed circle, and move around dimensions 3 and 4 in another circle with a z-offset and w-offset so that it creates a perfectly looping animation?

  • @KnakuanaRka
    @KnakuanaRka PÅ™ed 4 lety +1

    Okay, the gag at 6:02 is hilarious. ¯\_(ツ)_/¯

  • @darkfrei2
    @darkfrei2 PÅ™ed 2 lety

    Can you explain how to code the *map* and *noise* functions?

  • @valseedian
    @valseedian PÅ™ed 5 lety

    Periodic sequences repeat at known intervals; or, misidentifying randomness: a short tutorial.

  • @orpheus0108
    @orpheus0108 PÅ™ed 5 lety

    that's how perlin noise worksðŸ’â€â™‚ï¸

  • @diwakarbaidya5652
    @diwakarbaidya5652 PÅ™ed rokem

    I am new to Perlin Noise, does it have a probability to generate the same ?? lets say random order, even not immediately but after running some time ????