//Starstrider source code - a bit messy in places!
// www.cronodon.com
#include "colors.inc"
//#include "stones.inc"
#include "metals.inc"
#include "shapes.inc"
//#include "shapes2.inc"
//#include "shapesq.inc"
#include "glass.inc"
//#include "stars.inc"
/*
//Chris Colefax's Galaxy.inc
//STARFIELD
#declare star_count = 2000;
#declare star_scale = 0.20; //default 1
#declare star_colour_turb = 100;
//#declare star_scale = 1; //default 1
#declare star_brightness_turb = 0.5; //default 0.5
#declare star_colour = <0.9, 0.6, 0.4>; // default <0.9,0.9,0.9>
#include "GALAXY.SF"
*/
/*
// GALAXY BACKGROUND
#declare galaxy_bgstars = 4;
#declare galaxy_bgnebula = off;
#declare galaxy_nebula_sphere = 5;
#include "GALAXY.BG"
*/
//global_settings { assumed_gamma 2.2 }
camera {
//location <0, 10, -120>
location <0,30,-200>
direction 1.5*z
right 4/3*x
look_at <10, 10, 0.0>
//rotate <90,0,0>
//rotate <0,30,0>
//rotate <-100,0,0>
}
light_source {
0*x
color rgb <1,.9,.95>*1.5
translate <-80, 40, -80>
}
//External light
light_source {
0*x
color rgb <1,.9,.95>*1.5
translate <-80, -40, -80>
}
light_source {
0*x
color rgb <1,.9,.95>*1.5
translate <80, 40, -80>
}
light_source {
0*x
color rgb <1,.9,.95>*1.5
translate <80, -40, -80>
}
//background {color Black}
background {color White}
//UGA Starstrider
//Hull
union{
union{
difference{
union{
sphere_sweep { b_spline 11
<-11,0,0>, 3,
<-10,0,0>, 4,
<-9,0,0>, 5,
<-7,0,0>, 6,
<-5,0,0>, 7,
<0,0,0>, 7,
<5,0,0>, 7,
<7,0,0>, 6,
<9,0,0>, 4,
<10,0,0>, 3,
<12,0,0>, 2
//<13,0,0>, 1
//<14,0,0>, 1
texture {T_Brass_1A}
//scale <3,2,2>
}
sphere_sweep {b_spline 4
<13,0,0>, 4,
<14,0,0>, 1.5,
<15,0,0>, 1,
<16,0,0>, 0.1
texture {T_Ruby_Glass}
translate <-1,0,0>
//scale <1.5, 1.5, 1.5>
}
}//end union
box { <-15,0.6,-8>, <15,8,8>}
scale <3,2,2>
} // end difference
//Bow
difference {
cone { <8,0.6,0>, 3, <20,0.6,0>, 0.1 texture {T_Brass_1A} }
box { <10,1,-2>, <20,3,2 >}
translate <36,-0.4,0> }
prism {
linear_sweep
linear_spline
0.6, 1.6,
3,
<8,-1.5>, <8, 1.5>, <20,-0.5>
texture {T_Brass_1A}
translate <36,-.52,0> }
//cylinder { <55,0.6,0>, <58,0.6,0>, 0.2 texture {T_Brass_1A} }
//Top deck
prism {
linear_sweep
//linear_spline
cubic_spline //point one matches third from last, last point matches point 3
0.2, 0.8,
//23,
26,
<-14,3>,
<-14,-3>, <-10,-5>, <-9,-5.5>, <-7,-6>, <-5,-7>, <0,-7>, <5,-7>, <7,-6>, <9,-5.5>, <10,-5>, <14,-2>, <16,0>,
<14,2>, <10,5>, <9,5.5>, <7,6>, <5,7>, <0,7>, <-5,7>, <-7,6>, <-9,5.5>, <-10,5>, <-14,3>,
<-14,-3>,
<-10,-5>
texture { pigment { color Grey} finish {ambient 0.01 diffuse 0.1 reflection 0.5 phong 0.3 phong_size 60 } }
scale <3,2,2.2>}
//Keel
difference{
box {
<-13.5,-7.5,-0.2>, <13.5, -2, 0.2>
texture {T_Brass_1A}
scale <3,2,1>
}
sphere_sweep {
b_spline
10
<0,0,0>, 2,
<-1,-2,0>, 2,
<-2,-5,0>, 2,
<-3,-7,0>, 2,
<-5,-10,0>, 2,
<-6,-12,0>, 2.5,
<-5,-13,0>, 2.5,
<-4,-15,0>, 2.5,
<-5,-17,0>, 2.5,
<-4,-19,0>, 2.5
//texture {T_Chrome_1A}
translate <44.5,2,0>
scale <1,1,1>
} }
scale <1,1.2,1>
} //end main union
//Engines
//starboard engine
difference{
box {
<18,-5,-3>, <12,-1,3>
texture {T_Chrome_1C}
}
cylinder {
<0,0,0>, <3,0,0>, 0.9 pigment {color Red}
translate <11,-3,-1.2>
}
cylinder {
<0,0,0>, <3,0,0>, 0.9 pigment {color Red}
translate <11,-3,1.1>
}
scale <1.5,1.2,1>
translate <-60,1,-4>
}//end difference
//light_source { <65,1,-4> color Green*8}
//port engine
difference{
box {
<18,-5,-3>, <12,-1,3>
texture {T_Chrome_1C}
}
cylinder {
<0,0,0>, <3,0,0>, 0.9 pigment {color Red}
translate <11,-3,-1.2>
}
cylinder {
<0,0,0>, <3,0,0>, 0.9 pigment {color Red}
translate <11,-3,1.1>
}
scale <1.5,1.2,1>
translate <-60,1,4>
}//end difference
//upper works
union{
//Observation dome
sphere { <-32,4.5,0>, 6 texture {T_Ruby_Glass} }
//Observation domes
//sphere { <25,2,-5>, 3 texture {T_Ruby_Glass} scale <1.2,1,1> }
//sphere { <25,2,5>, 3 texture {T_Ruby_Glass} scale <1.2,1,1> }
//upper works
box { <-40,-2,-7>, <25,4.5,7> texture {T_Chrome_1B} }
sphere { <23,4.5,-5>, 1 texture { T_Brass_1A } }
sphere { <23,4.5,5>, 1 texture {T_Brass_1A} }
sphere { <-20,2,-7>, 1 texture { T_Brass_1A } }
sphere { <-15,2,-7>, 1 texture {T_Brass_1A} }
sphere { <-10,2,-7>, 1 texture {T_Brass_1A} }
sphere { <-5,2,-7>, 1 texture {T_Brass_1A} }
sphere { <0,2,-7>, 1 texture {T_Brass_1A} }
sphere { <5,2,-7>, 1 texture {T_Brass_1A} }
sphere { <10,2,-7>, 1 texture {T_Brass_1A} }
sphere { <-20,2,7>, 1 texture {T_Brass_1A} }
sphere { <-15,2,7>, 1 texture {T_Brass_1A} }
sphere { <-10,2,7>, 1 texture {T_Brass_1A} }
sphere { <-5,2,7>, 1 texture {T_Brass_1A} }
sphere { <0,2,7>, 1 texture {T_Brass_1A} }
sphere { <5,2,7>, 1 texture {T_Brass_1A} }
sphere { <10,2,-7>, 1 texture {T_Brass_1A} }
sphere { <-20,-5,-12.9>, 1 texture {T_Brass_1A} }
sphere { <-15,-5,-13.4>, 1 texture {T_Brass_1A} }
sphere { <-10,-5,-13.7>, 1 texture {T_Brass_1A} }
sphere { <-5,-5,-13.9>, 1 texture {T_Brass_1A} }
sphere { <0,-5,-13.7>, 1 texture {T_Brass_1A} }
sphere { <5,-5,-13.7>, 1 texture {T_Brass_1A} }
sphere { <10,-5,-13.7>, 1 texture {T_Brass_1A} }
sphere { <-20,-5,12.9>, 1 texture {T_Brass_1A} }
sphere { <-15,-5,13.4>, 1 texture {T_Brass_1A} }
sphere { <-10,-5,13.7>, 1 texture {T_Brass_1A} }
sphere { <-5,-5,13.7>, 1 texture {T_Brass_1A} }
sphere { <0,-5,13.7>, 1 texture {T_Brass_1A} }
sphere { <5,-5,13.7>, 1 texture {T_Brass_1A} }
sphere { <10,-5,13.7>, 1 texture {T_Brass_1A} }
//Masts
//Fore
//Main
cylinder {<0,0,0>, <0,40,0>, 1 texture {T_Brass_1B} }
cylinder {<0,39,0>, <0,60,0>, 0.6 texture {T_Brass_1B} }
cylinder {<0,59,0>, <0,70,0>, 0.3 texture {T_Brass_1B} }
cylinder {<0,50,40>, <0,50,-40>, 0.4 texture {T_Brass_1B} }
//Stays
cylinder {<-20,0,0>, <0,25,0>, 0.5 texture {T_Brass_1B} }
cylinder {<20,0,0>, <0,25,0>, 0.5 texture {T_Brass_1B} }
//Aft
cylinder {<-22,0,0>, <-22,25,0>, 0.6 texture {T_Brass_1B} }
cylinder {<-22,24,0>, <-22,40,0>, 0.3 texture {T_Brass_1B} }
cylinder {<-22,39,0>, <-22,45,0>, 0.1 texture {T_Brass_1B} }
cylinder {<-22,35,-20>, <-22,35,20>, 0.4 texture {T_Brass_1B} }
//Fore
cylinder {<22,0,0>, <22,25,0>, 0.5 texture {T_Brass_1B} }
cylinder {<22,24,0>, <22,35,0>, 0.2 texture {T_Brass_1B} }
cylinder {<22,34,0>, <22,40,0>, 0.1 texture {T_Brass_1B} }
//cylinder {<22,30,-20>, <22,30,20>, 0.4 texture {T_Brass_1B} }
cylinder {<12,30,0>, <32,30,0>, 0.4 texture {T_Brass_1B} }
//Solar panels
//Aft 16 units long, 8 units wide
//sphere {
box {
//<-22,35,-20>, <-6,34.8,-10>
<0,0,0>, <16,-0.2,8> rotate <0,0,-30> translate <-22,35,-20>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
//<-22,35,-20>, <-6,34.8,-10>
<0,0,0>, <16,-0.2,8> rotate <0,0,-30> translate <-22,35,-10>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <16,-0.2,8> rotate <0,0,-30> translate <-22,35,12>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <16,-0.2,8> rotate <0,0,-30> translate <-22,35,2>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <16,-0.2,8> rotate <0,180,30> translate <-22,35,-12>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <16,-0.2,8> rotate <0,180,30> translate <-22,35,-2>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <16,-0.2,8> rotate <0,180,30> translate <-22,35,20>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <16,-0.2,8> rotate <0,180,30> translate <-22,35,10>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
//Fore
box {
<0,0,0>, <20,-0.2,8> rotate <0,0,-60> rotate <0,90,0> translate <24,30,0>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <20,-0.2,8> rotate <0,0,-60> rotate <0,90,0> translate <12,30,0>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <20,-0.2,8> rotate <0,0,-60> rotate <0,270,0> translate <32,30,0>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <20,-0.2,8> rotate <0,0,-60> rotate <0,270,0> translate <20,30,0>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
//Main
//Panel length 32 units, width 18 units
box {
<0,0,0>, <32,-0.2,18> rotate <-45,0,0> translate <0,41,-33>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <-45,0,0> translate <0,41,-13>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <-45,0,0> translate <0,41,29>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <-45,0,0> translate <0,41,9>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <45,0,0> rotate <0,180,0> translate <0,52,-21>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <45,0,0> rotate <0,180,0> translate <0,52,-1>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <45,0,0> rotate <0,180,0> translate <0,52,41>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
box {
<0,0,0>, <32,-0.2,18> rotate <45,0,0> rotate <0,180,0> translate <0,52,21>
texture {pigment { color Cyan} finish {ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } }
}
translate <0,2,0>
}
//Electron batteries x2
sphere { <-25,-8,-8>, 3 texture {T_Brass_1C} }
sphere { <-25,-8,8>, 3 texture {T_Brass_1C} }
/*
sphere_sweep { b_spline 4
<21,0,-12>, 1,
<27,0,-10>, 0.9,
<30,0,-8>, 0.8,
<36,0,-6>, 0.7
texture {T_Brass_1B}
translate <0,-2,-2>
}
sphere_sweep { b_spline 4
<21,0,12>, 1,
<27,0,10>, 0.9,
<30,0,8>, 0.8,
<36,0,6>, 0.7
texture {T_Brass_1B}
translate <0,-2,2>
}
*/
//rotate <0,0,0> //starboard, default
//rotate <0,180,0> //port
//rotate <-90,0,0> //birdseye
//rotate <0,90,0> // fore
//rotate <0,60,0> // fore
//rotate <0,0,20> rotate <0,0,0>
//rotate <0,-90,0> //aft
//rotate <0,0,180> //upside-down
//rotate <90,0,0> //bottom
//rotate <-20,0,0>
//rotate <0,10,0>
scale <1.1,1,1>
}