Fractal Shaders Page
/* (c) 2015 Avi Levy
* This shader renders a Manhattan surface,
* aka the 3d Koch Cube
* aka the 3d quadratic Koch surface (Type 1)
* The Manhattan surface is homeomorphic to
* a 2-sphere, yet has a fractal dimension of
* log(13)/log(3) = 2.33.
* This surface is constructed by gluing together
* many small quadrilaterals. More generally, one
* may glue together quadrilaterals in a random
* manner to produce a random surface. Like the
* Manhattan surface, random surfaces are also
* homeomorphic to the 2-sphere yet are higher
* dimensional: they have dimension 4 almost surely.
* Random surfaces constructed in such a manner
* have been studied in relation with quantum
* gravity. This topic is being studied in:
* Special Topics Course MATH 583 E
* University of Washington
* Instructors: Steffen Rohde and Brent Werness
* Course Webpage:
* ============ May 6
* Complete rewrite of the mapping function.
* Performance boost from 3fps to 60fps on
* the iteration 2 of the fractal.
* Speedup acheived using tesselation and
* cubic symmetry.
* ============ May 5
* Incorporated Brent's observation that this
* was not a Manhattan surface due to not
* having enough cubies.
* Shader based on code by inigo quilez - iq/2013
/* Modified by Avi Levy (c) 2015
* This is the famous Sierpinski
* tetrahedron, to 16 iterations.
* Click and drag the fractal
* - Upwards zooms in
* - Left/right rotates
* Original by inigo quilez - iq/2013