Created
March 7, 2020 22:02
-
-
Save charlieroberts/737a21f8998fda984cfb8ed1722290a0 to your computer and use it in GitHub Desktop.
mandelbulb w/ simplex noise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy and paste into https://charlieroberts.github.io/marching/playground/ | |
// select all and hit ctrl+enter | |
mat1 = Material( 'phong', Vec3(.0),Vec3(1,.8,.8),Vec3(1), 32, Vec3(0,.15,.25) ) | |
march( | |
RoundUnion( | |
m = Mandelbulb( Noise(.225,4,.5) ).material( mat1 ), | |
Plane().material(mat1), | |
.25 | |
) | |
) | |
.light( | |
Light( Vec3(-3,2,4), Vec3(1,.8,.8), .15 ), | |
Light( Vec3(0,0,4), Vec3(1,.8,.8), .95 ) | |
) | |
.fog(.35,Vec3(.1,0,0)) | |
.render( 'fractal.med' ) | |
.camera( 0,0,3 ) | |
t = 50 | |
onframe = () => { | |
m.rotate( t*8,sin(t/6),0,0 ) | |
t += .01 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment