Coding Challenge 168: MandelBulb 3D Fractal

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

КОМЕНТАРІ • 329

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

    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?

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

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

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

      this!

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

      it's funny cuz the fractal looks like coronavirus lol

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

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

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

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

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

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

  • @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 🙏🙏❤️

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    The pure enjoyment is refreshing.

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

  • @yourlifemasterycoach
    @yourlifemasterycoach 4 місяці тому +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.

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

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

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

    this is my new favorite channel on yT.

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

    This guy explains his process so well, great job

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

  • @OolaHula
    @OolaHula 9 місяців тому +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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    These videos are so fun to watch fr

  • @JamesRoberts-r5v
    @JamesRoberts-r5v 2 роки тому

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

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

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

    Man, I like your energy.

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

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

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

    The best coding channel ever!!

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

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

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

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

    This channel is fantastic.

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

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

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

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

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

    yall ever had a pet that would sit and stare while you did something? That profound cluelessness but still interested? That describes me with any kind of math.

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

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

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

    Danke!

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

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

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

    Dan still one of the best content internet can offer

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

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

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

    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

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

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

    Brilliant teacher

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

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

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

    As a german always reading it as "almond bread" is just such a blessing...or a curse?

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

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

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

    This channel is so much fun lol

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

    Really great job, Dan. I love your enthusiasm!

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

    Thanks! It has been so interesting! 🤟

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

    I LOVE THIS GUY, ENERGY!!

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

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

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

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

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

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

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

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

    Please, please , PLEASE show us how to build and use shaders and do ray marching!!

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

    Can't wait to clon your code

  •  2 роки тому

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

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

    I don't know why but my canvas is grey. i don't see any point cloud or something and I don't understand where is the problem. how can I fix that? :(

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

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

    Really impressive tutorial!

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

    love your work

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

    I watched the whole live loved it✨

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

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

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

    Love your videos!

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

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

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

    Can you explain stable diffusion used in image genaration !

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

    We love you too!!! :)

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

    This is more cal 3 than I expected

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

    Simply awesome

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

    you are awesome, please continue with this valuable job

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

    I am in love with this channel