Coding Challenge 168: MandelBulb 3D Fractal

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

КОМЕНТАРІ • 327

  • @SebastianLague
    @SebastianLague 2 роки тому +760

    Really fun video, and a nice breakdown of the maths. Looking forward to more mandelbulb-related challenges in the future!

    • @7fiyt
      @7fiyt 2 роки тому +50

      I agree! Both of your channels are super inspiring and I'm always excited when I see a new upload. Keep it up!

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому +84

      Thank you, that means a lot!!

    • @freddy_bsc
      @freddy_bsc 2 роки тому +15

      It would be fun to see you both team up on this one, you are very talented with shaders and ray marching and that kinda stuff as far as I know

    • @kiritgupta
      @kiritgupta 2 роки тому +10

      A colab between both of you seems natural for this challenge.

    • @ninjaasmoke
      @ninjaasmoke 2 роки тому +5

      i mean, Collab?

  • @okarakoo
    @okarakoo 2 роки тому +59

    I am always impressed about how you manage to create complex programs without ever defining proper functions, which you clearly dislike :-) Awesome job!

  • @TheDwoods14
    @TheDwoods14 2 роки тому +2

    I have no idea about even the littlest thing you've mentioned in this video, but I enjoy your enthusiasm.

  • @Sam-by3uk
    @Sam-by3uk 2 роки тому +22

    Dude your energy is so infectious. You deserve a Nobel Prize or something. God bless.

    • @orjanv
      @orjanv Рік тому +1

      this!

    • @HexaflexagonFan
      @HexaflexagonFan 7 місяців тому

      it's funny cuz the fractal looks like coronavirus lol

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

    I remember the video on the Mandelbrot from 6 years ago .. back then I was in high school .. it was around the time when I just discovered the channel and I really loved your content .. my whole family knows about you because I couldn't shut up or stop watching your live streams and videos
    I remember also sending the video to my Math teacher and he was truly impressed even though english is not our native language
    Man .. I just realised how much you taught me in coding
    Thank you 🙏🙏❤️

  • @sorenschultz1144
    @sorenschultz1144 2 роки тому +136

    THIS IS SICK! I've been obsessed with mandelbrot and buddhabrot fractals for YEARS because of your video on the mandelbrot set. I would LOVE to watch a video on ray marching and shaders!!

    • @enpeacemusic192
      @enpeacemusic192 2 роки тому +8

      Yess a coding challenge for raymarching would be legendary

    • @mariocastrogama6673
      @mariocastrogama6673 2 роки тому +7

      I agree. Please "Fractal god" guide Daniel to render it with shaders. LOL

  • @kevnar
    @kevnar 2 роки тому +1

    I'm not usually so completely lost in these videos, but apparently Daniel wasn't. He got it to work in the end.

  • @RomanianProductions
    @RomanianProductions 2 роки тому +1

    2022 in March, and your still making videos, even C# developers are watching your videos. Amazing!

  • @kieran.stafford
    @kieran.stafford 2 роки тому +25

    Dan, I love to see a new video from you. I am a senior software eng. working in the business for the past 20 years. I love the humanity you bring, along with the self deprecation and humour. I trust Mrs. Gloria Pickle is doing well:) Now to sit down with a cuppa and enjoy this. Thanks again - from Ireland.

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

      Thank you for this lovely and kind comment!!

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому +6

      Oh and yes Gloria is quite happy and enjoying life these days! She says to say woof to you!

  • @sardaou3944
    @sardaou3944 2 роки тому +2

    You make me understand the math part so easily and accompanied all that with your happy attitude it is a work of art. Thank you, sir.

  • @aimanifest
    @aimanifest 2 роки тому +1

    hey, from the future here lol you can take that rendered mandelbulb and save it as an image, and use disco diffusion or stable diffusion to create an image using that image as a mask! this is so amazing, wondering how this could work in python!

  • @betancour
    @betancour 2 роки тому +2

    I've learnt more from this guy than I have in all my years of school and college, and the best part is how much fun it is. I would be an Einstein if I had a teacher like you.

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

    This is my favourite channel on youtube. Your enthusiasm is contagious

  • @ethanmilton7083
    @ethanmilton7083 2 роки тому +1

    Dan, it's me from 10 years in the future! The video you made looks totally awesome. Don't give up!

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

    Awesome video, I have been into fractals for almost a decade and this was one of the most accessible explanations and implementations of the Mandelbulb I have seen.

  • @Muhammed_English314
    @Muhammed_English314 Рік тому +15

    This video is what brought Processing (and your channel) to my attention. Currently finishing your NOC series and planning to learn p5.js next. Thank you old and future Dan!
    Edit: to clarify, I knew of your channel years ago, but I lacked the experience and motivation to watch your videos, and didn't know you had such amazing tutorials!

  • @15Nova22
    @15Nova22 2 роки тому +2

    The best about the videos is neither the cool outcome nor the educational purpose, but rather seeing how much you love coding. It's so sad how often education fails, just because it seems like the one teaching is not even enjoying it themselves, but this enthusiasm is very infecting :D

  • @lukasluftlaufer1093
    @lukasluftlaufer1093 2 роки тому +26

    That was amazing, Dan! "Annihilation" is also a film that shows the beautiful mandelbulb.

  • @Pygon82
    @Pygon82 2 роки тому +7

    Love your content and the way you are teaching the subjects.
    One hint to improve your code further (starting 22:50 ): when the edge is set to false you have to add the previous point to the mandelbulb array. What you did was adding then the next point in the line. Because it is a fractal there is a high chance you hit a whole and the next "edge start" will be added but you are missing almost half the points. "Almost" because on one pixel thin "edge switches" you just got it correct

    • @STLightiix
      @STLightiix 2 роки тому +2

      I was looking for this comment. ty !

  • @MyMattinthehat
    @MyMattinthehat 2 роки тому +10

    This was awesome from start to finish! Really shows the thought process before jumping into coding and of course all the naunces of jumping back and forth! Good job!

  • @benjaminlehmann
    @benjaminlehmann 10 місяців тому +3

    This was great. Thanks for all your work, Daniel. Such a gift to the world!

  • @Manny-mg6ej
    @Manny-mg6ej 2 роки тому +5

    I just found your channel last week, and have just been enjoying these challenges videos. I was having a bad day today but after watching you so enthusiastically solve and explain coding challenge just made me feel a little better. Thanks

  •  2 роки тому +1

    i got interested in generative art bc of you years ago and now i'm learning shaders in university

  • @Typhoon860
    @Typhoon860 2 роки тому +7

    Okay that does it. I have no reason in my field to learn these animations but after watching you have so much fun I'm going to learn JS and processing. I have to board the train. Wish me luck!

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому +5

      Welcome aboard!!

    • @Typhoon860
      @Typhoon860 2 роки тому +2

      @@TheCodingTrain choo choo!

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

      for these sorts of things I would recommend learning GLSL and using shadertoy. much more powerful and not too complicated.

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

    Finally waited long for this one dan , thanks for the delivery you chered up a little neighborhood in Bosnia (south europe) much love as always the magic and long train of coding

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

    you appear in my feed randomly,,i seriously dont understand any stuff about coding and never tried to learn...but the way you teach its really interesting.....i might give a shot and try to learn coding it looks interesting....thank you

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

    3D fractals, complex numbers, coordinate transformations, convergence series..... This video has everything! :D

  • @sennabullet
    @sennabullet 2 роки тому +10

    28:00 I was holding my breath, crossing my fingers, and rooting for you. We really really appreciate the hours and hours you spend...to put together these incredible videos. You're the best Dan!

    • @HdenebH
      @HdenebH 2 роки тому +1

      You surely mean 21:26?

    • @TheCodingTrain
      @TheCodingTrain  2 роки тому +1

      Thank you for the kind feedback!

  • @jeffcummings3842
    @jeffcummings3842 2 роки тому +1

    haha, awesome, and fun! I love how the future you interrupts! thanks for sharing

  • @RajJaiswal538
    @RajJaiswal538 2 роки тому +1

    The part where you compared the code and the white board was really helpful in understanding it.
    Please do it more in other complex algorithms like this

  • @Betruet
    @Betruet 2 роки тому +2

    So crazy you came out with this. The last week I've been obsessed with the Mandelbrot set and coding it and was exploring the idea of 3d this is very cool.

  • @HelloThere-xs8ss
    @HelloThere-xs8ss Рік тому +1

    The pure enjoyment is refreshing.

  • @cuadernoazul5958
    @cuadernoazul5958 2 роки тому +5

    It's great how you make code and maths look easy and pretty fun!
    I'm following your first tutirials of Processing and NOC and thanks to them I did a lot of progress.
    Thanks Daniel!

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

      Easy, not so much but it is certainly fun

  • @moosemanuk
    @moosemanuk 2 роки тому +2

    You are a legend mate, I have never watched one of your videos without a smile on my face the whole way through!

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

    I've been so hooked with the fractal videos from your channel. This is the greatest treat for me. Great work ❤️

  • @x200ants
    @x200ants 2 роки тому +1

    I have fascination for mandelbulb since it was first rendered. It's the first time I really understand the calculus. So I want to say thanks to you !

  • @BenBen-bb7bb
    @BenBen-bb7bb 2 роки тому +1

    This guy explains his process so well, great job

  • @AzamiINFA
    @AzamiINFA 2 роки тому +1

    Not gonna lie I vaguely understand what he's talking about but I love his energy and excitement

  • @chaotickreg7024
    @chaotickreg7024 2 роки тому +1

    The Processing book I read was by Shiffman and half the examples on Processing and p5js site are Shiffman, what a fantastic teacher.

  • @dy5topian
    @dy5topian 2 роки тому +41

    This guy always surpasses his limits ..next he will create a MandelBulb in 4D wait for it.

    • @agisfcp
      @agisfcp 2 роки тому +1

      Wouldn’t be too hard, he would just have to show a cross section of it at a time. The rest will have to stay as calculations.

    • @janet.snakehole
      @janet.snakehole 2 роки тому +1

      or a womandlebulb in 4DD

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

      @@janet.snakehole😂😂

  • @DrIngo1980
    @DrIngo1980 2 роки тому +2

    I love how your future self interrupts/intercepts the video to point out issues with the code and/or explanations given. They way you do this in post production is just really great editing in my opinion. It just shows how much quality your videos have and how great of a teacher you are. Please keep up the great work. Thank you.
    Forgot one thing: as a beard guy myself, I gotta say: nice beard. I am jealous. 😂

  • @FalcoGer
    @FalcoGer 2 роки тому +2

    A really nice visualization is also how quickly the points spiral away. For that you ramp up the iterations and depending on how many iterations it takes to reach your boundary (should be r>2), you color the vertex differently. For example if your max iterations is 256, then if your tested point spirals away in 5 iterations, then you color it in some way, and if it takes 200 iterations before it grows bigger than 2, you color it another way. Anything that takes more than your limit should be considered part of the set

  • @OolaHula
    @OolaHula 8 місяців тому +1

    I asked ChatGPT to use the Mandelbrot set fractal and an external singularity to that fractal to create a set of equations that reduce the fractal into that state of singularity. It then gave a long explanation of equations and summarized with,”These equations and steps provide a conceptual framework for reducing the Mandelbrot set towards a singularity through the introduction of an external influence. Adjusting parameters and experimenting with different values will allow for exploring various behaviors and visual effects.”
    I followed up with would each iteration being drawing towards the singularity appear as a mathematical gravity effect?
    ChatGPT
    Yes, the effect of each iteration being drawn towards the external singularity could indeed resemble a mathematical "gravity" effect. In physics, gravity causes objects to be attracted towards a central mass, and similarly, in this modified Mandelbrot set iteration, points outside the set are attracted towards the external singularity.
    As the iteration progresses, points in the complex plane move towards the external singularity, creating a distortion in the fractal structure around the singularity. This distortion can indeed appear similar to the effect of gravity pulling objects towards a central mass in physical space.
    The strength of the "gravitational" effect would depend on the parameters ss (the position of the external singularity) and kk (the strength of attraction towards the singularity). A higher value of kk would result in a stronger gravitational effect, pulling points towards the singularity more forcefully.
    Overall, this analogy provides an intuitive way to understand how the introduction of an external singularity can influence the behavior of points outside the Mandelbrot set, akin to the way gravity influences objects in physical space.

  • @nyuh
    @nyuh 2 роки тому +1

    NO WAY. I've read a thing talking about this before! Also just encountered it in a game I just finished (manifold garden). Never found out how to do it... UNTIL NOW! YEEEEESSSS thank you very much :D

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

    Been learning opengl recently and thought about doing a 3d mandelbrot and then found this. Amazing content my man!

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

    Just stumbled across you channel and am thoroughly enjoying it! I am getting really strong Cliff Stoll vibes from you, and I could listen to him for dayyys.
    I made a quaternion raytracer between school and uni (that was around 2002/3) just because fractals fascinated me enough to dig into all that math on my own, which really wasn't easy at that time with only the limited ressources on the web then. Complete with self-shadowing and reflection maps, and a marching-cubes based mesh export for funsies as well to feed it into a "real" raytracer. It even included a fully self-made quaternion formula parser (in assembler, wich I hadn't ever used before, and support for variables to avoid re-parsing every iteration) with all the trig functions and stuff so that I could feed it all kinds of iteration instructions by just writing out a formula in text. Later ported it to an "early GPGPU style" form, under DX9 before any of the actual GPGPU stuff like CUDA and such existed. So just bare pixel shaders.
    I think I've never been this proud of any program I made ever since. Man, to have that kind of free time again, sigh!
    I never really got deep into the Mandelbulb maths-wise since it "came out" when I was already caught up in studies and work, so I followed this video with great interest and finally, after all these years, understand how it's actually calculated! Thanks!
    Edit: Heh, I've just noticed this video came out just one day before my 40th birthday. How fitting :)

  • @emanoelbarreiros
    @emanoelbarreiros 2 роки тому +2

    Dude, you are a legend. You are such an inspiration for me and my classes. Congrats!

  • @thecyberfirefly4833
    @thecyberfirefly4833 2 роки тому +1

    your ability to explain and make this kind of complex things funny are insanely awesome ^^

  • @yourlifemasterycoach
    @yourlifemasterycoach 3 місяці тому +1

    You said that C gets replaced and then reinserted into z. That is incorrect, and I'm surprised no-one else caught that! The algorithm is that Z(i+1) = Z(i)^2 + c.

  • @anonymoussloth6687
    @anonymoussloth6687 2 роки тому +6

    Can't wait for the shader version! I am actually learning graphics like opengl these days and good stuff on shaders is hard to come by

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

    These videos are so fun to watch fr

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

    this is my new favorite channel on yT.

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

    This is the most beautiful work of yours I’ve ever seen

  • @chevere3424
    @chevere3424 10 місяців тому

    Amazing how fun you are... I want to be like you. Thanks!!!

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

    Man, I like your energy.

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

    That was awesome.
    I just wanna add a bit more to the Mandelbrot set. It's story is more closely related to the Julia sets, these are obtained by iterating complex polynomials (z^2+C) and taking all the points that behave chaotically, and the Mandelbrot set consists of all those points for which the corresponding Julia set is in one connected piece. Turns out that checking the condition that you're using guarantees connectedness of the Julia set and therefore allows you to know if that "C" is in the Mandelbrot set.

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

    Imo this visualization is even better than the shaded one! Thanks Dan, awesome video

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

    I love every video you do, I love the way you teach different projects about coding, love from Mexico :)

  • @sd5996
    @sd5996 2 місяці тому

    Brilliant teacher

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

    Very nice video. I've been trying to figure out how people actually render those super hi res 3D fractals and really not understanding. So thanks so much for mentioning the term "ray marching." That's just what I was missing!

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

    Really great job, Dan. I love your enthusiasm!

  • @dx8pi6o48
    @dx8pi6o48 2 роки тому +1

    Just caught up with your older videos and I gotta say your coding challenges have gotten significantly better over the years. Mainly in *how* you do them.
    You no longer limit yourself to 10 minutes, you explain what each individual code line does and you're generally much more comprehensible for people who aren't that well-versed in coding.
    Way to go Daniel, You're awesome :)

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

    The result looks fantastic! What an awesome coding challenge this was :)

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

    The biggest shocker of the whole video is at the end mentioning that you don't know how to create shaders. Your already a force to be reckoned with, once you have total command of fragment shader, every pixel will be devastated

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

    love your work

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

    This channel is fantastic.

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

    You are a very nice guy. I love the Mandelbrot idea. Thanks!

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

    I havent done much with 3D, but Im familiar with shaders~ I would do more 3D but besides PIXIJS I kinda go for the "figure it out myself" approach, so I tend to avoid playing with code that "requires" using stuff like Math.js -- just because I'm super stubborn lol, I'd rather "know how to make it" than to use something someone else already made
    BUT
    this is just for the "fun side", in the real world, I'd not be picky like that lol~ Still, this mindset has both helped me and hindered me

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

    Damn this is insane man thank you for this im tripping hard right now i can't wait till i code that myself and look at all those insane fractals

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

    Dan still one of the best content internet can offer

  • @gogobram
    @gogobram 2 роки тому +2

    Been a java developer for 13 years (recently moved to Node.js though),
    Anyway, usually these kind of videos are in Python, which makes it a steep learning curve for me.
    I'm so happy to see something that I can actually run myself, and understand to some degree.
    Amazing job ! :-)

    • @vectoralphaSec
      @vectoralphaSec 2 роки тому +1

      I'm currently learning Python. What videos are you referring to?? would love to see them

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

    Amazing video as always! Could you do a video in the future about the haversine function? I feel like there's a bunch of opportunities for interesting visualizations and animations.

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

    This is more cal 3 than I expected

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

    I really love this channel and everything you do for community. you are the best.

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

    12:48 - As a french I completely approve your choice of name...

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

    Can't wait to clon your code

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

    Bro this is sick
    Edit: i loved watching you struggle with the code. Reminds me of myself exept better 🤣

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

    I've experimented with similar math before, infact it's what I uploaded on yt some years ago...great stuff

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

    Please go back in time and be my maths teacher when I was 11

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

    Can we just a take a moment to appreciate his clear pronunciation of z?

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

    Man I'm so glad I found your content dude
    It fills a void I didn't know I had lol
    EDIT:
    I'd join, but eventho your content fills a void, a void fills my wallet

  • @SxC97
    @SxC97 2 роки тому +2

    thats such a cool shape! I kind of want to 3d print one and just hold it...

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

    Really impressive tutorial!

  • @eeddeellwweeiiss
    @eeddeellwweeiiss 2 роки тому +1

    Thank you for your amazing videos! Could you do a video in the future about soft bodies?

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

    This channel is so awesome!!! This one is a fantastic progression from the original 2d Mandelbrot set video you did!
    Cheers! Many thanks

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

    I watched the whole live loved it✨

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

    Watching him doing this crazy coding challenges . I am amazed and sad at same time ( as a student )

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

      Why sad?
      Try some of them yourself!
      If you can't make it, there's no shame in watching the tutorial or asking online
      We're all here to help each other and grow

  •  2 роки тому

    Does this dude has something in Python? Because it would be the most entertaining thing to see

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

    Yeah I think my brain just left me. This was an amazing video and with good mathematical explanation. Now off I go to learn more about polar coordinates.

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

    Better than university education. Online courses become viral in the near future. Prodigies learn all knowledge online. AI battle with human beings prodigIes.

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

    This reminds me of playing with holographs with Wire in Gmod 🙂

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

    you're awesome keep doing what you do

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

    This channel is so much fun lol

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

    you are awesome, please continue with this valuable job

  • @ramingo.craftsman
    @ramingo.craftsman Рік тому

    Thanks! It has been so interesting! 🤟

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

    I managed to do the ray marching bit and got it to work using shaders. It's pretty cool actually!

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

      Please share if you like! thecodingtrain.com/discord

  • @gruvhagen
    @gruvhagen 9 місяців тому

    I was about to say that this man has not discovered ChatGPT yet, then I saw that the video was a year ago when chat GPT didn’t exist

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

    "The square root of -1 is actually something very real" - The source of my aneurysm

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

    Love your videos!

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

    3D fractals! That's a whole new level.