Created
September 23, 2014 11:10
-
-
Save anonymous/f7408336ee0260d92059 to your computer and use it in GitHub Desktop.
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
#declare Y=1.1; | |
#declare R=0.07; | |
#declare LAT=60; | |
#declare N=500; | |
#declare ALPHA=<1, 1, 1>; | |
#declare INSIDE=<0, 0, 0>; | |
#declare ANGLE=180; | |
#declare TRANS=0.0; | |
global_settings { | |
max_trace_level (N+1) | |
} | |
#declare eps = R/150; | |
// a point p on a vertical ellipse | |
#declare px = sin(LAT/180*pi); | |
#declare py = Y*cos(LAT/180*pi); | |
// half focal distance | |
#declare c = Y*sqrt(1-1/(Y*Y)); | |
// triangle edges from foci to p | |
#declare a = sqrt((py-c)*(py-c) + px*px); | |
#declare b = sqrt((py+c)*(py+c) + px*px); | |
// offset where the normal in p meets the major axis | |
#declare k = -c * (a-b) / (a+b); | |
// background sky sphere angle: | |
#declare klat = atan(px/(py-k)) * 180/pi; | |
//////// scn-hole.pov | |
#declare a = <1, Y, 1>; | |
#declare m = <px, py, 0>; | |
// ellipsoid surface | |
intersection { | |
sphere { | |
<0, 0, 0>, 1 | |
scale a | |
inverse | |
texture { | |
pigment { | |
color INSIDE | |
} | |
finish { | |
reflection { rgb ALPHA } | |
ambient 1 | |
} | |
} | |
interior_texture { | |
pigment { | |
color <1,1,1,1> | |
} | |
} | |
} | |
sphere { | |
<0, 0, 0>, 1 | |
scale (1+eps) * a | |
texture { | |
pigment { | |
color <1,1,1,1> | |
} | |
} | |
} | |
cylinder { | |
<0, k, 0>, 2*m - <0, k, 0>, R | |
inverse | |
texture { | |
pigment { | |
// | |
color <1,1,1> | |
} | |
finish { | |
ambient 1 | |
} | |
} | |
} | |
} | |
//////// cam-pan.inc | |
camera { | |
spherical | |
angle ANGLE ANGLE | |
location m | |
look_at <0, k, 0> | |
right <0, 0, 1> | |
} | |
//////// bg-phase.inc | |
// alpha | |
sky_sphere { | |
pigment { | |
radial | |
color_map { | |
[ ( 0/360) rgb <1,0,0> ] | |
[ ( 60/360) rgb <1,1,0> ] | |
[ (120/360) rgb <0,1,0> ] | |
[ (180/360) rgb <0,1,1> ] | |
[ (240/360) rgb <0,0,1> ] | |
[ (300/360) rgb <1,0,1> ] | |
[ (360/360) rgb <1,0,0> ] | |
} | |
frequency 1 | |
rotate -z*(klat) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment