title
Coding Challenge 168: MandelBulb 3D Fractal

description
It's the Mandelbulb! What happens when you take the original fractal (The Mandelbrot Set) and extend it into 3D space? And how do you visualize it in Processing (Java) as a point cloud? https://thecodingtrain.com/challenges/168-the-mandelbulb πŸŽ₯ Previous video: https://youtu.be/a35KWEjRvc0?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH Links discussed in this video: πŸ”— The Unraveling of the Real 3D Mandelbulb 1: https://www.skytopia.com/project/fractal/mandelbulb.html πŸ”— The Unraveling of the Real 3D Mandelbulb 2: https://www.skytopia.com/project/fractal/2mandelbulb.html πŸ”— Processing: https://processing.org πŸ”— MandelBulb wikipedia: https://en.wikipedia.org/wiki/Mandelbulb πŸ”— PeasyCam: https://mrfeinberg.com/peasycam/ πŸ”— Inigo Quilez website: https://iquilezles.org/ Other videos mentioned in this video: πŸŽ₯ Mandelbulb (raymarched SDF): https://youtu.be/eKUh4nkmQbc πŸŽ₯ Mandelbrot Set with p5.js: https://youtu.be/6z7GQewK-Ks πŸŽ₯ Spherical Geometry: https://youtu.be/RkuBWEkBrZA Timestamps: 0:00 Introducing Today’s Topic 1:31 The MandelBrot set explained 4:31 Triplex numbers 5:11 Voxels in Processing 6:36 Adding PeasyCam 7:19 Spherical coordinates 9:18 The power of triplex numbers 10:51 Implementing power formulas 15:26 Converting cartesian to Spherical 19:26 Setting up the MandelBulb 22:00 First MandelBulb 22:23 Optimising visualisation 24:47 Pointcloud MandelBulb 25:47 Variation ideas 27:04 The MandelBulb returns 27:31 See you next time! πŸš‚ Website: http://thecodingtrain.com/ πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/Guides/community-contribution-guide.html 🚩 Suggest Topics: https://github.com/CodingTrain/Rainbow-Topics πŸ’‘ GitHub: https://github.com/CodingTrain πŸ’¬ Discord: https://discord.gg/hPuGy2g πŸ’– Membership: http://youtube.com/thecodingtrain/join πŸ›’ Store: https://standard.tv/codingtrain πŸ“š Books: https://www.amazon.com/shop/thecodingtrain πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/ πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA πŸ”— p5.js: https://p5js.org πŸ”— p5.js Web Editor: https://editor.p5js.org/ πŸ”— Processing: https://processing.org πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/website/issues/new

