Skip to content

Instantly share code, notes, and snippets.

@HSchmale16
Created June 4, 2016 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HSchmale16/f339ff1965125d4c99b8f1c7d0e407d7 to your computer and use it in GitHub Desktop.
Save HSchmale16/f339ff1965125d4c99b8f1c7d0e407d7 to your computer and use it in GitHub Desktop.
#version 3.7;
#include "colors.inc"
#include "metals.inc"
global_settings {
assumed_gamma 1.0
}
background {
color rgb <0, 0, 0>
}
camera {
location <0.0, 20.0, -100>
direction 1.5 * z
right x*image_width/image_height
look_at <0,0,0>
}
light_source {
<0,0,0>
color rgb <1, 1, 1>
translate <26, 26, 26>
}
#declare initRmajor = 2.0;
#declare Rmajor = initRmajor;
#declare Rminor = 0.5;
#declare ringCount = 0;
#while (ringCount < 20)
#declare modValue = mod(ringCount, 3);
torus {
Rmajor, Rminor
texture {
pigment { color rgb<0.5,0.5,0.5> }
finish { phong 1 }
}
#switch(modValue)
#case(0)
rotate <clock * 360, 0, 0>
#break
#case(1)
rotate <0, clock * 360, 0>
#break
#case(2)
rotate <0, 0, clock * 360>
#break
#end
}
#declare Rmajor = Rmajor + initRmajor;
#declare ringCount = ringCount + 1;
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment