You are a gem in the programming space of RUclips. You've inspired a lot of other successful programmers on here and also me (just as a hobbyist, but still). Keep making what you love and we'll love it
@@spaztor7723 well, as a starter for visualizations like this I recommend processing/p5.js. it's not the fastest, the sturdiest or prettiest, but the ease of use is unparalleled. I have spent countless hours in it and I've loved every second
@@spaztor7723i dont even know what “constant;” does but i have adhd, autism, the determination of someone trying undertale for the 1st time and doing true genocide, an ungodly amount of love for cool stuff like fractals, a BEAST of a computer and i am going to do this.
Writing a fractal render was one of my favorite projects of all times. I hope you making this as accessible as you did with this video opens allows others to experience the awe when their code creates beauty in front of their eyes.
In a highschool programming class right now, and seeing this has raised motivation to the max. Still going over the basics (in python), but one day I will make something like this. Thank you Pezzza for the inspiration and I hope my comment is meaningful in some way.
Good luck on your journey! If I were to make a suggestion, use a language that supports multithreading, like C++! Or, you could learn a shader language🙂 (GPUs aren't *quite* as bad at using double-precision as it might sound, although they are still pretty slow at it. There are techniques to mitigate this, though!)
Go for it! The output of these fractal images looks really complex, but the math is simple. Some of the biggest bang for the buck is to be had displaying a color palette instead of a grayscale gradient. Then your renders will come to life.
If you want arbitrary precision while using your GPU, you can use perturbative techniques by computing only a few points with high precision on your CPU, and then computing all other points in low precision on the GPU. Choosing the points is tricky, though
Your videos are always inspiring. I remember the time I was myself trying to render Julia sets, I was really happy to see the results. I hope other people try this as well as this is very rewarding!
Thank you so much for this! I'm in a rush but I wanted to express that your simple, straightforward explanation and approach to fractal rendering has opened my mind to the possibility of doing something similar myself! I've been hoping for this knowledge for a long time. Thank you so much for creating this video as a vessel by which I can begin my journey of understanding!
Very beautiful video! All the aspects were so well done. Especially underrated is the sound mixing and the music that follows the camera down at the end. Thank you very much for making this! For 11 minutes of watch time it probably took much longer than that to make and produce. I appreciate the time and effort you took.
Came across this channel a few days ago, and I must say this is one of the best channels for programming and math. I have an exam, after that, I plan to binge watch all you videos. The Cool Chicken is a very cool guy.
I have written a program that renders Julia Sets by using texture mapping to do the inverse iteration method. Basically if you compute the inverse of the function and map the entire plane backwards it will eventually converge to the Julia Set. I'm using this for a music visualizer so we blend the frames together and the Julia Set emerges as the points with colour. I have video of it running. I blends a sort of oscilloscope visualization on top of the frame and then uses that as input to do the Julia Set inverse iteration in the next frame. You can see how the copies of the scope shrink and copy around to build up the shape of the set. The nice thing about doing the inverse iteration with texture mapping is that you *actually* compute the forward function to determine the source pixel for the texture map operation, the texture mapping to the output effectively makes it doing the inverse. The other nice thing about this is that precision isn't really critical and GPUs are REALLY good at texture mapping. I have written the same thing for both CPU and GPU (via OpenGL 2.1, so it runs on a potato), can't do a zoom though, the algorithm requires you to keep an image of the entire circle that the Julia Set might be in (that is the same circle you use as the escape radius). I have explained this poorly I know. Video of it running: ruclips.net/video/PD1ZlkNf7GQ/видео.html It's open source so code is at: github.com/Spudd86/julia-vis
The one thing that keeps blowing my mind every time in his videos is how he can optimize the shit out of the rendering time with just "simple" logic and few lines of code, and then he basically says "I can optimize it even more but I don't want to" 😎
I've always seen Mandelbrot used for these types of videos, very neat to see another type used. The difference in where the pixel coordinates go in the looping equation seems to be the only real difference, being C for Mandelbrot, and Z_0 for this. Very nice video
@@tjavado yeah, that's what was said in the video, I just thought it was a nice alternative. Tbh I probably would've clicked off if it was Mandelbrot again :P
Thank you so much for making this video. I was always interested in making a fractal render but just didnt know what to do or the steps involved, I felt paralysed. This was really helpful. I need to learn to problem solve on my own too without being baby fed :)
There's another cool fractal you can make called the mandelbrot set using the same equation. You're currently rendering julia sets. For julia sets, you set c to a fixed position on the plane while changing z for every pixel. Instead for the mandelbrot set, you just set c so it also changes with z. I personally think the mandelbrot set looks way better than the julia sets since it's a combination of all possible julia sets for every pixel.
The fractals here are Julia Sets. If anyone following along wants to generate the Mandelbrot set instead, it’s quite easy. Instead of an arbitrary C value, for each pixel, set C equal to the complex coordinate of that pixel. So, instead of Z(n+1) = Z(n)^2 + C, replace C with Z(0).
A quick tip for getting more detail in the fractal: instead of making the gradient have more range, you can just use a mod function or a sin function to color it based on the iteration count. Kind of like how Wikipedia does it.
You can also pull out an extra 4x to 8x performance (depending on your cpu) by using SIMD instructions instead of your normal floating point math. It’s a lot of effort to manually code with SIMD instructions, but worth it for the better perf.
@@Henrix1998 unfortunately, its too complex for compilers to translate into SIMD instructions as you have to change the code logic quite a bit from regular Mandelbrot code in order to make full use of the SIMD instructions
@@puddleglum5610 Maybe by creating a "computeNextFor8pixels" which does just that (taking also 8 times the input and returning a struct or something like that), and turning optimizations up? I've had good luck doing that with random number generators (like pcg64), don't see why this should be any harder for the compiler.
@@user-sl6gn1ss8p Just use SSE/AVX intrinsics, not too complicated in this case. If you have to rewrite the code just for the compiler to better optimize, you might as well optimize it manually.
Kid: "What if it's made of dragons? And the dragons are made of even SMALLER dragons? And those are made of even SMALLER dragons? And it's just that, forever?" Parent: "Fractal." Kid: :O I think we've all asked the "what if it's made of more of it" question before.
I think basically everyone here knows about the Mandelbrot set and Julia sets, but those who don't should check out Numberphile's video about it with Ben Sparks. It's amazing.
You inspired me that much so I just finished my Julia explorer in C++SDL. It is 1am 😅 with 16 threads on my i7 6gen it is not super fast. I have idea of caching images and showing them until next frame is finished being rendered. Bit it wont help with animated fractals.
Nice video! But I don't understand why you resorted to CPU execution.. Most GPUs actually support double precision (at least all that support OpenGL 4.0.0 [natively! looking at you, Apple M1 :/]). I wrote a clumsy unoptimized fractal renderer once too and it ran flawlessly on GPUs (smooth motion/zooming) with full double-precision (max zoom ca. by factor one quadrillion) and I'm sure there's some optimizations that would make it much better if I had the time (and intelligence) to implement them. Anyways love how polished yours turned out! Congrats on (almost) 100k!
i made a program in 9th grade creating the mandelbrot set using 255 iterations. it had terrible performance but i liked it. made it with turbo pascal back then
nice video i wish you would have talked about the fact that there was colour banding tho because only 8 bits per channel were used instead of 10 or higher
Your really good at making simulations! I have a suggestion. You should try making a simulation like the powder toy "TPT" for short but in 3D! That would be pretty cool.
You're like a more math-focused Sebastian Lague, great content!
Exactly
Fractal worlds?
If we are already comparing I like this channel better! CPP and sdl all the way!
@@user-cx6ec2kp6u SFML not SDL
100%
You are a gem in the programming space of RUclips. You've inspired a lot of other successful programmers on here and also me (just as a hobbyist, but still).
Keep making what you love and we'll love it
where does an idiot such as myself begin in making somthing like this, a hobby??
@@spaztor7723 well, as a starter for visualizations like this I recommend processing/p5.js. it's not the fastest, the sturdiest or prettiest, but the ease of use is unparalleled. I have spent countless hours in it and I've loved every second
@@spaztor7723i dont even know what “constant;” does but i have adhd, autism, the determination of someone trying undertale for the 1st time and doing true genocide, an ungodly amount of love for cool stuff like fractals, a BEAST of a computer and i am going to do this.
Writing a fractal render was one of my favorite projects of all times. I hope you making this as accessible as you did with this video opens allows others to experience the awe when their code creates beauty in front of their eyes.
That zoom with the music was just magical
In a highschool programming class right now, and seeing this has raised motivation to the max.
Still going over the basics (in python), but one day I will make something like this.
Thank you Pezzza for the inspiration and I hope my comment is meaningful in some way.
Good luck on your journey! If I were to make a suggestion, use a language that supports multithreading, like C++! Or, you could learn a shader language🙂 (GPUs aren't *quite* as bad at using double-precision as it might sound, although they are still pretty slow at it. There are techniques to mitigate this, though!)
You could absolutely plot a Julia set like this in Python. It would be a great project for a high school student. Good luck.
Try Nim language
Nim has syntax of Python
And speed of C
Go for it! The output of these fractal images looks really complex, but the math is simple. Some of the biggest bang for the buck is to be had displaying a color palette instead of a grayscale gradient. Then your renders will come to life.
Since I was a kid, I've been fascinated by the fractals... I could spend HOURS watching zooming videos about fractals XD
The more fascinating thing is your video. Thanks so much for you awesome content.
Thank you!
Came for the programming. Stayed for the existential crisis.
If you want arbitrary precision while using your GPU, you can use perturbative techniques by computing only a few points with high precision on your CPU, and then computing all other points in low precision on the GPU. Choosing the points is tricky, though
Yes this is the methode use by Kalles Fraktaler, an amazing fracal render
@@AiRde I once tried to implement but the result was awful and glitchy. I would really have to make something smarter to pick the point.
Fractals are quite nice.
Yes.
For sure
Definitely
Indeed.
absolutely
That is fascinating to watch ! I love how the background of the fractal is still indicating some sort of position despite the infinite similarity
Criminally underrated, your content always amazes me in its complex simplicity. Keep it up!
I love this, man. Programming is the coolest hobby ever and I'm so happy to be here. Awesome video, keep it up!
Your videos are always inspiring. I remember the time I was myself trying to render Julia sets, I was really happy to see the results. I hope other people try this as well as this is very rewarding!
That was a very intriguing dive into the subject, whenever you post something I'm immediately hooked to try that myself. Great Work as always!
Because of the way our brain processes grays, the fractal had a lot of detail on the borders of the greys that made them very interesting.
Perfect. Love your work.
Thank you so much for this! I'm in a rush but I wanted to express that your simple, straightforward explanation and approach to fractal rendering has opened my mind to the possibility of doing something similar myself! I've been hoping for this knowledge for a long time. Thank you so much for creating this video as a vessel by which I can begin my journey of understanding!
I love this!!! Great videos. Love the easy to follow code examples & visual output (like the multithreaded rendering), very cool!
Very beautiful video! All the aspects were so well done. Especially underrated is the sound mixing and the music that follows the camera down at the end. Thank you very much for making this! For 11 minutes of watch time it probably took much longer than that to make and produce. I appreciate the time and effort you took.
This is one of the coolest things I have ever seen.
love this content! Keep improving and it’ll be amazing. Also love when you show all the optimizations you’ve made and their downsides
Came across this channel a few days ago, and I must say this is one of the best channels for programming and math. I have an exam, after that, I plan to binge watch all you videos. The Cool Chicken is a very cool guy.
The only thing missing from this masterpiece is a quick zooming out at the end to show everything in its full glory
Your videos go better and better, please never end
That's pure madness. I love it.
Beautiful fractals. Beautiful numbers.
I have written a program that renders Julia Sets by using texture mapping to do the inverse iteration method. Basically if you compute the inverse of the function and map the entire plane backwards it will eventually converge to the Julia Set.
I'm using this for a music visualizer so we blend the frames together and the Julia Set emerges as the points with colour. I have video of it running. I blends a sort of oscilloscope visualization on top of the frame and then uses that as input to do the Julia Set inverse iteration in the next frame. You can see how the copies of the scope shrink and copy around to build up the shape of the set.
The nice thing about doing the inverse iteration with texture mapping is that you *actually* compute the forward function to determine the source pixel for the texture map operation, the texture mapping to the output effectively makes it doing the inverse.
The other nice thing about this is that precision isn't really critical and GPUs are REALLY good at texture mapping. I have written the same thing for both CPU and GPU (via OpenGL 2.1, so it runs on a potato), can't do a zoom though, the algorithm requires you to keep an image of the entire circle that the Julia Set might be in (that is the same circle you use as the escape radius).
I have explained this poorly I know.
Video of it running: ruclips.net/video/PD1ZlkNf7GQ/видео.html
It's open source so code is at: github.com/Spudd86/julia-vis
Oh, you didn't write in Julia... What a missed opportunity :p
@@jonasdaverio9369 Julia didn't exist when I started...
Congratulations on this awesome video man!
Videos like this make me want to learn C#
The one thing that keeps blowing my mind every time in his videos is how he can optimize the shit out of the rendering time with just "simple" logic and few lines of code, and then he basically says "I can optimize it even more but I don't want to" 😎
My favorite channel. Every video you post makes me at least raise my eyebrows
This is absolutely dope👌
wonderful content as always, is so well explained it seems super easy, barely an inconvenience.
Definitely need more simplified coding channels like these!
You really had me for a second there with the logo showing up at the end.
:D
I never get tired of fractals!
Well, that last bit was existentially terrifying. Bravo!
Excellent as always Pezzza! Amazing coincidence that there's a chicken in the fractal too.
Yes I was very surprised myself !!
I've always seen Mandelbrot used for these types of videos, very neat to see another type used. The difference in where the pixel coordinates go in the looping equation seems to be the only real difference, being C for Mandelbrot, and Z_0 for this. Very nice video
this is actually a julia set of the mandelbrot iirc
@@tjavado yeah, that's what was said in the video, I just thought it was a nice alternative. Tbh I probably would've clicked off if it was Mandelbrot again :P
absolutely amazing video, very cool stuff !!!❤️
Thank you so much for making this video. I was always interested in making a fractal render but just didnt know what to do or the steps involved, I felt paralysed. This was really helpful. I need to learn to problem solve on my own too without being baby fed :)
It is a really nice idea to perform the sub-pixel computations.
I love your content, please keep them coming!!!
Thanks for sharing this. Hope this inspires future talent!
Ooo pretty colors!
mesmerizing!
I'm amazed about how far double precision goes In comparison to float. Great content!
Really amazing work. 👏
I love your content I hope you get more subs and such and I hope to watch your wonderful channel grow
Thank you! I’ll do my best :)
Magnifique !
This is so awesome
There's another cool fractal you can make called the mandelbrot set using the same equation. You're currently rendering julia sets. For julia sets, you set c to a fixed position on the plane while changing z for every pixel. Instead for the mandelbrot set, you just set c so it also changes with z. I personally think the mandelbrot set looks way better than the julia sets since it's a combination of all possible julia sets for every pixel.
Lol I thought this was a mandelbrot set until this comment 😂 ty for teaching
I love how the video takes it's time at around 1:25.
Toujours aussi intéressant 😉
nicely done, very interesting
The fractals here are Julia Sets. If anyone following along wants to generate the Mandelbrot set instead, it’s quite easy. Instead of an arbitrary C value, for each pixel, set C equal to the complex coordinate of that pixel. So, instead of Z(n+1) = Z(n)^2 + C, replace C with Z(0).
this is really cool! Thank you!
After watching the video this comment section is continuously zooming out for me. My eyes and brain can't keep up with fractals!
j'adore tes vidéos mec continue
incroyable !!! vraiment impressionant
Merci !
A quick tip for getting more detail in the fractal: instead of making the gradient have more range, you can just use a mod function or a sin function to color it based on the iteration count. Kind of like how Wikipedia does it.
Amazing video and channel!!! Thanks!!
i just wanted to let u know that u have my sub :) cause i really liked ur ants and stuff :))
thank u for ur continued dedication to the cause :)))
Beautiful work, thank you for the video pezzza
Great as always !
i love when you upload!
You can also pull out an extra 4x to 8x performance (depending on your cpu) by using SIMD instructions instead of your normal floating point math. It’s a lot of effort to manually code with SIMD instructions, but worth it for the better perf.
There's some compiler flags that probably could make use of SIMD without any extra effort
@@Henrix1998 unfortunately, its too complex for compilers to translate into SIMD instructions as you have to change the code logic quite a bit from regular Mandelbrot code in order to make full use of the SIMD instructions
@@puddleglum5610 Maybe by creating a "computeNextFor8pixels" which does just that (taking also 8 times the input and returning a struct or something like that), and turning optimizations up?
I've had good luck doing that with random number generators (like pcg64), don't see why this should be any harder for the compiler.
@@user-sl6gn1ss8p Just use SSE/AVX intrinsics, not too complicated in this case. If you have to rewrite the code just for the compiler to better optimize, you might as well optimize it manually.
@@INT41O fair enough, I'll look into it
looking at this video motivated me to give this a try in python, fractals are just amazing....
Incredible 😮💨
the infinity of cosmic shrimp
Might have been the quickest 11 minutes of my life
is it true that there is a chicken at that point in the fractal, or have you edited it in?
I believe it's chickens all the way down.
that's incredible
This is cool god teir maths. I wish I listened more in school and now I need to become a computer programmer!
Kid: "What if it's made of dragons? And the dragons are made of even SMALLER dragons? And those are made of even SMALLER dragons? And it's just that, forever?"
Parent: "Fractal."
Kid: :O
I think we've all asked the "what if it's made of more of it" question before.
Awesome! I’d love to see this in 3d next 😅
absolutely epic
Awesome video! 👍
Sorry for my late reply, didn't see your comment! Thank you very much for your support!
magic! thank you!
I think basically everyone here knows about the Mandelbrot set and Julia sets, but those who don't should check out Numberphile's video about it with Ben Sparks. It's amazing.
Got a loading spinner right at the RIP float moment, which was quite funny xD
bro you are amazing
You are amazing 👏👏👏
Your English has improved so much since the phalanx video
Great content, keep it up mate!
This is amazing, thanks! more about fractals in graphics please
Nice! I always wanted to code my own fractal diver
You inspired me that much so I just finished my Julia explorer in C++SDL. It is 1am 😅 with 16 threads on my i7 6gen it is not super fast. I have idea of caching images and showing them until next frame is finished being rendered. Bit it wont help with animated fractals.
Nice video! But I don't understand why you resorted to CPU execution.. Most GPUs actually support double precision (at least all that support OpenGL 4.0.0 [natively! looking at you, Apple M1 :/]).
I wrote a clumsy unoptimized fractal renderer once too and it ran flawlessly on GPUs (smooth motion/zooming) with full double-precision (max zoom ca. by factor one quadrillion) and I'm sure there's some optimizations that would make it much better if I had the time (and intelligence) to implement them.
Anyways love how polished yours turned out! Congrats on (almost) 100k!
It could be so fun to build a game in which you control a character that coule navigate into fractale structures
Amazing ❤️👏👏👏
Ohhhh cet accent Français je reconnais :)
Nice work Pezza !!
OBS video transition examples while explaining the Xaos method? So cool!
You can use that "smooth_iteration" as an elevation, and render it in (false) 3D
God makes incredible things I always watch his videos when he makes one
The pronoun in the second sentence seems to be referring to God, and it looks like you forgor :skull: the periods.
@@brianmiller4614 this was supposed to offend religious people not grammer nazis
@@HenrichAchberger Thanks, that reply made me laugh way harder than it should have! :D
i made a program in 9th grade creating the mandelbrot set using 255 iterations. it had terrible performance but i liked it. made it with turbo pascal back then
nice video i wish you would have talked about the fact that there was colour banding tho because only 8 bits per channel were used instead of 10 or higher
This is a great example of why double precision is overkill for most applications.
Thanks! I can now make my own memetic agent
Just wanted to say, incredible username and good luck
Your really good at making simulations!
I have a suggestion.
You should try making a simulation like the powder toy "TPT" for short but in 3D!
That would be pretty cool.