Coding Challenge 168: MandelBulb 3D Fractal

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии •

  • @SebastianLague
    @SebastianLague 2 года назад +767

    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 года назад +26

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

    • @orjanv
      @orjanv Год назад +1

      this!

    • @HexaflexagonFan
      @HexaflexagonFan 9 месяцев назад

      it's funny cuz the fractal looks like coronavirus lol

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

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

  • @TheDwoods14
    @TheDwoods14 2 года назад +2

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

  • @ColeCoug
    @ColeCoug 2 года назад +3

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

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

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

  • @benjaminlehmann
    @benjaminlehmann 11 месяцев назад +3

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

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

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

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

  • @RomanianProductions
    @RomanianProductions 2 года назад +1

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

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

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

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

  • @pyrokinetikrlz
    @pyrokinetikrlz 2 года назад +3

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

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

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

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

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

  • @HelloThere-xs8ss
    @HelloThere-xs8ss Год назад +1

    The pure enjoyment is refreshing.

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

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

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

  • @bizarrapmusic
    @bizarrapmusic 2 года назад +3

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

    • @TheCodingTrain
      @TheCodingTrain  2 года назад +2

      Thank you! Please share what you make!

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

  • @BenBen-bb7bb
    @BenBen-bb7bb 2 года назад +1

    This guy explains his process so well, great job

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

  • @jeffcummings3842
    @jeffcummings3842 2 года назад +1

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

  • @emanoelbarreiros
    @emanoelbarreiros 2 года назад +2

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

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

  • @thecyberfirefly4833
    @thecyberfirefly4833 2 года назад +1

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

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

  • @m1kr0kosmos
    @m1kr0kosmos 2 года назад

    this is my new favorite channel on yT.

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

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

  • @KappaXBeta
    @KappaXBeta 2 года назад

    Danke!

  •  2 года назад +1

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

  • @jorgemedina5602
    @jorgemedina5602 2 года назад

    The best coding channel ever!!

  • @JamesRoberts-r5v
    @JamesRoberts-r5v 2 года назад

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

  • @NikELbErGErBergel
    @NikELbErGErBergel 2 года назад

    These videos are so fun to watch fr

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

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

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

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

  • @peopletakepicturesofeachother
    @peopletakepicturesofeachother 2 года назад

    This channel is fantastic.

  • @AzamiINFA
    @AzamiINFA 2 года назад +1

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

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

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

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

  • @didytel
    @didytel 2 года назад

    Man, I like your energy.

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

  • @giuliobordignon
    @giuliobordignon 2 года назад

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

  • @perrysec
    @perrysec 2 года назад

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

  • @ramingo.craftsman
    @ramingo.craftsman Год назад

    Thanks! It has been so interesting! 🤟

  • @shfunky
    @shfunky 2 года назад

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

  • @juancarloslopezvillegas5629
    @juancarloslopezvillegas5629 2 года назад

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

  • @alexlangevin8340
    @alexlangevin8340 2 года назад

    Love your videos!

  • @phant0mlink
    @phant0mlink 2 года назад

    Really great job, Dan. I love your enthusiasm!

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

  • @sayantanghosh9576
    @sayantanghosh9576 2 года назад

    I watched the whole live loved it✨

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

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

  • @drazenhizak5447
    @drazenhizak5447 2 года назад

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

  • @sandorkonya
    @sandorkonya 2 года назад

    Really impressive tutorial!

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

  • @Recapitalis
    @Recapitalis 2 года назад

    you are awesome, please continue with this valuable job

  • @pactube8833
    @pactube8833 2 года назад +1

    I LOVE THIS GUY, ENERGY!!

  • @sd5996
    @sd5996 4 месяца назад

    Brilliant teacher

  • @OolaHula
    @OolaHula 10 месяцев назад +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.

  • @Noedell
    @Noedell 2 года назад

    I am in love with this channel

  • @chevere3424
    @chevere3424 11 месяцев назад

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

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

  • @diehun1002
    @diehun1002 2 года назад

    That was wild, thank you!

  • @burnfire4617
    @burnfire4617 2 года назад

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

  • @dj67084
    @dj67084 2 года назад

    This channel is so much fun lol

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

  • @somajuice666
    @somajuice666 2 года назад

    I LOVE YOU

  • @FlashDesignsTM
    @FlashDesignsTM 2 года назад

    you're awesome keep doing what you do

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

  • @kiritgupta
    @kiritgupta 2 года назад +2

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

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

  • @anywallsocket
    @anywallsocket 2 года назад +3

    love your work

  • @GeorgeDekker
    @GeorgeDekker 2 года назад

    Thank you! Very much enjoyed watching this :-)

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

  • @upizganagabka9765
    @upizganagabka9765 2 года назад

    That's to reallly cool of like this code!
    You are best :D
    Thanks for you movies !

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

  • @doncandelario9102
    @doncandelario9102 Год назад

    Simply awesome

  • @jvoynar5826
    @jvoynar5826 2 года назад

    Thanks for the coding inspiration. Hail Baltimore!

  • @eeddeellwweeiiss
    @eeddeellwweeiiss 2 года назад +1

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

  • @jonathanizquierdo1144
    @jonathanizquierdo1144 2 года назад

    This is more cal 3 than I expected

  • @Oribi5
    @Oribi5 Год назад

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

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

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