/*
Copyright (c) 2007 by Thomas J. Greenbaum. Some Rights Reserved.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
http://creativecommons.org/licenses/by-nc-sa/3.0/
Spheriphor_Study05e.pov
Spheriphor Generator, version April 5, 2007
For creation of a visual metaphor for representing complex data clusters
Command line options to redirect file output
Test resolution setting:
+FS24, +Le:\Spheriphor\Geoscope01, +OSpheriphor05_35 Width=320, Height=240, +A
+FS24, +Le:\Spheriphor\Geoscope01, +OSpheriphor05_xx Width=640, Height=480, +A
NOTES: +FS24 = System File (Windows BMP) 24bit color depth
*/
#include "stdinc.inc"
//Solid color for quick render set to 0, transparent takes long set to 0.7
#declare trans_no = 0.5 ;
#declare SkyBlueTrans = color rgbf <0.196078, 0.6, 0.8, trans_no>;
#declare BrightGoldTrans = color rgbf <0.85, 0.85,0.05, trans_no>;
#declare SpringGreenTrans = color rgbf <0, 1.0, 0.498039, trans_no>;
#declare RedTrans = color rgbf <1, 0, 0, trans_no>;
#declare NavyBlueTrans = color rgbf <0.237255, 0.237255, 0.656863, trans_no>;
#declare LightBlueTrans = color rgbf <0.74902, 0.847059, 0.847059, trans_no>;
#declare WhiteTrans = color rgbf <1, 1, 1, 0.65>;
#declare Rfinish = finish {
ambient 0.700
diffuse 0.400
specular 0.900
roughness 0.1
//reflection {.9}
}
//=== BEGIN PARAMETERS ===
/*
Math used to calculate points on an equilateral triangle,
dimensions used to create bitmaps for image maps and
geometry of icosahedron faces for folded Dymaxion map
*/
//Tangent of 60 degrees = 1.732050808
#declare THigh = 191;
#declare TEdge = 220;
/* For Dymaxion map - image source:
http://commons.wikimedia.org/wiki/Image:Dymaxion.jpg
Triangles average 191 pixels high with 220 pixels ed width
For ESRI Map - image source:
Triangles average 212 pixels high with 245 pixels edge width (round to 246)
http://www.esri.com/news/arcnews/summer03articles/summer03gifs/p7p4-lg.jpg
Our Earth Major Habitat Types (Biomes),
Source: ESRI Data & Maps CD & World Wildlife Fund - US,
ArcGIS Development Team, April 2002
*/
#if(frame_number<61) //clock range 0.0 to 0.5
#declare Timer = 2*clock; //Timer range 0.0 to 1.0
#else //clock range 0.5 to 1.0
#declare Timer = (2+(-2*clock)); //Timer range 1.0 to 0.0
#end
#declare Timer = 1; //For still image - no animation
//Icosahedron dimensions from http://en.wikipedia.org/wiki/Icosahedron
#declare Icosa_Da = 138.189685; //Dihedral angle of icosahedron
//Dihedral angle - surface angle between faces for icosahedron
#declare Da = Timer*(Icosa_Da - 180); //Multiply by Timer to animate folding of faces
//#declare Da = 0; //Dihedral angle - for flat map
#declare RadiusIn = 0.75576 * TEdge; //Radius of inscribed sphere tangent to the icosahedron's faces
#declare RadiusMid = 0.80902 * TEdge; //Radius of inscribed sphere touching mid point of each edge
//=== END PARAMETERS ===
//=== BEGIN CREATE GEOMETRY OF THE POLYHEDRAL FACES ===
#declare PolyFull = //Define the geometry for a Full Triangular Face
prism { //Extrude a closed 2-D shape along an axis
-0.25, // height 1
0, // height 2
4, // number of points
// points in the x-z plane
< 0, 0>, < TEdge, 0>, < TEdge/2, -THigh>, <0, 0>
}
#declare Poly15a = //Define the geometry for 15a Half Triangular Face
prism { //Extrude a closed 2-D shape along an axis
-0.25, // height 1
0, // height 2
4, // number of points
// points in the x-z plane
< 0, 0>, < TEdge, 0>, < 55, -THigh/2>, <0, 0>
}
#declare Poly15b = //Define the geometry for 15b Half Triangular Face
prism { //Extrude a closed 2-D shape along an axis
-0.25, // height 1
0, // height 2
4, // number of points
// points in the x-z plane
< 0, 0>, < TEdge/2, 0>, < TEdge/2, -THigh>, <0, 0>
}
#declare Poly17a = //Define the geometry for 17a Two Thirds Triangular Face
prism { //Extrude a closed 2-D shape along an axis
-0.25, // height 1
0, // height 2
5, // number of points
// points in the x-z plane
< 0, 0>, < TEdge, 0>, < TEdge/2, -64>, <0, 0>
}
#declare Poly17b = //Define the geometry for 17b One Third Triangular Face
prism { //Extrude a closed 2-D shape along an axis
-0.25, // height 1
0, // height 2
4, // number of points
// points in the x-z plane
< 0, 0>, < TEdge, 0>, < TEdge/2, -64>, <0, 0>
}
//=== END CREATE GEOMETRY OF THE POLYHEDRAL FACES ===
//=== BEGIN IMAGE MAP OF THE POLYHEDRAL FACES ===
#declare TFace_01 =
object { PolyFull
pigment { //The image exactly fills the square area from (x,y) coordinates (0,0)
image_map { png "DMap01.png" } // to (1,1) regardless of the image's original size in pixels.
scale //Scale to match size of triangle
rotate <90, 0, 0> //Rotate from x-y plane 90 degrees around x-axis into x-z plane
translate <0, 0, -THigh> //Move the unit square so that top middle edge is at 0,0 - this allows
} // for easy folding at Dihedral angle
finish { Rfinish } //NOTE: image maps extracted from Dymaxion map so that the hinge edge
} // is aligned with the x-axis
#declare TFace_02 =
object { PolyFull
pigment {
image_map { png "DMap02.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_03 =
object { PolyFull
pigment {
image_map { png "eDMap03.png" }
//image_map { png "DMap03.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_04 =
object { PolyFull
pigment {
image_map { png "DMap04.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_05 =
object { PolyFull
pigment {
image_map { png "DMap05.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_06 =
object { PolyFull
pigment {
image_map { png "DMap06.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_07 =
object { PolyFull
pigment {
image_map { png "DMap07.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_08 =
object { PolyFull
pigment {
image_map { png "DMap08.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_09 =
object { PolyFull
pigment {
image_map { png "eDMap09.png" }
//image_map { png "DMap09.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_10 =
object { PolyFull
pigment {
image_map { png "eDMap10.png" }
//image_map { png "DMap10.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_11 =
object { PolyFull
pigment {
image_map { png "DMap11.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_12 =
object { PolyFull
pigment {
image_map { png "DMap12.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_13 =
object { PolyFull
pigment {
image_map { png "DMap13.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_14 =
object { PolyFull
pigment {
image_map { png "DMap14.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_15a =
object { Poly15a
pigment {
image_map { png "DMap15a.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh/2>
}
finish { Rfinish }
}
#declare TFace_15b =
object { Poly15b
pigment {
image_map { png "DMap15b.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_16 =
object { PolyFull
pigment {
image_map { png "DMap16.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_17a =
object { Poly17a
pigment {
image_map { png "DMap17a.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_17b =
object { Poly17b
pigment {
image_map { png "DMap17b.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -64>
}
finish { Rfinish }
}
#declare TFace_18 =
object { PolyFull
pigment {
image_map { png "DMap18.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_19 =
object { PolyFull
pigment {
image_map { png "DMap19.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
#declare TFace_20 =
object { PolyFull
pigment {
image_map { png "DMap20.png" }
scale
rotate <90, 0, 0>
translate <0, 0, -THigh>
}
finish { Rfinish }
}
//=== END IMAGE MAP OF THE POLYHEDRAL FACES ===
//=== BEGIN GEOSCOPE ===
#declare Geoscope_19 =
union {
object { TFace_19 }
object { TFace_20
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
#declare Geoscope_14 =
union {
object { TFace_14 }
object { TFace_05
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
object { TFace_15a
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
}
#declare Geoscope_13 =
union {
object { TFace_13 }
object { Geoscope_14
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
#declare Geoscope_12 =
union {
object { TFace_12 }
object { TFace_04
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
object { Geoscope_13
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
}
#declare Geoscope_11 =
union {
object { TFace_11 }
object { Geoscope_12
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
object { Geoscope_19
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
}
#declare Geoscope_18 =
union {
object { TFace_18 }
object { TFace_17b
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
}
#declare Geoscope_02 =
union {
object { TFace_02 }
object { TFace_03
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
object { TFace_01
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
#declare Geoscope_16 =
union {
object { TFace_16 }
object { TFace_15b
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
}
#declare Geoscope_17a =
union {
object { TFace_17a }
object { Geoscope_16
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
}
#declare Geoscope_07 =
union {
object { TFace_07 }
object { TFace_06
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
object { Geoscope_17a
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
#declare Geoscope_08 =
union {
object { TFace_08 }
object { Geoscope_02
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
object { Geoscope_07
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
#declare Geoscope_09 =
union {
object { TFace_09 }
object { Geoscope_08
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
}
object { Geoscope_18
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
#declare Geoscope =
union {
object { Geoscope_09
rotate //Rotate Dihedral angle - the angle between faces
rotate <0, 60, 0> //Rotate to align with adjacent triangle
}
object { TFace_10 } //Base triangle - upper left corner is at 0,0,0
object { Geoscope_11
rotate //Rotate Dihedral angle - the angle between faces
translate <-TEdge, 0, 0> //Move minus width of triangle so that vertex is at 0,0 prior to y-axis rotation
rotate <0, -60, 0> //Rotate triangle around y-axis at vertex to align with adjacent triangle
translate //Move positive width of triangle to position edge to edge with adjacent triangle
}
}
//=== END GEOSCOPE ===
//=== BEGIN INSTANTIATE OBJECTS ===
/*
object { Geoscope
translate <-60-(50*Timer), RadiusIn, THigh/2> //Move the Geoscope so that center of Geoscope is
rotate // at x,y,z of <0,0,0>
rotate <0, 0, Timer*-150>
}
*/
object { Geoscope
translate //Move minus half edge width so that mid-edge of Face 10 (base) is <0,0,0>
rotate //Rotate half isohedron dihedral angle
translate <0, 0, RadiusMid> //Move icosahedron mid-sphere radius - now center of icosaheron is <0,0,0>
rotate <-62.06, 0, -28.3> //Rotate to put north-pole at y-axis
rotate <0, 96, 0> //Rotate to put latitude 0 degrees with positive x-axis
}
/*For visual alignment with latitude 0 degrees with positive x-axis
cylinder { <0, -300, 0>, <0, 300, 0>, 2
pigment { color Red }
finish { Rfinish }
}
box { <4, 0, -0.5>, < 300, 300, 0.5>
pigment { color Red }
finish { Rfinish }
} */
//=== END INSTANTIATE OBJECTS ===
//=== BEGIN LIGHT SOURCES ===
light_source { <-800, 1000, 800>
color White shadowless
parallel
point_at <0, 0, 0>}
light_source { <-720, 500, -200>
color Gray50 shadowless
spotlight
radius 65 falloff 80
fade_distance 160
fade_power 2
point_at <0, 0, 0>}
light_source { <400, 400, -200>
color Gray50 shadowless
spotlight
radius 65 falloff 80
fade_distance 160
fade_power 2
point_at <0, 0, 0>}
light_source { <-720, 500, 50>
color Gray30 shadowless
spotlight
radius 65 falloff 80
fade_distance 160
fade_power 2
point_at <0, 0, 0>}
light_source { <600, 400, 200>
color Gray30 shadowless
spotlight
radius 65 falloff 80
fade_distance 160
fade_power 2
point_at <0, 0, 0>}
light_source { <300, -600, -50>
color Gray70 shadowless
spotlight
radius 65 falloff 80
fade_distance 160
fade_power 2
point_at <0, 0, 0>}
light_source { <-200, -600, -150>
color Gray70 shadowless
spotlight
radius 65 falloff 80
fade_distance 160
fade_power 2
point_at <0, 0, 0>}
//=== END LIGHT SOURCES ===
background { color SkyBlue }
#declare Cam01 =
camera {
location <0, 1240-(Timer*720), -29>
look_at <0, 0, -28>
right 1.33*x
angle 60
}
#declare Cam02 =
camera {
location <110, -660, 85>
look_at <110, 0, -95>
right 1.33*x
angle 60
}
#declare Cam03 =
camera {
location <0, 500, 0>
look_at <0, 0, 0>
right 1.33*x
angle 60
}
camera { Cam03 }
|