Created
March 6, 2020 23:41
-
-
Save charlieroberts/5d32b669b964693b112164e7b7eaf591 to your computer and use it in GitHub Desktop.
lots and lots of rings
This file contains 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 | |
// turn the count up to 100 if you have a nice gfx card, | |
// otherwise, leave as is or risk graphics card meltdown | |
count = 25 | |
Material.default = Material.white | |
arr = Array(count) | |
arr = arr.fill(0).map( (v,i) => { | |
return Torus( Vec2(.25,.01) ) | |
.translate( sin(i), cos(i*2)*.5, sin(i*3)*.33 ) | |
.rotate( i*15, i/4, i/3, i/2 ) | |
}) | |
march( | |
Repeat( | |
Mirror( | |
Mirror( | |
Mirror( | |
Mirror( | |
RoundUnion2( ...arr,.025 ).translate(1,.5,1), | |
).rotate(90,0,1,0) | |
).translate(0,0,1) | |
).rotate(90,1,.25,.5) | |
), | |
Vec3(0,0,4) | |
) | |
) | |
.fog( .125, Vec3(.1) ) | |
.background(Vec3(.1)) | |
.vignette(.65) | |
.render() | |
.camera(0,0,2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment