/*

    Kabinenentwurf 3:

    (für Aufteilung: 12 m Zentrale, 30 m Kabinen)

    Innerer Kabinenblock: Offizierskabinen:

    Innenradius 6.0 m, Außenradius 10.0, 
    4 Blöcke á 3 Kabinen
    12 m² pro Kabine

 */

#declare eps=1E-3;

#declare Gw = asin(1/6)*45/atan2(1,1);
#declare Kw = (90 - 2 * Gw) / 3;

#include "einrichtung.pov"

#declare kabine3 = 
    union {
	intersection {
	    union {
		difference {
		    cylinder {
			<0, 0, 0>
			<0, 5, 0>
			6.1
		    }
		    cylinder {
			<0, 0-eps, 0>
			<0, 5+eps, 0>
			6.0
		    }
		}
		difference {
		    cylinder {
			<0, 0, 0>
			<0, 5, 0>
			6.91
		    }
		    cylinder {
			<0, 0-eps, 0>
			<0, 5+eps, 0>
			6.90
		    }
		    texture {
			pigment {
			    color rgbf <1, 1, 1, 0.5>
			}
		    }
		}
		// Außenwand (mit Aussparung für Schott)
		difference {
		    cylinder {
			<0, 0, 0>
			<0, 5, 0>
			10.0
		    }
		    cylinder {
			<0, 0-eps, 0>
			<0, 5+eps, 0>
			9.9
		    }
		    superellipsoid {
			<0.8, 0.8 >
			scale <0.5, 1, 1>
			translate <0, 1, 10>
		    }
		}
		// Schott
		intersection {
		    difference {
			cylinder {
			    <0, 0, 0>
			    <0, 5, 0>
			    9.98
			}
			cylinder {
			    <0, 0-eps, 0>
			    <0, 5+eps, 0>
			    9.92
			}
		    }
		    superellipsoid {
			<0.8, 0.8>
			scale <0.5, 1, 1>
			translate <0, 1, 10>
		    }
		    texture {
			pigment {
			    color <0.9, 1.0, 0.8>
			}
		    }
		}
	    }
	    plane {
		<-1, 0, 0>,
		0
		rotate <0, -Kw/2, 0>
	    }
	    plane {
		<+1, 0, 0>
		0
		rotate <0, +Kw/2, 0>
	    }
	}
	box {
	    <0, 0, 6>
	    <0.05, 5, 10>
	    rotate <0, -Kw/2, 0>
	}
	box {
	    <0, 0, 6>
	    <-0.05, 5, 10>
	    rotate <0, +Kw/2, 0>
	}

	object {
	    bett
	    rotate <0, 90, 0>
	    translate <-1, 0, 9.8>
	    rotate <0, Kw/2, 0>
	}
	object {
	    spind
	    rotate <0, 90, 0>
	    translate <-0.6, 0, 7.8>
	    rotate <0, Kw/2, 0>
	}

	object {
	    duschwanne
	    rotate <0, 90, 0>
	    translate <0, 0, 6.5>
	    rotate <0, -0.3*Kw, 0>
	}

	object {
	    waschbecken
	    rotate <0, 90, 0>
	    translate <0, 0, 6.0>
	    rotate <0, -0.0*Kw, 0>
	}

	object {
	    klo
	    rotate <0, 90, 0>
	    translate <0, 0, 6.30>
	    rotate <0, +0.3*Kw, 0>
	}

	union {
	    object {
		tisch 
	    }
	    object {
		stuhl
		translate <0.5, 0, 0>
		rotate <0, 0, 0>
	    }
	    object {
		stuhl
		translate <0.5, 0, 0>
		rotate <0, 120, 0>
	    }
	    object {
		stuhl
		translate <0.5, 0, 0>
		rotate <0, 240, 0>
	    }
	    translate <-1, 0, 8.5>
	}


	texture {
	    pigment {
		color <0.8, 1.0, 0.8>
	    }
	}
    }

