(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{67:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return l})),a.d(t,"metadata",(function(){return s})),a.d(t,"rightToc",(function(){return c})),a.d(t,"default",(function(){return p}));var n=a(2),r=a(6),i=(a(0),a(131)),o=(a(132),a(133),a(134)),l={title:"Mandelbrot Set"},s={unversionedId:"examples/graphics/mandelbrot",id:"examples/graphics/mandelbrot",isDocsHomePage:!1,title:"Mandelbrot Set",description:"What is mandelbrot",source:"@site/docs\\examples\\graphics\\mandelbrot.md",slug:"/examples/graphics/mandelbrot",permalink:"/docs/examples/graphics/mandelbrot",version:"current",sidebar:"docs",previous:{title:"Vision Cone",permalink:"/docs/examples/graphics/vision-cone"},next:{title:"Cargo Bots",permalink:"/docs/examples/ai/bots"}},c=[{value:"What is mandelbrot",id:"what-is-mandelbrot",children:[]},{value:"Source",id:"source",children:[]}],b={rightToc:c};function p(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},b,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h3",{id:"what-is-mandelbrot"},"What is mandelbrot"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"a fractal-like object made by this recurrent function: ",Object(i.b)("inlineCode",{parentName:"li"},"z[n+1] <- z[n] + c")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"c")," is a complex number, ",Object(i.b)("inlineCode",{parentName:"li"},"z")," starts from 0"),Object(i.b)("li",{parentName:"ul"},"we can map complex number to vectors quite easily, yet it's important to keep in mind that arithmetic operations have to be managed in the complex field"),Object(i.b)("li",{parentName:"ul"},"color represents a number where the iteration at given point stopped"),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://en.wikipedia.org/wiki/Mandelbrot_set"}),"Wikipedia"))),Object(i.b)("h3",{id:"source"},"Source"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"source: ",Object(i.b)("inlineCode",{parentName:"li"},"examples/src/07-graphics/mandelbrot.ts")),Object(i.b)("li",{parentName:"ul"},"vertex shader: ",Object(i.b)("inlineCode",{parentName:"li"},"assets/07-graphics/shaders/mandelbrot.vert")),Object(i.b)("li",{parentName:"ul"},"fragment shader: ",Object(i.b)("inlineCode",{parentName:"li"},"assets/07-graphics/shaders/mandelbrot.frag"))),Object(i.b)(o.a,{name:"Mandelbrot",mdxType:"APHCanvas"}))}p.isMDXComponent=!0}}]);