// Stanford Torus POV-Ray file // Author: Joe Strout (joe@strout.net) // Based on AC76-0525f.jpeg #version 3.5; #include "colors.inc" //-------------------------------------------------------------------------------- // Unit definitions (base unit = 1 meter) //-------------------------------------------------------------------------------- #declare km = 1000; #declare cm = 0.01; #declare mm = 0.001; //-------------------------------------------------------------------------------- // Habitat parameters //-------------------------------------------------------------------------------- #declare Rmaj = 830; #declare Rmin = 65; #declare ShellThickness = 3; #declare RWindowCut = Rmaj - Rmin*0.5; #declare Rspoke = 10; #declare Rhub = 80; #declare Rmirrors = Rmaj/2; #declare RadiatorHeight = 200; #declare RadiatorWidth = 300; //-------------------------------------------------------------------------------- // Rendering parameters //-------------------------------------------------------------------------------- #declare CameraPosition = ; #declare CameraPOI = ; #declare Stars = true; // (causes a long parse time when true) global_settings { assumed_gamma 1.0 } //-------------------------------------------------------------------------------- // Model parts //-------------------------------------------------------------------------------- #declare InteriorBaseTexture = texture { pigment { // (---surface color---) marble // some pattern color_map { // color map [0.1 color rgb <0.2, 0.4, 0.1> ] [0.5 color rgb <0.1, 0.3, 0.0> ] } turbulence 0.5 // some turbulence scale 5 // transformations } normal { // (---surface bumpiness---) marble 0.3 // some pattern (and intensity) turbulence 0.5 // some turbulence scale <1,3,1> // transformations } finish { // (---surface finish---) ambient 0.2 specular 0.6 // shiny } } #declare OuterHullTexture = texture { pigment { color rgb <0.8, 0.8, 0.4> } normal { // (---surface bumpiness---) marble 0.3 // some pattern (and intensity) turbulence 0.5 // some turbulence scale 0.1 // transformations } finish { specular 0.4 ambient 0.05 } } #declare WindowTexture = texture { pigment { radial frequency 180 color_map { [0.0 color rgbf <0.8, 0.8, 1, 0.7>] [0.5 color rgbf <0.5, 0.5, 1, 0.7>] [1.0 color rgbf <0.8, 0.8, 1, 0.7>] } } finish { specular 0.2 ambient 0.7 } } #declare OuterHull = difference { torus { Rmaj, Rmin hollow texture { OuterHullTexture } } torus { Rmaj, Rmin-ShellThickness texture { InteriorBaseTexture } } cylinder { -Rmin*y, Rmin*y, RWindowCut } } #declare Windows = intersection { torus { Rmaj, Rmin hollow texture { WindowTexture } } cylinder { -Rmin*y, Rmin*y, RWindowCut } } #declare OneSpoke = cylinder { <-Rmaj-Rmin+ShellThickness,0,0> <0,0,0> Rspoke texture { pigment { color rgb <0.7, 0.7, 0.7> } finish { specular 0.6 ambient 0.2 } } } #declare AxisTail = cylinder { <0,Rmaj*2.5,0> <0,0,0> Rspoke texture { pigment { color rgb <0.7, 0.7, 0.7> } finish { specular 0.6 ambient 0.2 } } } #declare OneMirror = polygon { 10, #declare baseR = Rmirrors + Rspoke; #declare edgeR = Rmirrors + Rspoke + Rmin; #declare baseHalfWidth = baseR * 2*pi / 36; #declare edgeHalfWidth = edgeR * 2*pi / 36; , , , , , #declare baseR = Rmirrors - Rspoke; #declare edgeR = Rmirrors - Rspoke - Rmin; #declare baseHalfWidth = baseR * 2*pi / 36; #declare edgeHalfWidth = edgeR * 2*pi / 36; , , , , pigment { color rgb <1,1,1> } finish { ambient 0.01 diffuse 0.01 reflection 0.99 } } #declare OneWeb = polygon { 5, , , vrotate(, 60*y), vrotate(, 60*y), pigment { gradient vrotate(x, 30*y) scale Rhub/2 color_map { [0.0 color rgb <0,0,0>] [0.1 color rgb <0,0,0>] [0.1 color rgb <0.1,0,0.6>] [1.0 color rgb <0.1,0,0.6>] } } finish { specular 0.6 ambient 0.3 } } #declare Hub = union { sphere { <0,0,0> Rhub * 0.6 scale 0.2*y translate 4 * Rhub * y } sphere { <0, Rhub*3, 0> Rhub * 0.8 } sphere { <0, 0, 0> Rhub * 0.8 scale 1.5*y translate Rhub*1.5*y } sphere { <0, 0, 0> Rhub } cylinder { 0, -Rhub*2*y, Rhub/5 } sphere { <0,0,0> Rhub * 0.5 scale 0.2*y translate -1.5 * Rhub * y } texture { pigment { cells scale <4,1.5,4> turbulence 0 color_map { [0.00 color rgb <0.8,0.8,1> ] [0.05 color rgb <0.8,0.8,1> ] [0.05 color rgb <0.2,0.2,0.25> ] [0.96 color rgb <0.2,0.2,0.25> ] [0.96 color rgb <1.0,0.9,0.2> ] [1.00 color rgb <1.0,0.9,0.2> ] } } } finish { specular 0.8 ambient 0.2 } } #declare Radiator = box { <0, 4.2 * Rhub, 0> pigment { color rgb <0.2, 0, 0> } normal { quilted 1 scale 50 } rotate 110*y } #declare MainMirror = disc { <0, 0, 0> y, Rmaj - Rmin*2, Rhub*1.5 rotate 45 * x translate -Rmaj * y pigment { color rgb <1,1,1> } finish { ambient 0.01 diffuse 0.01 reflection 0.99 } } //-------------------------------------------------------------------------------- // Stanford Torus assemblies (one rotating, one stationary //-------------------------------------------------------------------------------- #declare RotatingParts = union { object { OuterHull } object { Windows } object { Hub } object { AxisTail } object { Radiator } #declare i = 0; #while (i < 6) object { OneSpoke rotate i*60*y } object { OneWeb rotate i*60*y } #declare i = i+1; #end #declare i = 0; #while (i < 36) object { OneMirror rotate i*10*y } #declare i = i+1; #end } #declare StationaryParts = union { object { MainMirror } object { Radiator } } //-------------------------------------------------------------------------------- // Solar power satellite (low-res, to be viewed from a distance //-------------------------------------------------------------------------------- #declare SPSpanel = box { <0, 0, 0> <400, 1, 400> pigment { brick color rgb <0.8,0.8,1> color rgb <0,0,1> brick_size <100, 50, 50> mortar 10 } rotate -90*x } #declare SPScenterPanel = box { <0, 0, 0> <100, 1, 400> pigment { brick color rgb <0.8,0.8,1> color rgb <0,0,0.2> brick_size <250, 50, 50> mortar 10 } rotate -90*x } #declare SPS = union { object { SPSpanel translate <-450, -200, 0> } object { SPSpanel translate <50, -200, 0> } object { SPScenterPanel translate <-50, -200, 0> } cylinder { <0, 0, 50> <0, 0, -50> 50 pigment { rgb <1,1,1> } } finish { ambient 0.2 specular 0.6 } } //-------------------------------------------------------------------------------- // Background starfield //-------------------------------------------------------------------------------- #declare Background = sphere { // Thanks to Paul Bourke, http://astronomy.swin.edu.au/~pbourke/rendering/starfield/index.html <0,0,0>, 1 hollow #if (Stars) pigment { image_map { png "starmap.png" map_type 1 once } } #end finish { ambient 2 // Inverse of earlier global ambient level diffuse 0 } scale 1000*km // Depends on model units translate CameraPosition } // -------------------------------------------------------------------------------- // Actual scene contents // -------------------------------------------------------------------------------- object { RotatingParts rotate 15*y } object { StationaryParts } #declare secondColonyPos = <7*km, 2*km, -10*km>; object { RotatingParts rotate 20*y translate secondColonyPos } object { Radiator translate secondColonyPos } object { MainMirror translate secondColonyPos } object { SPS rotate -20*z rotate 70*y translate <-4*km, -1*km, -6*km> } object { Background } camera { location CameraPosition look_at CameraPOI right x*image_width/image_height } light_source { <300, 100, 300> color rgb <1, 1, 1> parallel point_at <0, 0, 0> }