// Roboter
// Bounding-Box: <-0.50, 0, -0.20>, <0.50, 2.50, 0.20>
// Blickrichtung -z
#include "kopf.pov"
#include "torso.pov"
#include "hand.pov"

#declare arm_r = 
    union {
	sphere {
	    <0, 0, 0>
	    8
	}
	cone {
	    <0, 0, 0>, 5
	    <0, -35, 0>, 4
	}
	union {
	    sphere {
		<0, 0, 0>
		6
	    }
	    cone {
		<0, 0, 0>, 4
		<0, -35, 0>, 3
	    }
	    sphere {
		<0, -35, 0>
		3
	    }
	    object {
		hand
		rotate <0, 90, 0>
		rotate <0, 0, 180>
		scale 100
		translate <0, -35, 0>
	    }
	    translate <0, -35, 0>
	}
	texture {T_metall_schwarz}
	scale 0.01
    }

#declare arm_l = 
    object {
	arm_r
	scale <-1, 1, 1>
    }

#declare fuss =
    union {
	intersection {
	    box {
		<-10, 0, -30>
		<10, 10, 0>
	    }
	    sphere {
		<0, 0, 0> 1
		scale <10, 10, 30>
	    }
	}
	intersection {
	    box {
		<-10, 0, 0>
		<10, 10, 10>
	    }
	    sphere {
		<0, 0, 0> 1
		scale <10, 10, 10>
	    }
	}
	sphere {
	    <0, 10, 0> 5
	}
	translate <0, -10, 0>
    }


#declare bein =
    union {
	sphere {
	    <0, 0, 0>
	    8
	}
	cone {
	    <0, 0, 0>, 5
	    <0, -45, 0>, 4
	}
	union {
	    sphere {
		<0, 0, 0>
		6
	    }
	    cone {
		<0, 0, 0>, 4
		<0, -45, 0>, 3
	    }
	    sphere {
		<0, -35, 0>
		3
	    }
	    object {
		fuss
		translate <0, -45, 0>
	    }
	    translate <0, -45, 0>
	}
	texture {T_metall_schwarz}
	scale 0.01
    }


#declare roboter =
    union {
	object {
	    kopf
	    translate <0, 2.30, 0>
	}
	#declare i = 1.90;
	#while (i <= 2.30) 
	    torus {
		0.07, 0.03
		translate <0, i, 0>
		texture {T_metall_schwarz}
	    }
	    #declare i = i + 0.05;
	#end
	object {
	    torso
	    translate <0, 1.90, 0>
	}
	object {
	    arm_r
	    rotate <0, 0, -5>
	    translate <-0.35, 1.80, 0>
	}
	object {
	    arm_l
	    rotate <0, 0, +5>
	    translate <+0.35, 1.80, 0>
	}
	object {
	    bein
	    translate <+0.30, 1.00, 0>
	}
	object {
	    bein
	    translate <-0.30, 1.00, 0>
	}
    }
