/*

    Kabinenentwurf 1:

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

    Innendurchmesser 6.0 m, Außendurchmesser 10.0, 
    4 Blöcke á 2 Kabinen


 */

#declare eps=1E-3;

#declare H = 2.9;

#include "einrichtung.pov"

#declare kabine1 = 
    union {
	intersection {
	    union {
		difference {
		    cylinder {
			<0, 0, 0>
			<0, H, 0>
			6.1
		    }
		    cylinder {
			<0, 0-eps, 0>
			<0, H+eps, 0>
			6.0
		    }
		}
		difference {
		    cylinder {
			<0, 0, 0>
			<0, H, 0>
			10.0
		    }
		    cylinder {
			<0, 0-eps, 0>
			<0, H+eps, 0>
			9.9
		    }
		    superellipsoid {
			<0.2, 0.2>
			scale <0.5, 1, 1>
			translate <0, 1, 10>
			rotate <0, +22.5, 0>
		    }
		}
		// Schott
		intersection {
		    difference {
			cylinder {
			    <0, 0, 0>
			    <0, H, 0>
			    9.98
			}
			cylinder {
			    <0, 0-eps, 0>
			    <0, H+eps, 0>
			    9.92
			}
		    }
		    superellipsoid {
			<0.2, 0.2>
			scale <0.5, 1, 1>
			translate <0, 1, 10>
		    }
		    texture {
			pigment {
			    color <0.9, 1.0, 0.8>
			}
		    }
		    rotate <0, +22.5, 0>
		}
	    }
	    plane {
		<-1, 0, 0>,
		-1
	    }
	    plane {
		<+1, 0, 0>
		0
		rotate <0, +45, 0>
	    }
	    plane {
		<0, 0, -1>
		0
	    }
	}
	box {
	    <6.0, 0, -0.05>
	    <10.0, H, 0.05>
	    rotate <0, -45, 0>
	}
	box {
	    <1.0, 0, sqrt(35)>
	    <1.1, H, sqrt(99)>
	}
	object {
	    bett
	    translate <7.8, 0, 0.1>
	    rotate <0, -45, 0>
	}
	object {
	    kasten
	    translate <6.2, 0, 0.05>
	    rotate <0, -45, 0>
	}

	object {
	    duschwanne
	    translate <1.4, 0, 9.5>
	}

	object {
	    waschbecken
	    rotate <0, -180, 0>
	    translate <1.0, 0, 8.5>
	}

	object {
	    klo
	    rotate <0, -180, 0>
	    translate <1.3, 0, 8.0>
	}

	box {
	    <1, 0, 7.5>
	    <2, H, 7.51>
	    texture {
		pigment { color White }
	    }
	}

	box {
	    <2, 0, 7.5>
	    <2.01, H, sqrt(10*10-2*2)>
	    texture {
		pigment { color White }
	    }
	}

	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 <4, 0, 7>
	}


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