Skip to content

Instantly share code, notes, and snippets.

@Gro-Tsen
Last active August 31, 2022 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 Gro-Tsen/45015a1519ae5f4aed95fab363b0b30a to your computer and use it in GitHub Desktop.
Save Gro-Tsen/45015a1519ae5f4aed95fab363b0b30a to your computer and use it in GitHub Desktop.
#include "consts.inc"
#include "colors.inc"
#include "woods.inc"
#include "stones.inc"
#include "metals.inc"
#include "skies.inc"
global_settings {
photons { count 100000 }
}
camera {
location <0, 8, -15>
look_at <0,8*(-1+sqrt(5))/2,0>
}
sky_sphere {
S_Cloud2
}
plane {
<0,1,0>,0
texture {
T_Stone15
scale 8
}
}
intersection {
plane { <0,1,(1+sqrt(5))/2>,8/sqrt((5+sqrt(5))/2) }
plane { <0,-1,(1+sqrt(5))/2>,8/sqrt((5+sqrt(5))/2) }
plane { <0,1,-(1+sqrt(5))/2>,8/sqrt((5+sqrt(5))/2) }
plane { <0,-1,-(1+sqrt(5))/2>,8/sqrt((5+sqrt(5))/2) }
plane { <(1+sqrt(5))/2,0,1>,8/sqrt((5+sqrt(5))/2) }
plane { <(1+sqrt(5))/2,0,-1>,8/sqrt((5+sqrt(5))/2) }
plane { <-(1+sqrt(5))/2,0,1>,8/sqrt((5+sqrt(5))/2) }
plane { <-(1+sqrt(5))/2,0,-1>,8/sqrt((5+sqrt(5))/2) }
plane { <1,(1+sqrt(5))/2,0>,8/sqrt((5+sqrt(5))/2) }
plane { <-1,(1+sqrt(5))/2,0>,8/sqrt((5+sqrt(5))/2) }
plane { <1,-(1+sqrt(5))/2,0>,8/sqrt((5+sqrt(5))/2) }
plane { <-1,-(1+sqrt(5))/2,0>,8/sqrt((5+sqrt(5))/2) }
// NB: Some vertices (_before_ translation) are:
// <0, 8*(-1+sqrt(5))/2, 8*(-2+sqrt(5))>,
// <8*(3-sqrt(5))/2, 8*(3-sqrt(5))/2, 8*(3-sqrt(5))/2>,
sphere { <0,0,0>, 8*sqrt((21-9*sqrt(5))/2) } // Cut at vertices
// sphere { <0,0,0>, 8*(-1+sqrt(5))/2 } // Cut at mid-edges
translate <0,8*(-1+sqrt(5))/2,0>
// Transparent and refractive
texture {
pigment { White filter 0.6 }
finish { reflection { 0.3 } ambient 0 diffuse 0 specular 0 }
}
interior { ior 1.5 caustics 0.5 }
/*
// Purely reflective
texture { finish { reflection { rgb <0.9,0.9,0.8> } ambient 0 diffuse 0 specular 0 } }
*/
photons { target reflection on refraction on collect off }
rotate <0,180*clock,0>
}
light_source {
<1000, 2000, -1732>
color White
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment