
#declare hangar_neg = 
    difference {
	cone {
	    <0, 0, 0>, 900,
	    <0, 115, 0>, 900
	}
	cone {
	    <0, 0, 0>, 900-140,
	    <0, 115, 0>, 900-140
	}
    }

#declare triebwerk_neg = 
    difference {
	cone {
	    <0, 599, 0>, 900,
	    <0, 501, 0>, 900
	}
	cone {
	    <0, 599, 0>, 600,
	    <0, 501, 0>, 600
	}
    }

#declare landestuetzen_neg = 
    union {
	#declare i = 0;
	#while (i < 16)
	    cone {
		<350, -700, 0>, 25,
		<350, -900, 0>, 25
		rotate <0, i*360/16, 0>
	    }
	    #declare i = i + 1;
	#end
    }

#include "kombiblock.pov"
#include "metagrav.pov"
#include "vesta.pov"
#include "tfk_2000.pov"
#include "tfk_4000.pov"
#include "mvh.pov"

#ifndef (Strut_Ext)
    #declare Strut_Ext = 11/15;
#end
#include "strut.pov"
#include "ortungsband.pov"

#declare entdecker = 
    union {
	difference {
	    sphere {
		<0, 0, 0>, 900
	    }
	    object {
		hangar_neg
		translate <0, 10, 0>
	    }
	    object {
		hangar_neg
		translate <0, -10-115, 0>
	    }
	    object {
		triebwerk_neg
	    }
	    object {
		triebwerk_neg
		scale <1, -1, 1>
	    }
	    object {
		landestuetzen_neg
	    }
	    texture {Ynkelonium_Texture }
	}

#if (1)
	// oberer Triebwerksring
	#declare i = 0; 
	#while (i < 360) 
	    #declare j = -1;
	    #while (j <= +1) 
		object {
		    kombiblock_oben
		    rotate <0, i + 20*j, 0>
		    translate <0, 500, 0>
		}
		#declare j = j + 1;
	    #end

	    object {
		metagrav_oben
		translate <-740, 501, 0>
		rotate <0, i + 45, 0>
	    }

	    #declare i = i + 90;
	#end

	#declare i = 0; 
	#while (i < 360) 

	    object {
		vesta
		translate <830, 50+10, 0>
		rotate <0, i, 0>
	    }

	    object {
		vesta
		translate <830, 50-115-10, 0>
		rotate <0, i, 0>
	    }

	    #declare i = i + 12;
	#end

	// unterer Triebwerksring
	#declare i = 0; 
	#while (i < 360) 
	    #declare j = -1;
	    #while (j <= +1) 
		object {
		    kombiblock_unten
		    rotate <0, i + 20*j, 0>
		    translate <0, -600, 0>
		}
		#declare j = j + 1;
	    #end

	    object {
		metagrav_unten
		translate <-740, -599, 0>
		rotate <0, i + 45, 0>
	    }

	    #declare i = i + 90;
	#end
#end

	// Landestützen
	#declare i = 0;
	#while (i < 16)
	    object {
		strut
		translate <350, -900, 0>
		rotate <0, i*360/16, 0>
	    }
	    #declare i = i + 1;
	#end

	// Transformkanonen, 4000 Gt.
	// 8 Stück sind nicht leicht gleichmäßig zu verteilen
	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, 90>
	    rotate <0, 0, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, 60>
	    rotate <0, 0, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, 60>
	    rotate <0, 120, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, 60>
	    rotate <0, 240, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, -60>
	    rotate <0, 0, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, -60>
	    rotate <0, 90, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, -60>
	    rotate <0, 180, 0>
	}

	object {
	    tfk_4000
	    translate <900, 0, 0>
	    rotate <0, 0, -60>
	    rotate <0, 270, 0>
	}

	// Transformkanonen, 2000 Gt.
	// formen einen leicht verzerrten Ikosaeder
	#declare i = 0;
	#while (i < 5)
	    object {
		tfk_2000
		translate <900, 0, 0>
		rotate <0, 0, 16.128>
		rotate <0, i*360/5, 0>
	    }
	    object {
		tfk_2000
		translate <900, 0, 0>
		rotate <0, 0, 46.238>
		rotate <0, i*360/5, 0>
	    }
	    object {
		tfk_2000
		translate <900, 0, 0>
		rotate <0, 0, -16.128>
		rotate <0, (i+0.5)*360/5, 0>
	    }
	    object {
		tfk_2000
		translate <900, 0, 0>
		rotate <0, 0, -46.238>
		rotate <0, (i+0.5)*360/5, 0>
	    }
	    #declare i = i + 1;
	#end

	// MVH-Geschütze
	// formen einen leicht verzerrten Buckyball
	#declare i = 0;
	#while (i < 5)
	    #declare sg = -1;
	    #while (sg <= 1) 
		object {
		    mvh
		    translate <900, 0, 0>
		    rotate <0, 0, sg*70.81>
		    rotate <0, i*72+(sg-1)*18 + 36, 0>
		}
		object {
		    mvh
		    translate <900, 0, 0>
		    rotate <0, 0, sg*48.11>
		    rotate <0, i*72+(sg-1)*18 + 36, 0>
		}
		object {
		    mvh
		    translate <900, 0, 0>
		    rotate <0, 0, sg*31.48>
		    rotate <0, i*72+(sg-1)*18 + 12, 0>
		}
		object {
		    mvh
		    translate <900, 0, 0>
		    rotate <0, 0, sg*31.48>
		    rotate <0, i*72+(sg-1)*18 + 60, 0>
		}
		object {
		    mvh
		    translate <900, 0, 0>
		    rotate <0, 0, sg*9.27>
		    rotate <0, i*72+(sg-1)*18 + 24, 0>
		}
		object {
		    mvh
		    translate <900, 0, 0>
		    rotate <0, 0, sg*9.27>
		    rotate <0, i*72+(sg-1)*18 + 48, 0>
		}
		#declare sg = sg + 2;
	    #end
	    #declare i = i + 1;
	#end

	// Ortungsbänder
	#declare i = 0;
	#while (i < 5)
	    #declare sg = -1;
	    #while (sg <= 1) 
		object {
		    ortungsband
		    rotate <0,    0,           22.5>
		    rotate <sg*25, 0,           0>
		    rotate <0,    i*72 + sg*28, 0>
		}
		object {
		    ortungsband
		    rotate <0,    0,           180>
		    rotate <0,    0,           22.5>
		    rotate <sg*25, 0,           0>
		    rotate <0,    i*72 + sg*28, 0>
		}
		#declare sg = sg + 2;
	    #end
	    object {
		ortungsband
		rotate <0,    0,           120>
		rotate <0   , 0,           0>
		rotate <0,    i*72       , 0>
	    }
	    object {
		ortungsband
		rotate <90.   0,           0>
		rotate <0   , 0,           74>
		rotate <0,    i*72       , 0>
	    }
	    object {
		ortungsband
		rotate <0,    0,           180>
		rotate <90.   0,           0>
		rotate <0   , 0,           74>
		rotate <0,    i*72       , 0>
	    }
	    #declare i = i + 1;
	#end
    }