detail
{'title': 'Coding Challenge 168: MandelBulb 3D Fractal', 'heatmap': [{'end': 1502.937, 'start': 1478.202, 'weight': 1}, {'end': 1633.193, 'start': 1613.022, 'weight': 0.81}], 'summary': 'Explores creating a 3d mandelbulb, using spherical coordinates transformation, avoiding infinite loops, and visualizing and rendering the mandelbulb in p5.js, aiming to enable viewers to generate different versions of the fractal pattern and discussing future exploration opportunities and learning resources.', 'chapters': [{'end': 265.07, 'segs': [{'end': 47.522, 'src': 'embed', 'start': 16.458, 'weight': 0, 'content': [{'end': 22.541, 'text': "It's my hope that we're going to get to the point where we understand the Mandelbulb able to write the code for the Mandelbulb and then you,", 'start': 16.458, 'duration': 6.083}, {'end': 32.448, 'text': 'the viewing audience, will take it from there and make all sorts of beautiful versions of this amazing, intricate, fantastical fractal pattern in 3D.', 'start': 22.541, 'duration': 9.907}, {'end': 36.212, 'text': 'Now, before I get going, I want to mention two previous videos.', 'start': 32.908, 'duration': 3.304}, {'end': 40.275, 'text': 'One is my Mandelbrot coding challenge from six plus years ago.', 'start': 36.712, 'duration': 3.563}, {'end': 47.522, 'text': 'That is the origin story of the Mandelbulb itself, as well as my spherical geometry coding challenge,', 'start': 40.716, 'duration': 6.806}], 'summary': 'Hope to enable viewers to create 3d mandelbulb versions from code, based on previous mandelbrot and spherical geometry challenges.', 'duration': 31.064, 'max_score': 16.458, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA16458.jpg'}, {'end': 265.07, 'src': 'embed', 'start': 218.044, 'weight': 1, 'content': [{'end': 221.046, 'text': "It's going to kind of oscillate around a stable value.", 'start': 218.044, 'duration': 3.002}, {'end': 229.993, 'text': "So I'm examining every single point on this complex plane, running this algorithm and determining whether it stays bounded or tends to infinity.", 'start': 221.266, 'duration': 8.727}, {'end': 232.934, 'text': 'The set of the points that stay bounded.', 'start': 230.213, 'duration': 2.721}, {'end': 238.036, 'text': 'I always get this confused, but the set of the points that stay bounded is the Mandelbrot set.', 'start': 232.954, 'duration': 5.082}, {'end': 246.578, 'text': 'If I color all of those points black and all the other points that are not part of the Mandelbrot set white, I will see this fractal pattern.', 'start': 238.476, 'duration': 8.102}, {'end': 257.745, 'text': 'So if this is the Mandelbrot set, what is the Mandelbulb? The Mandelbrot set is inherently a fractal that lives in two dimensions.', 'start': 246.838, 'duration': 10.907}, {'end': 265.07, 'text': 'Instead of a complex number, could we use something called a triplex number?', 'start': 257.986, 'duration': 7.084}], 'summary': 'Algorithm examines complex plane points, reveals mandelbrot set fractal pattern.', 'duration': 47.026, 'max_score': 218.044, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA218044.jpg'}], 'start': 0.549, 'title': 'Mandelbulb and mandelbrot set', 'summary': 'Delves into the coding challenge of creating a 3d mandelbulb, aiming to enable viewers to generate different versions of the fractal pattern. it also explores the mandelbrot set, a fractal pattern defined by the behavior of complex numbers under iteration.', 'chapters': [{'end': 102.652, 'start': 0.549, 'title': 'Mandelbulb: fractal coding challenge', 'summary': 'Explores the coding challenge of creating a 3d mandelbulb, discussing its history, math concepts, and the goal to enable viewers to create various versions of the fractal pattern.', 'duration': 102.103, 'highlights': ['The concept of creating a 3D Mandelbulb was first proposed in 1997 by Jules Ries, with the 2009 version developed by Daniel White and Paul Nylander.', 'The chapter delves into the history and math concepts, including the origin story of the Mandelbulb and the spherical geometry coding challenge from six plus years ago.', 'The goal is to enable the viewing audience to create various versions of the Mandelbulb fractal pattern in 3D space by understanding and writing the necessary code.']}, {'end': 265.07, 'start': 107.503, 'title': 'Understanding the mandelbrot set', 'summary': 'Discusses the mandelbrot set, a fractal pattern on a complex plane defined by the behavior of complex numbers under iteration, determining whether they stay bounded or tend to infinity.', 'duration': 157.567, 'highlights': ['The Mandelbrot set is determined by running an algorithm on every single complex number on a plane, checking if the result stays bounded or tends to infinity. The idea is to examine every single point on the complex plane, running an algorithm to determine whether it stays bounded or tends to infinity. The set of points that stay bounded is the Mandelbrot set.', 'The Mandelbrot set appears as a fractal pattern when points that stay bounded are colored black, creating a visually striking image. The Mandelbrot set is visualized by coloring the points that stay bounded black and the others white, resulting in a fractal pattern on the complex plane.', 'The Mandelbrot set is a fractal that lives in two dimensions, defined by the behavior of complex numbers under iteration. The Mandelbrot set is described as a fractal pattern on a complex plane, inherently living in two dimensions and determined by the behavior of complex numbers under iteration.']}], 'duration': 264.521, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA549.jpg', 'highlights': ['The goal is to enable the viewing audience to create various versions of the Mandelbulb fractal pattern in 3D space by understanding and writing the necessary code.', 'The Mandelbrot set is visualized by coloring the points that stay bounded black and the others white, resulting in a fractal pattern on the complex plane.', 'The Mandelbrot set is determined by running an algorithm on every single complex number on a plane, checking if the result stays bounded or tends to infinity.']}, {'end': 781.633, 'segs': [{'end': 413.432, 'src': 'embed', 'start': 352.969, 'weight': 0, 'content': [{'end': 356.612, 'text': "I'm going to call that DIM, short for dimensions.", 'start': 352.969, 'duration': 3.643}, {'end': 369.946, 'text': "So I'm starting off with a triple nested loop for every i from 0 to 32, and every j from 0 to 32, and every k from 0 to 32.", 'start': 360.942, 'duration': 9.004}, {'end': 373.708, 'text': "Let's create an xyz point in three-dimensional space.", 'start': 369.946, 'duration': 3.762}, {'end': 389.669, 'text': 'And there you see this cube, all of the voxels, all of these 3D pixels, points in three-dimensional space, making up a cube.', 'start': 381.741, 'duration': 7.928}, {'end': 396.315, 'text': 'Every single point is spaced out between negative 100 and 100 along the x, y, and z-axis.', 'start': 390.009, 'duration': 6.306}, {'end': 403.122, 'text': 'And something that I could do just to make this a little nicer to examine and look at is add the processing library called PZCAM.', 'start': 396.716, 'duration': 6.406}, {'end': 413.432, 'text': 'PZCam will center the view in the center of the processing window itself, so I no longer need this translate.', 'start': 407.83, 'duration': 5.602}], 'summary': 'Creating a 3d cube with voxels in a triple nested loop using xyz points in a 3d space, with points spaced out between -100 and 100 along the x, y, and z-axis and using the pzcam processing library for a centered view.', 'duration': 60.463, 'max_score': 352.969, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA352969.jpg'}, {'end': 551.717, 'src': 'embed', 'start': 529.185, 'weight': 1, 'content': [{'end': 537.81, 'text': 'So, while there might be a way for me to create a version of the Mandelbot set in 3D without the idea of spherical coordinates,', 'start': 529.185, 'duration': 8.625}, {'end': 542.252, 'text': 'the Mandelbulb that I want to make, the one that was developed in 2009,,', 'start': 537.81, 'duration': 4.442}, {'end': 548.015, 'text': 'uses the idea of spherical coordinates to take a triplex number and square it or cube it,', 'start': 542.252, 'duration': 5.763}, {'end': 551.717, 'text': 'or put it to the fourth power and ultimately to the eighth power.', 'start': 548.015, 'duration': 3.702}], 'summary': 'The mandelbulb developed in 2009 uses spherical coordinates to manipulate triplex numbers up to the eighth power.', 'duration': 22.532, 'max_score': 529.185, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA529185.jpg'}, {'end': 643.203, 'src': 'embed', 'start': 618.797, 'weight': 4, 'content': [{'end': 624.981, 'text': 'a formula for taking a vector v in three dimensions, x, y, z, and setting it to the nth power.', 'start': 618.797, 'duration': 6.184}, {'end': 629.924, 'text': 'To do that requires the spherical version of that x, y, z vector.', 'start': 625.461, 'duration': 4.463}, {'end': 631.325, 'text': 'We need the r.', 'start': 630.164, 'duration': 1.161}, {'end': 632.166, 'text': 'We need the theta.', 'start': 631.325, 'duration': 0.841}, {'end': 634.407, 'text': 'We need the phi, if you look at that formula.', 'start': 632.466, 'duration': 1.941}, {'end': 639.991, 'text': 'And wander back to this original proposal, which has exactly the formulas written out here.', 'start': 634.947, 'duration': 5.044}, {'end': 643.203, 'text': 'This is how I calculate r, theta, and phi.', 'start': 640.902, 'duration': 2.301}], 'summary': 'Calculating spherical coordinates from a 3d vector for nth power.', 'duration': 24.406, 'max_score': 618.797, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA618797.jpg'}, {'end': 750.336, 'src': 'embed', 'start': 721.263, 'weight': 2, 'content': [{'end': 724.309, 'text': 'I need to take, get a new X and a new Y and a new Z.', 'start': 721.263, 'duration': 3.046}, {'end': 736.774, 'text': 'Now, processing is wondering, what is n? So n is the order.', 'start': 732.412, 'duration': 4.362}, {'end': 744.679, 'text': 'It is the power to which I am going to set everything in my formula z equals z to the n plus c.', 'start': 736.954, 'duration': 7.725}, {'end': 750.336, 'text': 'And we can try different numbers to get different patterns, but I want to start with the number 8.', 'start': 744.679, 'duration': 5.657}], 'summary': 'The goal is to process data using the order n, starting with the number 8.', 'duration': 29.073, 'max_score': 721.263, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA721263.jpg'}], 'start': 265.95, 'title': 'Visualizing 3d coordinates and spherical coordinates transformation', 'summary': 'Discusses visualizing 3d coordinates in processing, creating a cube with voxels, and implementing pzcam. it also explores using spherical coordinates to transform complex numbers into triplex numbers, crucial for creating the mandelbulb, with a focus on transforming a 3d vector to the nth power.', 'chapters': [{'end': 438.73, 'start': 265.95, 'title': 'Visualizing 3d coordinates in processing', 'summary': 'Discusses using processing, a creative coding framework, to visualize 3d coordinates in space, creating a cube with voxels and implementing pzcam for better examination and interaction with the 3d point cloud.', 'duration': 172.78, 'highlights': ['Using Processing, a creative coding framework, to visualize 3D coordinates in space and taking advantage of its 3D rendering engine.', 'Creating a cube with voxels using triple nested loops for every i from 0 to 32, j from 0 to 32, and k from 0 to 32, resulting in a total of 32x32x32 voxels.', 'Implementing PZCAM, a processing library, to center the view in the processing window and enabling interaction with the 3D point cloud through zooming, rotating, and spinning.']}, {'end': 781.633, 'start': 439.351, 'title': 'Understanding spherical coordinates for triplex numbers', 'summary': 'Explores the use of spherical coordinates to transform complex numbers into triplex numbers, crucial for creating the mandelbulb, which involves squaring, cubing, and raising to the fourth and eighth power, with a focus on the formula for transforming a 3d vector to the nth power.', 'duration': 342.282, 'highlights': ['The importance of spherical coordinates in transforming a complex number into a triplex number for creating the Mandelbulb, involving raising to the fourth and eighth power, is explained, highlighting the need for spherical coordinates in this process.', 'The formula for transforming a 3D vector to the nth power, involving the calculation of r, theta, and phi, is emphasized, with the significance of these parameters in the context of the Mandelbulb creation process.', 'The process of converting x, y, and z coordinates to spherical coordinates, including the calculation of r, theta, and phi, for the purpose of plotting points within a specific range, is detailed, emphasizing the mathematical considerations involved in this conversion process.', "The concept of using a specific power, such as 8, to create different patterns in the Mandelbulb creation process, along with the need for a new variable name, 'Zeta', to differentiate it from the component of the vector x, y, z, is highlighted, showcasing the practical application of the theoretical concepts discussed."]}], 'duration': 515.683, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA265950.jpg', 'highlights': ['Creating a cube with voxels using triple nested loops for every i from 0 to 32, j from 0 to 32, and k from 0 to 32, resulting in a total of 32x32x32 voxels.', 'The importance of spherical coordinates in transforming a complex number into a triplex number for creating the Mandelbulb, involving raising to the fourth and eighth power, is explained, highlighting the need for spherical coordinates in this process.', "The concept of using a specific power, such as 8, to create different patterns in the Mandelbulb creation process, along with the need for a new variable name, 'Zeta', to differentiate it from the component of the vector x, y, z, is highlighted, showcasing the practical application of the theoretical concepts discussed.", 'Implementing PZCAM, a processing library, to center the view in the processing window and enabling interaction with the 3D point cloud through zooming, rotating, and spinning.', 'The formula for transforming a 3D vector to the nth power, involving the calculation of r, theta, and phi, is emphasized, with the significance of these parameters in the context of the Mandelbulb creation process.']}, {'end': 1148.627, 'segs': [{'end': 839.085, 'src': 'embed', 'start': 798.788, 'weight': 0, 'content': [{'end': 807.273, 'text': "The only way to get out of a loop that's looping while true, the hard-coded value true that can never be changed, is to put a break in somewhere.", 'start': 798.788, 'duration': 8.485}, {'end': 809.335, 'text': 'So I need to remember put that break in there,', 'start': 807.313, 'duration': 2.022}, {'end': 813.137, 'text': "or else I'm going to have an infinite loop and everything's going to crash and we're just going to throw away all this footage.", 'start': 809.335, 'duration': 3.802}, {'end': 814.258, 'text': "and I'm going to be done.", 'start': 813.137, 'duration': 1.121}, {'end': 816.459, 'text': 'never come back for another coding challenge ever again.', 'start': 814.258, 'duration': 2.201}, {'end': 823.044, 'text': "And just to set myself up for success, I'm going to make a variable called max iterations.", 'start': 816.679, 'duration': 6.365}, {'end': 825.522, 'text': "I'm going to set that equal to 10.", 'start': 824.462, 'duration': 1.06}, {'end': 829.343, 'text': "And then I'm going to have iteration equals 0.", 'start': 825.522, 'duration': 3.821}, {'end': 831.784, 'text': "I'm going to say iteration plus plus.", 'start': 829.343, 'duration': 2.441}, {'end': 839.085, 'text': 'If iteration is greater than max iterations, break.', 'start': 833.004, 'duration': 6.081}], 'summary': "To avoid infinite loops, use 'break' and set max iterations to 10.", 'duration': 40.297, 'max_score': 798.788, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA798788.jpg'}, {'end': 1010.883, 'src': 'embed', 'start': 971.818, 'weight': 4, 'content': [{'end': 974.779, 'text': "I'm sure I'm doing this wrong, but I'll get there eventually.", 'start': 971.818, 'duration': 2.961}, {'end': 982.329, 'text': 'So the function returns a spherical object.', 'start': 978.325, 'duration': 4.004}, {'end': 988.816, 'text': "It's basically just like an object that holds three values, but I want to be able to name those values r, theta, and phi.", 'start': 982.71, 'duration': 6.106}, {'end': 990.838, 'text': 'So this is spherical.', 'start': 989.176, 'duration': 1.662}, {'end': 997.424, 'text': 'C is the spherical version of x, y, z.', 'start': 991.579, 'duration': 5.845}, {'end': 1001.689, 'text': 'Power of c dot r, c dot theta.', 'start': 997.424, 'duration': 4.265}, {'end': 1008.482, 'text': "And then, oh, there's no, this was a mistake.", 'start': 1004.679, 'duration': 3.803}, {'end': 1010.883, 'text': "I'm getting very close.", 'start': 1009.743, 'duration': 1.14}], 'summary': 'Creating a spherical object with values r, theta, and phi, getting close to completion.', 'duration': 39.065, 'max_score': 971.818, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA971818.jpg'}, {'end': 1129.811, 'src': 'embed', 'start': 1081.149, 'weight': 5, 'content': [{'end': 1084.811, 'text': 'So I could go through this, then add x, y, z to it.', 'start': 1081.149, 'duration': 3.662}, {'end': 1092.735, 'text': 'and then get the new spherical coordinate, put it to the power of n, then add x, y, z to it again, et cetera, et cetera.', 'start': 1085.851, 'duration': 6.884}, {'end': 1093.736, 'text': 'I think this is good.', 'start': 1092.796, 'duration': 0.94}, {'end': 1095.517, 'text': "I think I've got it.", 'start': 1094.597, 'duration': 0.92}, {'end': 1096.658, 'text': 'Sorry to interrupt.', 'start': 1095.998, 'duration': 0.66}, {'end': 1102.482, 'text': 'I really just had to come from the future to acknowledge the fact that this variable c is really unfortunately named.', 'start': 1096.898, 'duration': 5.584}, {'end': 1108.506, 'text': "If you look at the formula for the Mandel bulb itself, z equals z to the n plus c, there's a c in there.", 'start': 1102.782, 'duration': 5.724}, {'end': 1110.567, 'text': "Yeah, but it's not that c.", 'start': 1108.706, 'duration': 1.861}, {'end': 1119.729, 'text': "Why did I call it that c? The actual c, the constant, is the triplex number, x, y, z, that I'm adding iteratively each time through this loop.", 'start': 1110.567, 'duration': 9.162}, {'end': 1123.691, 'text': 'That spherical coordinate is just the spherical version of zeta.', 'start': 1120.009, 'duration': 3.682}, {'end': 1129.811, 'text': 'So this maybe is a more accurate way to write it.', 'start': 1127.349, 'duration': 2.462}], 'summary': 'Iteratively adding x, y, z to spherical coordinates for mandelbulb formula.', 'duration': 48.662, 'max_score': 1081.149, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1081149.jpg'}], 'start': 782.314, 'title': 'Avoiding infinite loops and implementing spherical coordinates', 'summary': "Discusses the importance of avoiding infinite loops, setting iteration limits to prevent crashes, using 'while' loops and the 'break' statement, and managing iterations. it also covers implementing spherical coordinates in a code loop to convert cartesian coordinates to polar, emphasizing variable naming and iterative addition of a constant triplex number to obtain new spherical coordinates.", 'chapters': [{'end': 857.269, 'start': 782.314, 'title': 'Avoiding infinite loops and setting iteration limits', 'summary': "Discusses the importance of avoiding infinite loops and demonstrates setting an iteration limit to prevent a potential crash, while also showcasing the use of 'while' loops and the 'break' statement to control the loop. it also highlights the creation of variables for managing iterations.", 'duration': 74.955, 'highlights': ["The significance of avoiding infinite loops and the potential for a crash is highlighted, emphasizing the need to use 'break' to exit a 'while true' loop.", 'The demonstration of setting a max iteration limit to 10 as a preventive measure to avoid an infinite loop is showcased.', "The usage of 'while' loops and 'break' statements to control the loop and prevent infinite iterations is explained.", "The creation of variables for managing iterations, such as 'max iterations' and 'iteration', is demonstrated."]}, {'end': 1148.627, 'start': 858.109, 'title': 'Implementing spherical coordinates in code', 'summary': 'Discusses implementing spherical coordinates in a code loop to convert cartesian coordinates to polar, with an emphasis on the importance of variable naming and the process of iteratively adding a constant triplex number to the coordinates to obtain a new spherical coordinate.', 'duration': 290.518, 'highlights': ["Defining the spherical coordinate conversion function would be beneficial for the loop's implementation, potentially aiding in clarifying the code structure and improving the process of converting from Cartesian to polar coordinates.", 'Iteratively adding the constant triplex number to the spherical coordinates in the loop is crucial for obtaining new spherical coordinates, contributing to the understanding of the iterative process and its impact on the coordinate transformations.', "Clarifying the naming of variables, specifically the constant 'c' and the spherical coordinate 'c', is essential for code comprehension and minimizing confusion in the context of the iterative process."]}], 'duration': 366.313, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA782314.jpg', 'highlights': ["The significance of avoiding infinite loops and the potential for a crash is highlighted, emphasizing the need to use 'break' to exit a 'while true' loop.", 'The demonstration of setting a max iteration limit to 10 as a preventive measure to avoid an infinite loop is showcased.', "The usage of 'while' loops and 'break' statements to control the loop and prevent infinite iterations is explained.", "The creation of variables for managing iterations, such as 'max iterations' and 'iteration', is demonstrated.", "Defining the spherical coordinate conversion function would be beneficial for the loop's implementation, potentially aiding in clarifying the code structure and improving the process of converting from Cartesian to polar coordinates.", 'Iteratively adding the constant triplex number to the spherical coordinates in the loop is crucial for obtaining new spherical coordinates, contributing to the understanding of the iterative process and its impact on the coordinate transformations.', "Clarifying the naming of variables, specifically the constant 'c' and the spherical coordinate 'c', is essential for code comprehension and minimizing confusion in the context of the iterative process."]}, {'end': 1669.731, 'segs': [{'end': 1203.586, 'src': 'embed', 'start': 1171.559, 'weight': 1, 'content': [{'end': 1177.983, 'text': 'So I think what I want to do is take this code and put it in Setup.', 'start': 1171.559, 'duration': 6.424}, {'end': 1189.42, 'text': "Then what I'm going to do is I'm going to create an array of all the points that are within the Mandelbulb set itself.", 'start': 1180.876, 'duration': 8.544}, {'end': 1191.821, 'text': "That'll be an array list of P vectors.", 'start': 1190.12, 'duration': 1.701}, {'end': 1203.586, 'text': 'In other words, if at this point, instead of drawing a point, I just say, add new P vector.', 'start': 1194.582, 'duration': 9.004}], 'summary': 'Move code to setup, create array of points within mandelbulb set', 'duration': 32.027, 'max_score': 1171.559, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1171559.jpg'}, {'end': 1286.102, 'src': 'embed', 'start': 1257.725, 'weight': 2, 'content': [{'end': 1265.132, 'text': 'How do I do that? Well, I think the easiest way for me to do that would be to check r.', 'start': 1257.725, 'duration': 7.407}, {'end': 1267.074, 'text': 'r is like the distance from the center.', 'start': 1265.132, 'duration': 1.942}, {'end': 1274.654, 'text': 'So if r keeps going like way, way, way out, and way, way out, like greater than 16, then break.', 'start': 1267.494, 'duration': 7.16}, {'end': 1286.102, 'text': "So now only the points where the radius value hasn't gotten past the number 16 will make their way into the Mandel bulb set itself.", 'start': 1275.515, 'duration': 10.587}], 'summary': 'Points with radius < 16 are part of mandelbulb set', 'duration': 28.377, 'max_score': 1257.725, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1257725.jpg'}, {'end': 1510.882, 'src': 'heatmap', 'start': 1478.202, 'weight': 1, 'content': [{'end': 1480.203, 'text': 'So it can flip it off and then find the next one.', 'start': 1478.202, 'duration': 2.001}, {'end': 1481.344, 'text': 'I think this is going to work.', 'start': 1480.243, 'duration': 1.101}, {'end': 1489.21, 'text': "Yeah, that's a point cloud mandelbulb.", 'start': 1487.264, 'duration': 1.946}, {'end': 1490.715, 'text': 'Look at that.', 'start': 1490.273, 'duration': 0.442}, {'end': 1502.937, 'text': "That's a point cloud mandelbulb! We did it! I mean, it looks nothing like the beauty of the fully ray traced, rendered, colored, lit Mandel bulbs.", 'start': 1491.196, 'duration': 11.741}, {'end': 1510.882, 'text': 'But by golly, my brain somehow made it from the start of whatever I started today to this.', 'start': 1503.537, 'duration': 7.345}], 'summary': 'Successfully created a point cloud mandelbulb, albeit different from fully rendered mandel bulbs.', 'duration': 32.68, 'max_score': 1478.202, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1478202.jpg'}, {'end': 1612.762, 'src': 'embed', 'start': 1586.8, 'weight': 0, 'content': [{'end': 1596.37, 'text': 'The most common technique for rendering the Mandelbulb in its full spectacular glory is using an algorithm called ray marching in combination with a signed distance function.', 'start': 1586.8, 'duration': 9.57}, {'end': 1602.096, 'text': 'This is a technique that allows you to render different kinds of shapes in 3D, like a sphere or a cube.', 'start': 1596.791, 'duration': 5.305}, {'end': 1612.762, 'text': "But you can also use it to render any kind of shape or you can estimate the distance to that shape from the eye or camera that's looking at that shape.", 'start': 1602.697, 'duration': 10.065}], 'summary': 'Ray marching with signed distance function renders 3d shapes in mandelbulb, allowing for estimation of distance from the eye or camera.', 'duration': 25.962, 'max_score': 1586.8, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1586800.jpg'}, {'end': 1638.035, 'src': 'heatmap', 'start': 1613.022, 'weight': 0.81, 'content': [{'end': 1619.005, 'text': 'But if you want to get started on learning about these algorithms, take a look at the website and YouTube channel from Inigo Quiles.', 'start': 1613.022, 'duration': 5.983}, {'end': 1623.428, 'text': 'It is a literal treasure trove of graphics tutorials and knowledge.', 'start': 1619.466, 'duration': 3.962}, {'end': 1626.269, 'text': "Wow So I don't want this to be the end.", 'start': 1623.748, 'duration': 2.521}, {'end': 1629.731, 'text': "I think I'm going to have to just completely learn how shaders work now.", 'start': 1626.749, 'duration': 2.982}, {'end': 1633.193, 'text': 'Learn about sign distance functions and return someday.', 'start': 1630.211, 'duration': 2.982}, {'end': 1634.233, 'text': "I don't know.", 'start': 1633.213, 'duration': 1.02}, {'end': 1638.035, 'text': "In 10 years when you're still watching this video and haven't done it yet, please let me know in the comments.", 'start': 1634.393, 'duration': 3.642}], 'summary': "Inigo quiles' website and youtube channel offer valuable graphics tutorials and knowledge, motivating viewers to learn about shaders and sign distance functions.", 'duration': 25.013, 'max_score': 1613.022, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1613022.jpg'}], 'start': 1150.008, 'title': 'Mandelbulb visualization and rendering', 'summary': 'Discusses implementing mandelbulb visualization in p5.js, optimizing code, creating point arrays, and testing radius values. it also covers rendering a point cloud mandelbulb, detailing the algorithm and visual outcomes, and suggesting future exploration opportunities and learning resources.', 'chapters': [{'end': 1361.68, 'start': 1150.008, 'title': 'Implementing mandelbulb visualization', 'summary': 'Discusses the process of implementing mandelbulb visualization by optimizing the code in p5.js, creating an array of points within the mandelbulb set, and testing the radius value to determine if a point should be added to the set. the visualization process results in the creation of a mandelbulb.', 'duration': 211.672, 'highlights': ['The process of implementing Mandelbulb visualization by optimizing the code in p5.js. Implementation of Mandelbulb visualization, optimization of code in p5.js.', 'Creation of an array of points within the Mandelbulb set. Creation of array list of P vectors, addition of points within the Mandelbulb set.', 'Testing the radius value to determine if a point should be added to the set. Testing the radius value, determination of point inclusion in the Mandelbulb set.']}, {'end': 1669.731, 'start': 1362.08, 'title': 'Rendering mandelbulb point cloud', 'summary': 'Explores the process of rendering a point cloud mandelbulb, showcasing the step-by-step algorithm and the visual outcomes, and suggests potential future explorations and resources for further learning.', 'duration': 307.651, 'highlights': ['The most common technique for rendering the Mandelbulb in its full spectacular glory is using an algorithm called ray marching in combination with a signed distance function. Highlights the most common technique for rendering the Mandelbulb and introduces the algorithm used, providing insight into the preferred method for achieving the visual outcome.', 'The chapter explores the process of rendering a point cloud Mandelbulb, showcasing the step-by-step algorithm and the visual outcomes. Describes the main focus of the chapter, which is the exploration of rendering a point cloud Mandelbulb, including the step-by-step algorithm and the resulting visual outcomes.', 'Suggests potential future explorations and resources for further learning, such as learning about shaders, sign distance functions, and revisiting different techniques for rendering the Mandelbulb in real time. Provides suggestions for future explorations and learning opportunities related to shaders, sign distance functions, and different techniques for rendering the Mandelbulb in real time, encouraging further development and experimentation.']}], 'duration': 519.723, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/NJCiUVGiNyA/pics/NJCiUVGiNyA1150008.jpg', 'highlights': ['Implementation of Mandelbulb visualization, optimization of code in p5.js.', 'Creation of array list of P vectors, addition of points within the Mandelbulb set.', 'Testing the radius value, determination of point inclusion in the Mandelbulb set.', 'Highlights the most common technique for rendering the Mandelbulb and introduces the algorithm used, providing insight into the preferred method for achieving the visual outcome.', 'Describes the main focus of the chapter, which is the exploration of rendering a point cloud Mandelbulb, including the step-by-step algorithm and the resulting visual outcomes.', 'Provides suggestions for future explorations and learning opportunities related to shaders, sign distance functions, and different techniques for rendering the Mandelbulb in real time, encouraging further development and experimentation.']}], 'highlights': ['The Mandelbrot set is determined by running an algorithm on every single complex number on a plane, checking if the result stays bounded or tends to infinity.', "The concept of using a specific power, such as 8, to create different patterns in the Mandelbulb creation process, along with the need for a new variable name, 'Zeta', to differentiate it from the component of the vector x, y, z, is highlighted, showcasing the practical application of the theoretical concepts discussed.", 'The formula for transforming a 3D vector to the nth power, involving the calculation of r, theta, and phi, is emphasized, with the significance of these parameters in the context of the Mandelbulb creation process.', "The significance of avoiding infinite loops and the potential for a crash is highlighted, emphasizing the need to use 'break' to exit a 'while true' loop.", 'The demonstration of setting a max iteration limit to 10 as a preventive measure to avoid an infinite loop is showcased.', "The usage of 'while' loops and 'break' statements to control the loop and prevent infinite iterations is explained.", "Defining the spherical coordinate conversion function would be beneficial for the loop's implementation, potentially aiding in clarifying the code structure and improving the process of converting from Cartesian to polar coordinates.", 'Iteratively adding the constant triplex number to the spherical coordinates in the loop is crucial for obtaining new spherical coordinates, contributing to the understanding of the iterative process and its impact on the coordinate transformations.', 'Highlights the most common technique for rendering the Mandelbulb and introduces the algorithm used, providing insight into the preferred method for achieving the visual outcome.', 'Describes the main focus of the chapter, which is the exploration of rendering a point cloud Mandelbulb, including the step-by-step algorithm and the resulting visual outcomes.', 'Provides suggestions for future explorations and learning opportunities related to shaders, sign distance functions, and different techniques for rendering the Mandelbulb in real time, encouraging further development and experimentation.']}