Skip to content

Instantly share code, notes, and snippets.

@Gro-Tsen
Created August 31, 2022 16:43
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/e97998801b6e5fb25db426dc757b585a to your computer and use it in GitHub Desktop.
Save Gro-Tsen/e97998801b6e5fb25db426dc757b585a 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*(sqrt(2-2*sqrt(5)/5)), -15>
look_at <0,8*sqrt(5-2*sqrt(5)),0>
}
sky_sphere {
S_Cloud2
}
plane {
<0,1,0>,0
texture {
T_Stone15
scale 8
}
}
intersection {
plane { <1,1,1>,8/sqrt(3) }
plane { <1,1,-1>,8/sqrt(3) }
plane { <1,-1,1>,8/sqrt(3) }
plane { <1,-1,-1>,8/sqrt(3) }
plane { <-1,1,1>,8/sqrt(3) }
plane { <-1,1,-1>,8/sqrt(3) }
plane { <-1,-1,1>,8/sqrt(3) }
plane { <-1,-1,-1>,8/sqrt(3) }
plane { <0,(1+sqrt(5))/2,(-1+sqrt(5))/2>,8/sqrt(3) }
plane { <0,(1+sqrt(5))/2,-(-1+sqrt(5))/2>,8/sqrt(3) }
plane { <0,-(1+sqrt(5))/2,(-1+sqrt(5))/2>,8/sqrt(3) }
plane { <0,-(1+sqrt(5))/2,-(-1+sqrt(5))/2>,8/sqrt(3) }
plane { <(-1+sqrt(5))/2,0,(1+sqrt(5))/2>,8/sqrt(3) }
plane { <-(-1+sqrt(5))/2,0,(1+sqrt(5))/2>,8/sqrt(3) }
plane { <(-1+sqrt(5))/2,0,-(1+sqrt(5))/2>,8/sqrt(3) }
plane { <-(-1+sqrt(5))/2,0,-(1+sqrt(5))/2>,8/sqrt(3) }
plane { <(1+sqrt(5))/2,(-1+sqrt(5))/2,0>,8/sqrt(3) }
plane { <(1+sqrt(5))/2,-(-1+sqrt(5))/2,0>,8/sqrt(3) }
plane { <-(1+sqrt(5))/2,(-1+sqrt(5))/2,0>,8/sqrt(3) }
plane { <-(1+sqrt(5))/2,-(-1+sqrt(5))/2,0>,8/sqrt(3) }
// NB: Some vertices (_before_ translation+rotation) are:
// <8*(3-sqrt(5))/2,8*(-1+sqrt(5))/2,0>, along with cyclic permutations & sign changes
sphere { <0,0,0>, 8*sqrt(5-2*sqrt(5)) } // Cut at vertices
// sphere { <0,0,0>, 8*(-1+sqrt(5))/2 } // Cut at mid-edges
#if (0)
translate <0,8*(-1+sqrt(5))/2,0>
#else
rotate <atan((1+sqrt(5))/2)*180/pi,0,0>
translate <0,8*sqrt(5-2*sqrt(5)),0>
#end
// 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,72*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