/////////////////////////////////////////////////////////////////////////////
// Include Files
#include "colors.inc"
#include "metals.inc"
/*#include "finish.inc"
#include "woods.inc"
#include "shapes.inc"
#include "skies.inc"
#include "stars.inc"
#include "macros.inc"*/
//#include "glass.inc"
/////////////////////////////////////////////////////////////////////////////
// Declared pigments, finishes, etc.
#declare sky_vect = z;
#declare clk = clock;
#declare lookat = <7, 0, 0>;
#declare focalpoint = <0, 0, 0>;
#declare cam_loc = lookat+(<1, 1, .25>*1000);
//#declare cam_loc = lookat+(<0, .001, 1>*2000);
//#declare cam_loc = lookat+(<1, 1, 1>*750);
//#declare cam_loc = <0, 1000, 0>;
#declare cam_zoom = 11;
#declare light_loc = <.1, -1, .1>*500000;
#declare light_loc2 = <-.51, 1, -.1>*500000;
//#declare light_loc = vrotate(<-.5, -1, .25>*500000, clock);
#local Lights = 0;
#if(0)
#declare flare_scale_factor = 1;
#declare flare_amount = 1;
#declare spot_fade_amount = .01;
#declare flare_brightness = 1;
#declare flare_type = "35mm" // <- Change this value!
#declare flare_auto_rotate = 1;
#include "lnsflare.inc"
#end
#declare image_scale = sqrt(image_width*image_height);
global_settings
{
max_trace_level 12
assumed_gamma 2.2
#if(0)
photons
{
count 20000
autostop 0
jitter .4
media 100
}
#end
#if(0)
radiosity
{
brightness 1.25
count 240
error_bound .2
distance_maximum 5
minimum_reuse .1
nearest_count 6
recursion_limit 3
}
#end
#if(0)
motion_blur 5, .25
#end
}
background { Black }
#default
{
pigment { rgb<.70, .70, .75> }
finish
{
ambient .1
diffuse .9
reflection 0
phong 0
phong_size 30
brilliance .5
}
}
/////////////////////////////////////////////////////////////////////////////
// Sky
#if(0)
sky_sphere
{
S_Cloud1
rotate <90, 0, 0>
}
#end
#if(0)
#local fRightAscension=240;
#local fDeclination=0;
#local LimMag = 6;
#macro Star(nRAh, nRAm, nRAs, nDecH, nDecd, nDecm, nDecm, fMag)
#if (fMag < LimMag)
#if(nDecH>0)
#local vPosition = vPos(RA(nRAh, nRAm, nRAs), Dec(nDecd, nDecm, nDecm));
#else
#local vPosition = vPos(RA(nRAh, nRAm, nRAs), Dec(-nDecd, nDecm, nDecm));
#end
#local vP = vrotate(vPosition, <0, -fDeclination, -fRightAscension>);
#local col = ((LimMag+1)-fMag)/(LimMag+1);
sphere
{
vP * 1000
10
pigment{colour rgb
}
finish{ambient 1 diffuse 0}
}
#end
#end
#include "BSC.inc"
// #include "milkyway.inc"
#end
/////////////////////////////////////////////////////////////////////////////
// Lights
#if(1)
light_source
{
light_loc
colour rgb<1, 1, 1>*1.5
}
light_source
{
light_loc2
colour rgb<.25, .25, .5>
}
#end
#if(0)
#declare px = -10000;
#while (px <= 10000)
#declare py = -10000;
#while (py <= 10000)
#declare pz = -10000;
#while (pz <= 10000)
light_source
{
color .1
}
#declare pz = pz + 20000;
#end
#declare py = py + 20000;
#end
#declare px = px + 20000;
#end
#end
/////////////////////////////////////////////////////////////////////////////
// Camera
#if(1)
camera
{
location cam_loc
direction
up sky_vect
right <0, -(image_width/image_height), 0>
sky sky_vect
look_at lookat
#if(0)
focal_point focalpoint // pink sphere in focus
aperture 30 // a nice compromise
blur_samples 40 // more samples, higher quality image
#end
}
#else
camera
{
spherical
angle 180 90
location cam_loc
direction
up sky_vect
right <0, -(image_width/image_height), 0>
sky sky_vect
look_at lookat
}
#end
#declare R1 = seed(clock);
#declare R2 = seed(45742);
/////////////////////////////////////////////////////////////////////////////
// Values
#declare mm = 0.0010;
#declare cm = 0.0100;
#declare m = 1.0000;
#declare ft = 0.3048;
#declare in = 0.0254;
/////////////////////////////////////////////////////////////////////////////
// Objects
#local nDetail=1;
#local RandSeed = seed(78546);
#local tHullMetalInner=
texture
{
cells
texture_map
{
[0.0 pigment{Gray25} finish{phong .1 phong_size 1}]
[1.0 pigment{Gray25} finish{phong .2 phong_size 10}]
}
scale<2, 100, .5>
}
#local tHullMetalRibs=
texture
{
cells
texture_map
{
[0.0 pigment{Gray20} finish{phong .1 phong_size 1}]
[1.0 pigment{Gray20} finish{phong .2 phong_size 10}]
}
scale<2, 100, .5>
}
#local tHullPlates=
texture
{
cells
texture_map
{
[0.0 pigment{Gray40} finish{phong .2 phong_size 1}]
[1.0 pigment{Gray40} finish{phong .5 phong_size 100}]
}
scale<1, 100, .25>
}
#local tWindows=
texture
{
cells
texture_map
{
[0.00 pigment{colour White*2}finish{ambient 4 diffuse 0}]
[0.15 pigment{colour White*2}finish{ambient 4 diffuse 0}]
[0.15 pigment{colour Black}finish{ambient 0 diffuse 0}]
[0.30 pigment{colour Black}finish{ambient 0 diffuse 0}]
[0.30 pigment{colour rgb<2, 2, 1>}finish{ambient 0 diffuse 0}]
[0.45 pigment{colour rgb<2, 2, 1>}finish{ambient 0 diffuse 0}]
[0.45 tHullPlates]
[1.00 tHullPlates]
}
scale <1, .25, .05>
translate<0, 0, .05>
}
#declare Quantize = function(nValue, nQuanta) {int(nValue/nQuanta)*nQuanta}
#macro UpperHeadHull(nDiff)
union
{
difference
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>, <0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<50-nDiff, 10-nDiff, 10-nDiff>
}
plane{x, -25}
plane{z, nDiff}
cylinder{<-9, -31, 0>, <-9, 31, 0>, 9 scale<3, 1, 1>}
#local sy=-1;
#while(sy<=1)
union
{
box{<20, 10, 4>, <30, 20, 6.25>}
box{<42.75, 5.25, 2.75>, <50, 20, 6>}
#local px=-2.5;
#while(px<17.5)
box{<-2, 9, 6.5>, <2, 20, 8.125> translate}
#local px=px+5;
#end
scale<1, sy, 1>
}
#local sy=sy+2;
#end
translate<0, 0, 1>
}
difference
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>, <0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<25-nDiff, 5-nDiff, 2.5-nDiff>
}
plane{z, 0}
translate<0, 0, 9>
}
}
#end
#macro UpperHeadHullPlates(oObj, vOrient)
intersection
{
difference
{
object{UpperHeadHull(-rand(RandSeed)*.1)}
object{UpperHeadHull(.05)}
}
object{oObj}
#local c=0.35+(0.05*rand(RandSeed));
texture
{
cells
texture_map
{
[0.0 pigment{colour rgb} finish{phong .2 phong_size 1}]
[1.0 pigment{colour rgb} finish{phong .5 phong_size 100}]
}
scale<1, 100, .25>
rotate vOrient
}
}
#end
#local UpperHead=
union
{
#if(nDetail=0)
object{UpperHeadHull(0)}
#else
object{UpperHeadHull(.5) texture{tHullMetalInner}}
intersection
{
object{UpperHeadHull(.05)}
union
{
#local px=-60;
#while(px<=60)
cylinder{<-.25, 0, 0>, <.25, 0, 0>, 25 translate}
#local px=px+2.5;
#end
#local py=-5;
#while(py<=5)
cylinder{<0, -.25, 0>, <0, .25, 0>, 100 translate<0, py, 0>}
#local py=py+10;
#end
cylinder{<0, 0, -.25>, <0, 0, .25>, 100 translate<0, 0, 2.5>}
}
texture{tHullMetalRibs}
}
intersection
{
object{UpperHeadHull(.25)}
union
{
cylinder{<0, -.25, 0>, <0, .25, 0>, 100}
intersection
{
cylinder{<0, 0, -.25>, <0, 0, .25>, 100 translate<0, 0, 7.5>}
union
{
plane{y, -5}
plane{-y, -5}
}
}
}
texture{tHullMetalRibs}
}
union
{
UpperHeadHullPlates(box{<42.5, -5, 0>, <50, 5, 15>}, <90, 90, 0>)
UpperHeadHullPlates(box{<47.5, -15, 0>, <50, 15, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<37.5, -1.25, 1.5>, <42.5, -5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<37.5, 1.25, 1.5>, <42.5, 5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<32.5, -2.5, 1.5>, <35, -5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<32.5, 2.5, 1.5>, <35, 5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<30, -5, 1.5>, <32.5, 5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<22.5, -2.5, 1.5>, <27.5, 2.5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<20, -5, 1.5>, <22.5, 5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<20, -5, 1.5>, <10, -2.5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<20, 5, 1.5>, <10, 2.5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<0, -5, 1.5>, <10, 5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<-10, -5, 1.5>, <-5, -1.5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<-10, 5, 1.5>, <-5, 1.5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<-50, -5, 1.5>, <-10, 5, 15>}, <90, 0, 0>)
UpperHeadHullPlates(box{<-50, -25, 0>, <2.5, 25, 7.5>}, <0, 0, 0>)
UpperHeadHullPlates(box{<7.5, -25, 1.5>, <20, 25, 7.5>}, <0, 0, 0>)
UpperHeadHullPlates(box{<2.5, -25, 0>, <15, 25, 5>}, <0, 0, 0>)
UpperHeadHullPlates(box{<-50, -25, 2>, <47.5, 25, 3.5>}, <0, 0, 0>)
UpperHeadHullPlates(box{<25, -25, 0>, <30, 25, 5>}, <0, 0, 0>)
UpperHeadHullPlates(box{<35, -25, 0>, <42.5, 25, 5>}, <0, 0, 0>)
UpperHeadHullPlates(box{<0, -7.5, 0>, <35, 7.5, 5>}, <0, 0, 0>)
#local sy=-1;
#while(sy<=1)
union
{
UpperHeadHullPlates(box{<-50, -25, 5>, <-5, -5, 15>}, <0, 0, 0>)
UpperHeadHullPlates(box{<-50, -7.5, 5>, <5, -5, 15>}, <0, 0, 0>)
UpperHeadHullPlates(box{<-5, -10, 5>, <15, -7.5, 15>}, <0, 0, 0>)
UpperHeadHullPlates(box{<15, -10, 5>, <17.5, -15, 15>}, <0, 0, 0>)
UpperHeadHullPlates(box{<32.5, -25, 5>, <40, -5, 15>}, <0, 0, 0>)
difference
{
UpperHeadHullPlates(box{<15, -10, 5>, <35, -5, 15>}, <0, 0, 0>)
plane{z, 7.5}
}
scale <1, sy, 1>
}
#local sy=sy+2;
#end
}
#end
difference
{
intersection
{
plane{x, 1 rotate<0, -45, 0> translate<0, 0, 0>}
plane{x, 1 rotate<0, -80, 0> translate<-10, 0, 0>}
plane{-x, 10}
plane{y, 0 rotate<30, 0, 0> translate<0, 1.5, 0>}
plane{-y, 0 rotate<-30, 0, 0> translate<0, -1.5, 0>}
plane{z, 0}
plane{-z, 5}
}
union
{
box{<2.70, -1.5, .1>, <3, 1.5, -.1> translate<0, 0, -1.4>}
box{<3.025, -2, .1>, <4, -.5, -.1> translate<0, 0, -1.8>}
box{<3.025, 2, .1>, <4, .5, -.1> translate<0, 0, -1.8>}
texture{tWindows}
}
translate<32.5, 0, 10>
texture{tHullPlates rotate<90, 0, 0>}
}
#local sy=-1;
#while(sy<=1)
union
{
cylinder{<20, 12.5, 5>, <30, 11, 5>, .4}
cylinder{<20, 12, 6>, <27, 10.75, 6>, .4}
sphere{<27, 10.75, 6>, .4}
cylinder{<27, 10.75, 6>, <27, 10.75, 4>, .4}
cylinder{<20, 11.25, 7>, <30, 9.5, 7>, .4}
texture{tHullMetalRibs rotate<90, 0, 0>}
translate<0, 0, 0>
scale <1, sy, 1>
}
#local sy=sy+2;
#end
}
#macro LowerHeadHull(nDiff)
union
{
#local sy=-1;
#while(sy<=1)
difference
{
union
{
torus{.75, .25 rotate<90, 0, 0>}
cylinder{<0, 0, -.25>, <0, 0, .25>, .75}
}
plane{x, 0}
plane{y, 0}
plane{-z, 0}
translate<0, .5, 0>
scale<45-nDiff, 8.5-nDiff, 12.5-nDiff>
scale <1, sy, 1>
}
difference
{
union
{
torus{.75, .25 rotate<90, 0, 0>}
cylinder{<0, 0, -.25>, <0, 0, .25>, .75}
}
plane{-x, 0}
plane{y, 0}
plane{-z, 0}
translate<0, .5, 0>
scale<15-nDiff, 8.5-nDiff, 12.5-nDiff>
scale <1, sy, 1>
}
#local sy=sy+2;
#end
union
{
union
{
difference
{
cylinder{<.75, -.5, 0>, <.75, .5, 0>, .25}
plane{-z, 0}
}
box{<0, -.5, 0>, <.75, .5, -.25>}
scale<45-nDiff, 8.5-nDiff, 12.5-nDiff>
}
union
{
difference
{
cylinder{<-.75, -.5, 0>, <-.75, .5, 0>, .25}
plane{-z, 0}
}
box{<0, -.5, 0>, <-.75, .5, -.25>}
scale<15-nDiff, 8.5-nDiff, 12.5-nDiff>
}
}
#local sy=-1;
#while(sy<=1)
union
{
difference
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>, <0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<12.5-nDiff, 3.5-nDiff, 3-nDiff>
}
plane{x, 0}
plane{-z, 0}
}
difference
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>, <0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<35-nDiff, 3.5-nDiff, 3-nDiff>
}
plane{-x, 0}
plane{-z, 0}
}
translate<22.5, 4*sy, -2>
}
#local sy=sy+2;
#end
translate<0, 0, -1>
}
#end
#macro LowerHeadHullPlates(oObj, vOrient)
intersection
{
difference
{
object{LowerHeadHull(-rand(RandSeed)*.1)}
object{LowerHeadHull(.05)}
}
object{oObj}
#local c=0.35+(0.05*rand(RandSeed));
texture
{
cells
texture_map
{
[0.0 pigment{colour rgb} finish{phong .2 phong_size 1}]
[1.0 pigment{colour rgb} finish{phong .5 phong_size 100}]
}
scale<1, 100, .25>
rotate vOrient
}
}
#end
#local LowerHead=
union
{
#if(nDetail=0)
object{LowerHeadHull(0)}
#else
object{LowerHeadHull(0.5) texture{tHullMetalInner}}
intersection
{
LowerHeadHull(.05)
union
{
#local px=-60;
#while(px<=60)
cylinder{<-.25, 0, 0>, <.25, 0, 0>, 25 translate}
#local px=px+2.5;
#end
#local py=-5;
#while(py<=5)
cylinder{<0, -.25, 0>, <0, .25, 0>, 100 translate<0, py, 0>}
#local py=py+5;
#end
cylinder{<0, 0, -.25>, <0, 0, .25>, 100 translate<0, 0, -1.5>}
}
texture{tHullMetalRibs}
}
union
{
LowerHeadHullPlates(box{<15, -15, 0>, <35, 15, -3.5>}, <0, 0, 0>)
LowerHeadHullPlates(box{<40, -15, 0>, <50, 15, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<37.5, -5, 0>, <50, 5, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<30, -15, 0>, <32.5, 15, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<15, -2.5, 0>, <25, 2.5, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<32.5, -2.5, 0>, <37.5, 2.5, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<5, -15, 0>, <15, 15, -4.1>}, <0, 0, 0>)
LowerHeadHullPlates(box{<-5, -15, -2.5>, <0, 15, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<-10, -15, 0>, <-25, 15, -2.5>}, <0, 0, 0>)
LowerHeadHullPlates(box{<-12.5, -5, 0>, <-25, 5, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<-5, -2.5, 0>, <-25, 2.5, -15>}, <0, 0, 0>)
#local sy=-1;
#while(sy<=1)
union
{
LowerHeadHullPlates(box{<0, 5, -4.15>, <10, 15, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<5, 1.25, -4.15>, <27.5, 5, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<20, 5, -4.15>, <25, 15, -15>}, <0, 0, 0>)
LowerHeadHullPlates(box{<-10, 5, 0>, <-5, 15, -15>}, <0, 0, 0>)
scale <1, sy, 1>
}
#local sy=sy+2;
#end
}
#end
}
#macro MidHeadHull(nDiff)
intersection
{
union
{
#local sy=-1;
#while(sy<=1)
intersection
{
cylinder{<0, 0, -1>, <0, 0, 1>, 1 scale<42.5-nDiff, 7-nDiff, 1.5-nDiff> translate<0, 4, 0>}
plane{-y, 0}
scale <1, sy, 1>
}
#local sy=sy+2;
#end
box{<0, -4, -1>, <42-nDiff, 4, 1>}
}
plane{-x, 0}
}
#end
#local MidHeadHull0=
object{MidHeadHull(0)}
#local MidHeadHull1=
object{MidHeadHull(-1)}
#local MidHead=
union
{
#if(nDetail=0)
object{MidHeadHull(0)}
#else
object{MidHeadHull(0.5) texture{tHullMetalInner}}
intersection
{
MidHeadHull(.05)
union
{
#local px=-60;
#while(px<=60)
cylinder{<-.25, 0, 0>, <.25, 0, 0>, 25 translate}
#local px=px+2.5;
#end
#local py=-5;
#while(py<=5)
cylinder{<0, -.25, 0>, <0, .25, 0>, 100 translate<0, py, 0>}
#local py=py+5;
#end
cylinder{<0, 0, -.25>, <0, 0, .25>, 100 translate<0, 0, -1.5>}
}
texture{tHullMetalRibs}
}
#local RandSeed2=seed(7853);
#local n=0;
#while(n<40)
#local x1=rand(RandSeed2)*40;
#local x2=x1+rand(RandSeed2)*5;
#local y1=6.5+(rand(RandSeed2)*11);
#local z1=-1.1+(rand(RandSeed2)*2);
#local z2=z1+rand(RandSeed2);
#while(inside(MidHeadHull0, )=1)
#local y1=y1+.1;
#end
#while(inside(MidHeadHull1, )=0)
#local y1=y1-.1;
#end
box{, texture{tHullMetalRibs}}
#local n=n+1;
#end
#local n=0;
#while(n<20)
#local x1=rand(RandSeed2)*40;
#local x2=x1+rand(RandSeed2)*5;
#local y1=6.5+(rand(RandSeed2)*11);
#local z1=-1.1+(rand(RandSeed2)*2);
#local z2=z1+rand(RandSeed2);
#while(inside(MidHeadHull0, )=1)
#local y1=y1+.1;
#end
#while(inside(MidHeadHull1, )=0)
#local y1=y1-.1;
#end
box{, texture{tWindows rotate<0, 0, 90>}}
#local n=n+1;
#end
#end
}
#macro MidHeadLights(vPos)
#if(nDetail>0)
#local RandSeed2=seed(7853);
#local rz=0;
#while(rz<90)
#local sy=-1;
#while(sy<=1)
light_source
{
<0, 1, 0>, White
fade_distance 2
fade_power 2
rotate<0, 0, -rz>
scale<43, 9, 1>
translate<0, 4, 0>
scale<1, sy, 1>
translate vPos
}
#local sy=sy+2;
#end
#local rz=rz+(rand(RandSeed2)*25);
#end
#end
#end
#macro NeckHull(nDiff)
intersection
{
union
{
box{<50, 5-nDiff, 6-nDiff>,<-70, -5-nDiff, -6-nDiff>}
cylinder{<1, 0, 0>, <-1, 0, 0>, 1 scale<50, 10-nDiff, 6-nDiff>}
#local sy=-1;
#while(sy<=1)
#local sz=-1;
#while(sz<=1)
sphere{0, 1 scale<30-nDiff, 5-nDiff, 4-nDiff> translate<30, 5*sy, 3*sz>}
sphere{0, 1 scale<40-nDiff, 5-nDiff, 4.5-nDiff> translate<0, 6*sy, 2*sz>}
sphere{0, 1 scale<30-nDiff, 5-nDiff, 4-nDiff> translate<-30, 5*sy, 3*sz>}
#local sz=sz+2;
#end
sphere{0, 1 scale<40-nDiff, 6-nDiff, 5-nDiff> translate<-40, 6*sy, 0>}
#local sy=sy+2;
#end
}
plane{x, 50}
plane{-x, 50}
}
#end
#macro NeckHullPlates(oObj, vOrient)
intersection
{
difference
{
object{NeckHull(-rand(RandSeed)*.1)}
object{NeckHull(.05)}
}
object{oObj}
#local c=0.35+(0.05*rand(RandSeed));
texture
{
cells
texture_map
{
[0.0 pigment{colour rgb} finish{phong .2 phong_size 1}]
[1.0 pigment{colour rgb} finish{phong .5 phong_size 100}]
}
scale<1, 100, .25>
rotate vOrient
}
}
#end
#local Neck=
union
{
#if(nDetail=0)
object{NeckHull(0)}
#else
object{NeckHull(.5) texture{tHullMetalInner}}
intersection
{
NeckHull(.05)
union
{
#local px=-60;
#while(px<=60)
cylinder{<-.25, 0, 0>, <.25, 0, 0>, 25 translate}
#local px=px+2.5;
#end
#local py=-6;
#while(py<=6)
cylinder{<0, -.25, 0>, <0, .25, 0>, 100 translate<0, py, 0>}
#local py=py+4;
#end
#local rx=-25;
#while(rx<=25)
cylinder{<0, 0, -.25>, <0, 0, .25>, 100 rotate}
#local rx=rx+25;
#end
}
texture{tHullMetalRibs}
}
union
{
NeckHullPlates(box{<40, -15, -2.5>, <27.5, 15, -5>}, <0, 0, 0>)
NeckHullPlates(box{<40, -15, -2.5>, <35, 15, 2.5>}, <0, 0, 0>)
NeckHullPlates(box{<40, -15, 2.5>, <27.5, 15, 5>}, <0, 0, 0>)
NeckHullPlates(box{<5, -15, -4>, <15, 15, 4>}, <0, 0, 0>)
NeckHullPlates(box{<-50, -5, -10>, <-20, 5, 10>}, <90, 0, 0>)
NeckHullPlates(box{<-15, -5, -10>, <7.5, 5, 10>}, <90, 0, 0>)
NeckHullPlates(box{<10, -5, -10>, <50, 5, 10>}, <90, 0, 0>)
#local sy=-1;
#while(sy<=1)
#local sz=-1;
#while(sz<=1)
NeckHullPlates(box{<0, 6, 4>, <25, 8, 15> scale<1, sy, sz>}, <0, 0, 0>)
NeckHullPlates(box{<-5, 8, 4>, <17.5, 15, 15> scale<1, sy, sz>}, <0, 0, 0>)
#local sz=sz+2;
#end
NeckHullPlates(box{<30, 5, -10>, <-25, 6, 10> scale<1, sy, 1>}, <90, 0, 0>)
#local sy=sy+2;
#end
#local RandSeed2=seed(3456);
#local n=0;
#while(n<6)
#local x1=Quantize(-40+(rand(RandSeed2)*rand(RandSeed2)*50), 2.5);
#local x2=x1+Quantize(2.5+(rand(RandSeed2)*15), 2.5);
#local z1=Quantize((rand(RandSeed2)*10), 1);
#local z2=z1+Quantize(1+(rand(RandSeed2)*5), 1);
#local sy=-1;
#while(sy<=1)
#local sz=-1;
#while(sz<=1)
NeckHullPlates(box{, scale<1, sy, sz>}, <0, 0, 0>)
#local sz=sz+2;
#end
#local sy=sy+2;
#end
#local n=n+1;
#end
}
#end
union
{
cylinder{<0, 0, -6>, <0, 0, 6>, 6}
cylinder{<0, 0, -7>, <0, 0, 7>, 5}
torus{5, 1 rotate<90, 0, 0> translate<0, 0, 6>}
torus{5, 1 rotate<90, 0, 0> translate<0, 0, -6>}
translate<5, 0, 0>
texture{tHullMetalRibs rotate<90, 0, 0>}
translate<10, 0, 0>
}
/* object
{
RoundedBox(<-8, -5, -6.5>, <8, 5, 6.5>, 1)
translate<-20, 0, 0>
texture{tHullMetalRibs rotate<90, 0, 0>}
}*/
}
#macro EngineHull(nDiff)
union
{
union
{
intersection
{
torus{.5, .5 rotate<0, 0, 90> scale<50-nDiff, 4-nDiff, 4-nDiff>}
plane{-x, -7.5}
}
sphere{0, 1 scale<15-nDiff, 3-nDiff, 4-nDiff> translate<5, -3, 0>}
sphere{0, 1 scale<15-nDiff, 3-nDiff, 4-nDiff> translate<5, 3, 0>}
translate<0, 0, 1.75>
}
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<25-nDiff, 5-nDiff, 5-nDiff>
}
plane{-x, 0}
plane{-z, 0}
}
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<25-nDiff, 5-nDiff, 2-nDiff>
}
plane{-x, 0}
plane{z, 0}
}
difference
{
union
{
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<40-nDiff, 5-nDiff, 5-nDiff>
}
plane{x, 0}
plane{-x, 20}
plane{-z, 0}
}
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<40-nDiff, 5-nDiff, 2-nDiff>
}
plane{x, 0}
plane{-x, 20}
plane{z, 0}
}
}
union
{
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<39, 4.5, 4.5>
}
plane{x, -19}
plane{-x, 21}
plane{-z, .005}
}
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<39, 4.5, 1.5>
}
plane{x, -19}
plane{-x, 21}
plane{z, .005}
}
}
union
{
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<39, 4.25, 4.25>
}
plane{x, -18.5}
plane{-x, 21}
plane{-z, .005}
}
intersection
{
union
{
sphere{<0, -.5, 0>, 1}
cylinder{<0, -.5, 0>,<0, .5, 0>, 1}
sphere{<0, .5, 0>, 1}
scale<39, 4.25, 1.25>
}
plane{x, -18.5}
plane{-x, 21}
plane{z, .005}
}
pigment{colour White}
finish{ambient 1 diffuse 0}
}
}
}
#end
#macro EngineHullPlates(oObj, vOrient)
intersection
{
difference
{
object{EngineHull(-rand(RandSeed)*.1)}
object{EngineHull(.05)}
}
object{oObj}
#local c=0.35+(0.05*rand(RandSeed));
texture
{
cells
texture_map
{
[0.0 pigment{colour rgb} finish{phong .2 phong_size 1}]
[1.0 pigment{colour rgb} finish{phong .5 phong_size 100}]
}
scale<1, 100, .25>
rotate vOrient
}
}
#end
#local Engine=
union
{
#if(nDetail=0)
object{EngineHull(0)}
#else
object{EngineHull(.25) texture{tHullMetalInner}}
intersection
{
EngineHull(.05)
union
{
#local px=-60;
#while(px<=60)
cylinder{<-.25, 0, 0>, <.25, 0, 0>, 25 translate}
#local px=px+2.5;
#end
#local py=-2.5;
#while(py<=2.5)
cylinder{<0, -.25, 0>, <0, .25, 0>, 100 translate<0, py, 0>}
#local py=py+5;
#end
cylinder{<0, 0, -.25>, <0, 0, .25>, 100}
}
texture{tHullMetalRibs}
}
union
{
EngineHullPlates(box{<12, -2.75, -10>, <50, 2.75, 10>}, <90, 0, 0>)
EngineHullPlates(box{<22.5, -10, -10>, <50, 10, 10>}, <90, 0, 0>)
EngineHullPlates(box{<15, -10, -10>, <20, 10, 10>}, <90, 0, 0>)
EngineHullPlates(box{<0, -10, -10>, <-25, 10, 2.5>}, <0, 0, 0>)
EngineHullPlates(box{<-15, -10, 2.5>, <-25, 10, 10>}, <0, 0, 0>)
EngineHullPlates(box{<-15, -2.5, 0>, <-2.5, 2.5, 10>}, <90, 0, 0>)
EngineHullPlates(box{<2.5, -10, -10>, <7.5, 10, 3.5>}, <0, 0, 0>)
EngineHullPlates(cylinder{<7.5, 0, 0>, <7.5, 0, 10>, 4}, <90, 0, 0>)
EngineHullPlates(difference{box{<15, -6, -10>, <-2.5, 6, 10>}cylinder{<7.5, 0, 0>, <7.5, 0, 10>, 5.25}}, <90, 0, 0>)
EngineHullPlates(box{<-15, -3.5, -10>, <-7, -6, 10>}, <0, 0, 0>)
EngineHullPlates(box{<-15, 3.5, -10>, <-7, 6, 10>}, <0, 0, 0>)
}
#end
union
{
cylinder{<0, 0, 1.75>, <26, 0, 1.75>, 1.125}
sphere{0, 1.125 translate<26, 0, 1.75>}
cylinder{<26, 0, 1.75>, <26, 0, -5>, 1.125}
texture{tHullMetalRibs}
}
union
{
box{<-10, -2.5, 0>, <20, 2.5, -5>}
box{<-7.5, -3.5, 0>, <15, 3.5, -5>}
texture{tHullMetalRibs}
}
}
#local Engines=
union
{
#local sz=-1;
#while(sz<=1)
#local sy=-1;
#while(sy<=1)
object
{
Engine
rotate<-20, 0 0>
translate<0, 15, 3.5>
scale<1, sy, sz>
}
#local sy=sy+2;
#end
object
{
Engine
translate<-5, 0, 6>
scale<1, 1, sz>
}
#local sz=sz+2;
#end
#local sy=-1;
#while(sy<=1)
union
{
torus{.8, .2 rotate<0, 0, 90> scale<25, 6, 3> texture{tHullPlates}}
cylinder{<0, 0, 0>, <.175, 0, 0>, .8 scale<25, 6, 3> texture{tHullMetalRibs}}
translate<24, 12, 0>
scale<1, sy, 1>
}
#local sy=sy+2;
#end
box{<-12.5, -15, 1.25>, <15, 15, -1.25> texture{tHullMetalRibs}}
box{<0, -15.5, 1>, <15, 15.5, -1> texture{tHullPlates}}
}
#macro PodHull(nDiff)
union
{
difference
{
merge
{
merge
{
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{x, 0}
plane{y, 0}
plane{z, 0}
scale<50-nDiff, 1, 1>
}
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{-x, 0}
plane{y, 0}
plane{z, 0}
scale<30-nDiff, 1, 1>
}
scale<1, 10-nDiff, 10-nDiff>
}
merge
{
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{x, 0}
// plane{-y, 0}
plane{z, 0}
scale<50-nDiff, 1, 1>
}
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{-x, 0}
// plane{-y, 0}
plane{z, 0}
scale<30-nDiff, 1, 1>
}
scale<1, 5-nDiff, 10-nDiff>
}
merge
{
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{x, 0}
plane{y, 0}
plane{-z, 0}
scale<50-nDiff, 1, 1>
}
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{-x, 0}
plane{y, 0}
plane{-z, 0}
scale<30-nDiff, 1, 1>
}
scale<1, 10-nDiff, 5-nDiff>
}
merge
{
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{x, 0}
// plane{-y, 0}
plane{-z, 0}
scale<50-nDiff, 1, 1>
}
difference
{
merge
{
torus{.5, .5 rotate<90, 0, 0>}
cylinder{<0, 0, -.5>, <0, 0, .5>, .5}
}
plane{-x, 0}
// plane{-y, 0}
plane{-z, 0}
scale<30-nDiff, 1, 1>
}
scale<1, 5-nDiff, 5-nDiff>
}
}
box{<-10-nDiff, 0, -.5-nDiff>, <10+nDiff, 10, .5+nDiff> translate<10, 8, 0>}
box{<0, 0, .01>, <10, 10, 4> rotate<0, 0, -7.5> translate<40+nDiff, 0, 0>}
box{<0, 0, .01>, <-10, 10, 4> rotate<0, 0, 7.5> translate<-20-nDiff, 0, 0>}
union
{
box{<-10, 7.5, 0>, <-1.5, 10, 5>}
box{<1.5, 7.5, 0>, <15, 10, 5>}
translate<5, 0, 1>
}
}
#local px=-10;
#while(px<=15)
difference
{
cylinder{<-5+nDiff,0, 0>, <5-nDiff,0, 0>, 1 scale<1, 25-nDiff, 6.5-nDiff> translate<0, -20, 4>}
cylinder{<-6,0, 0>, <6,0, 0>, 1 scale<1, 25, 6.5-nDiff> translate<0, -15, -2>}
cylinder{<-6,0, 0>, <-4+nDiff,0, 0>, 1 scale<1, 23.5-nDiff, 5-nDiff> translate<0, -20, 4>}
cylinder{<6,0, 0>, <4-nDiff,0, 0>, 1 scale<1, 23.5-nDiff, 5-nDiff> translate<0, -20, 4>}
plane{y, -10}
translate
}
#local px=px+25;
#end
}
#end
#macro PodHullPlates(oObj, vOrient)
intersection
{
difference
{
object{PodHull(-rand(RandSeed)*.1)}
object{PodHull(.05)}
}
object{oObj}
#local c=0.35+(0.05*rand(RandSeed));
texture
{
cells
texture_map
{
[0.0 pigment{colour rgb} finish{phong .2 phong_size 1}]
[1.0 pigment{colour rgb} finish{phong .5 phong_size 100}]
}
scale<1, 100, .25>
rotate vOrient
}
}
#end
#local Pod=
//light_group
//{
union
{
#if(nDetail=0)
difference
{
PodHull(0)
PodHull(.2751)
}
#else
difference
{
object{PodHull(.25)}
difference
{
object{PodHull(.2751)}
plane{z, -.001}
}
#local px=-9.5;
#while(px<=9.5)
intersection
{
box{<-.35, -5, -.35>, <.35, 5, .35> }
box{<-.5, -5, -.5>, <.5, 5, .5> rotate<0, 45, 0> scale<1, 1, 2> translate<0, 0, -.9>}
translate
translate<10, 8, 0>
}
#local px=px+1;
#end
texture{tHullMetalInner}
}
intersection
{
difference
{
PodHull(.05)
PodHull(.25)
}
union
{
#local px=-60;
#while(px<=60)
cylinder{<-.25, 0, 0>, <.25, 0, 0>, 25 translate}
#local px=px+2.5;
#end
cylinder{<0, -.25, 0>, <0, .25, 0>, 100}
cylinder{<0, 0, -.25>, <0, 0, .25>, 100}
cylinder{<0, 0, -.25>, <0, 0, .25>, 100 translate<0, 0, 2.5>}
}
texture{tHullMetalRibs}
}
union
{
PodHullPlates(box{<35, -10, -.25>, <50, 10, -10>}, <90, 0, 0>)
PodHullPlates(box{<32.5, -10, .25>, <50, 10, 10>}, <90, 0, 0>)
PodHullPlates(box{<32.5, -2, 0>, <21, 2, 10>}, <90, 0, 0>)
PodHullPlates(box{<9, -10, 4.5>, <21, 7.5, 6>}, <90, 0, 0>)
PodHullPlates(box{<9, -2, 0>, <-4, 2, 10>}, <90, 0, 0>)
PodHullPlates(box{<-4, -10, 4.5>, <-16, 7.5, 6>}, <90, 0, 0>)
PodHullPlates(box{<-16, -2, 0>, <-22.5, 2, 10>}, <90, 0, 0>)
PodHullPlates(box{<9, -15, 6.25>, <12.5, 10, 10>}, <60, 0, 0>)
PodHullPlates(box{<13, -5, 6>, <17, 10, 10>}, <60, 0, 0>)
PodHullPlates(box{<17.5, -15, 6.25>, <21, 10, 10>}, <60, 0, 0>)
PodHullPlates(box{<-4, -15, 6.25>, <-7.5, 10, 10>}, <60, 0, 0>)
PodHullPlates(box{<-8, -5, 6>, <-12, 10, 10>}, <60, 0, 0>)
PodHullPlates(box{<-12.5, -15, 6.25>, <-16, 10, 10>}, <60, 0, 0>)
PodHullPlates(box{<-20, -10, -.25>, <-50, 10, -10>}, <90, 0, 0>)
PodHullPlates(box{<-22.5, -10, .25>, <-50, 10, 10>}, <90, 0, 0>)
PodHullPlates(box{<-1, 0, -10>, <21, 10, 1>}, <0, 0, 0>)
PodHullPlates(box{<-2, 0, -10>, <-16, 10, 1>}, <0, 0, 0>)
PodHullPlates(box{<21.5, 2.5, -2.5>, <32, 10, 10>}, <0, 0, 0>)
PodHullPlates(box{<-16.5, 2.5, 0>, <-22, 10, 10>}, <0, 0, 0>)
PodHullPlates(box{<21, 2.5, 1.25>, <-16, 10, 4.25>}, <0, 0, 0>)
}
#end
#local RandSeed2=seed(7853);
#local n=0;
#while(n<50)
#local x1=-6.5+(rand(RandSeed2)*25);
#local x2=x1+rand(RandSeed2)*5;
#local z1=1+(rand(RandSeed2)*1.9);
#local z2=z1+rand(RandSeed2)+.1;
#local y1=7.51+((rand(RandSeed2)*1)/sqrt(z1));
box{, texture{tHullMetalRibs} no_shadow}
#local n=n+1;
#end
#local n=0;
box{<-5, 7.5, 1.5>, <20, 8, 2> texture{tWindows} no_shadow}
box{<-5, 7.5, 2.5>, <20, 8, 3> texture{tWindows} no_shadow}
}
/*#if(nDetail=1)
light_source
{
<38, 0, 3>
colour 2
fade_distance 4
fade_power 2
}
light_source
{
<30, 0, 3>
colour 2
fade_distance 4
fade_power 2
}
light_source
{
<-10, 0, 3>
colour 2
fade_distance 4
fade_power 2
}
light_source
{
<-18, 0, 3>
colour 1
fade_distance 4
fade_power 2
}
light_source
{
<1.95, 9, 3>
colour 1
fade_distance 2
fade_power 2
// looks_like{sphere{0, 1 pigment{Pink} finish{ambient 1}}}
}
light_source
{
<10, 9, 2>
colour .5
fade_distance 2
fade_power 2
// looks_like{sphere{0, 1 pigment{Pink} finish{ambient 1}}}
}
light_source
{
<18, 9, 3>
colour .5
fade_distance 2
fade_power 2
// looks_like{sphere{0, 1 pigment{Yellow} finish{ambient 1}}}
}
#end
global_lights
}*/
#local Pods=
union
{
#local sy=1;
#while(sy<=1)
object{Pod translate<0, 20, -2.5> scale<1, sy, 1>}
#local sy=sy+2;
#end
}
#if(1)
union
{
light_group
{
object{UpperHead translate<50, 0, 0>}
object{LowerHead translate<50, 0, 0>}
object{MidHead translate<50, 0, 0>}
MidHeadLights(<50, 0, 0>)
global_lights on
}
object{Neck translate<0, 0, 3>}
object{Engines translate<-65, 0, 3>}
object{Pods translate<0, 0, 0>}
}
#end