/********************************************************************************** Persistence of Vision Ray Tracer Scene Description File File name : Ringworld_1_2010.mcr Version : 3.7 Description : Macro containing the basic Ringworld, including Sun, at scale 1:1 Date : November 2005 / June 2010 Author : Thomas A. M. de Groot This file is licensed under the terms of the CC-LGPL Copyright (C) 2005-2010. All rights reserved. Use and/or modification of this scene is free, except for commercial purposes. Commercial distribution is not allowed without written permission from the author. **********************************************************************************/ #macro Ringworld(SQ_rot, Ring_scale, Rim_pos, NotMoray) #ifndef(SQ_rot) #declare SQ_rot = 9; #end //rotation of Shadow Squares (18 degrees from midnight to midnight) #ifndef(Ring_scale) #declare Ring_scale = 1; #end //scale of the Ringworld #ifndef(Rim_pos) #declare Rim_pos = 0; #end //percentage shift (+/-) of the Ringworld towards one of the rims (if macro used as prop in a scene) #ifndef(NotMoray) #declare NotMoray = true; #end //false if used in a Moray scene, otherwise true //================================================================================== // S U N L I G H T //================================================================================== #declare Ringworld_sun = light_source { // Arealight Arealight_sun <0.0, 0.0, 0.0> color srgb <1.000, 1.000, 0.800>*2 area_light <1.000, 0.000, 0.000>, <0.000, 1.000, 0.000>, 3, 3 adaptive 1 jitter orient circular media_attenuation off scale 500000.0 } //================================================================================== // U S E D M A T E R I A L S //================================================================================== #declare C_ringworld = color_map { [ 0.00 srgb <0.0, 0.0104, 0.854167> ] [ 0.05 srgb <0.0052, 0.614567, 0.156233> ] [ 0.10 srgb <0.159399, 0.461954, 0.100046> ] [ 0.79 srgb <0.302067, 0.3854, 0.0> ] [ 0.82 srgb <0.773055, 0.621369, 0.030692> ] [ 0.90 srgb <0.646111, 0.342738, 0.050984> ] [ 1.00 srgb <0.552222, 0.272216, 0.031112> ] } #declare Ringworld_landscape = material { texture { pigment { leopard color_map {C_ringworld} warp {turbulence 2} } } } #declare Carribean_Cloud_Sky = material { texture { pigment { leopard color_map { [ 0.190000 srgbft <0.2, 0.6, 0.8, 0.0, 1.0> ] [ 0.200000 srgbft <0.2, 0.6, 0.8, 0.0, 0.8> ] [ 0.348754 srgbft <0.2, 0.6, 0.8, 0.0, 0.6> ] [ 0.533808 srgbft <1.0, 1.0, 1.0, 0.0, 0.4> ] [ 0.740214 srgbft <1.0, 1.0, 1.0, 0.0, 0.2> ] [ 1.000000 srgbft <1.0, 1.0, 1.0, 0.0, 0.0> ] } warp {black_hole <0,0,0>, 10000} ramp_wave warp { turbulence 3 octaves 3 lambda 6.0 omega 0.4 } scale <10, 1, 1> } finish { ambient 0.0 diffuse 1.0 } } } #declare SQ_tex = material { texture { pigment { color srgb <0.3, 0.3, 0.3> } } } #declare LowerFistColor = material { texture { pigment { radial pigment_map { [0.0 color srgb <1.0, 0.0, 0.0> ] [0.1 color srgb <0.0, 0.5, 0.0> ] [0.2 color srgb <1.0, 0.0, 0.0> ] [0.3 color srgb <0.0, 0.5, 0.0> ] [0.4 color srgb <1.0, 0.0, 0.0> ] [0.5 color srgb <0.0, 0.5, 0.0> ] [0.6 color srgb <1.0, 0.0, 0.0> ] [0.7 color srgb <0.0, 0.5, 0.0> ] [0.8 color srgb <1.0, 0.0, 0.0> ] [1.0 color srgb <0.0, 0.5, 0.0> ] } rotate -90*x } } } #declare UpperFistColor = material { texture { pigment { radial pigment_map { [0.0 color srgb <1.0, 1.0, 0.0> ] [0.1 color srgb <1.0, 0.5, 0.0> ] [0.2 color srgb <1.0, 1.0, 0.0> ] [0.3 color srgb <1.0, 0.5, 0.0> ] [0.4 color srgb <1.0, 1.0, 0.0> ] [0.5 color srgb <1.0, 0.5, 0.0> ] [0.6 color srgb <1.0, 1.0, 0.0> ] [0.7 color srgb <1.0, 0.5, 0.0> ] [0.8 color srgb <1.0, 1.0, 0.0> ] [0.9 color srgb <1.0, 0.5, 0.0> ] } rotate -90*x } } } //================================================================================== // R I N G W O R L D F L O O R //================================================================================== #declare RingWorld_Floor = difference { cylinder { // OuterFloor <0,0,1>, <0,0,0>, 1 translate -0.5*z scale <95000001.0, 95000001.0, 1000000.0> } cylinder { // InnerFloor <0,0,1>, <0,0,0>, 1 translate -0.5*z scale <95000000.0, 95000000.0, 997000.0> } cylinder { // TopRimWall_01 <0,0,1>, <0,0,0>, 1 translate -0.5*z scale <94999000.0, 94999000.0, 1700.0> translate -499300.0*z } cylinder { // TopRimWall_02 <0,0,1>, <0,0,0>, 1 translate -0.5*z scale <94999000.0, 94999000.0, 1700.0> translate 499300.0*z } material { Ringworld_landscape scale 1*10e5 rotate 20*z } rotate -90.0*x } //================================================================================== // H I G H C L O U D L A Y E R //================================================================================== #declare Clouds = cylinder { // Sky_high <0, 0, -0.5>, <0, 0, 0.5>, 1 open hollow scale <94999000.0, 94999000.0, (1*10e5)-1> material { Carribean_Cloud_Sky scale 1*10e5 } rotate -90.0*x //rotate to vertical rotate 0*y //rotate around cylinder axis } //================================================================================== // F I S T O F G O D //================================================================================== #declare Fist_of_God = union { cone { // Lower_cone <0,0,0>, 150000.0, <0,0,80>, 0.0 //scale <1.0, 1.0, 250.0> //material {FistColor} } cone { // Upper_cone <0,0,0>, 25000.0, <0,0,1000>, 10.0 open //scale <1.0, 1.0, 1000.0> //pigment {color srgb <1,1,0>} } scale 1 //[1] increase just to make it visible translate <0.0, 0.0, -95000000.0> rotate 10*y } //================================================================================== // S H A D O W S Q U A R E S //================================================================================== #declare ShadowSquare_01 = box { <-1, -1, -1>, <1, 1, 1> scale <1250000.0, 10000.0, 500000.0> translate <0.0, -13000000.0, 0.0> } #declare ShadowSquares = union { #for (Loop, 0, 360, 18) object { ShadowSquare_01 rotate Loop*z} #end rotate -SQ_rot*z //rotate to daylight rotate 90.0*x //rotate to vertical material {SQ_tex} } //================================================================================== // F I N A L O B J E C T //================================================================================== #declare Ring = union { object { Ringworld_sun } object { ShadowSquares } object { RingWorld_Floor } object { Clouds } object { Fist_of_God } } object {Ring scale Ring_scale #if (NotMoray) scale <1,1,-1> rotate <90,0,0> translate 95000000.0*Ring_scale*y translate (500000*Ring_scale)*Rim_pos/100*z #else translate 95000000.0*Ring_scale*z translate (500000*Ring_scale)*Rim_pos/100*y #end } #end //of macro