1 // A simple "doghouse" picture, used for the synthetic target
2 // watchdog device host-side.
4 // This file is normally built using the following command line:
6 // x-povray +Idoghouse.pov +W128 +H128 +D +Q9 +AM2 +A0.9 +FP
11 #include "textures.inc"
16 location <4.5, 2.2, -5>
25 sky_sphere { S_Cloud2 scale 2 }
26 background { colour LightBlue }
31 pigment { color red 0.5 green 0.98 blue 0 turbulence 0.5}
32 normal { bumps 0.4 scale 0.1 }
41 colour rgbf<0, 0.2, 0.2, 0.3>
45 // A plank is a 1x1x0.1 block with a corner at the origin. The edges are
46 // slightly rounded, to make sure that the plank boundaries are just
49 superellipsoid { <0.03,0.03> scale <0.5,0.5,0.05> translate <0.5,0.5,0.05> texture { T_Wood10 } }
51 // A variant, for the roof
53 superellipsoid { <0.05,0.05> scale <0.5,0.5,0.05> translate <0.5,0.5,0.05> texture { T_Wood14 } }
55 // The front and back, a rectangle with a triangle on top.
56 // Going clockwise from the bottom left, the coordinates are:
57 // <0,0> <0,3.2>, <2.4.5>, <4,3.2>, <4.0>
58 // Each is made from five horizontal planks.
60 // Note: this doghouse is not intended to be an example of good
61 // woodworking. For example, butt joints for the walls are a bad idea.
62 // Most importantly the roof should involve lapped joints with a
63 // sensible ridge, the current construction is not going to keep the
65 #declare RoofAngle = degrees(atan2(1.3,2));
66 #declare RoofAngleR = atan2(1.3,2);
71 object { Plank scale <4,1,1> translate <0,0,0> }
72 object { Plank scale <4,1,1> translate <0,1,0> }
73 object { Plank scale <4,1,1> translate <0,2,0> }
74 object { Plank scale <4,1,1> translate <0,3,0> }
75 object { Plank scale <4,1,1> translate <0,4,0> }
78 box { <0,0,0> <4,4,1> rotate <0,0,RoofAngle> translate <0,3.2,-0.5> }
79 box { <0,0,0> <4,4,1> rotate <0,0, -1 * RoofAngle> translate <2,4.5,-0.5> }
84 // The front also has some text to name the dog, and a
85 // cutout for the opening.
91 ttf "cyrvetic.ttf" "FIFI" 0.1 0
92 translate <1.2, 2.8, -0.05>
94 box { <1,0,-0.5> <3,2.2,0.5> }
96 cylinder { <0,0,0> <0,0,1> 1 }
98 translate <2,2.2,-0.5>
105 // The back, nothing fancy needed here. The doghouse is twice
106 // as deep as it is wide.
107 object { FrontBack translate <0,0,8> }
109 // A floor, to prevent any bright grass showing inside
110 box { <0.05,0,0.05> <3.95,0.05,7.95> texture { T_Wood3 } }
113 object { Plank scale <8,1,1> rotate <0,-90,0> translate <0,0,0.1> }
114 object { Plank scale <8,1,1> rotate <0,-90,0> translate <0,1,0.1> }
115 object { Plank scale <8,1,1> rotate <0,-90,0> translate <0,2,0.1> }
118 object { Plank scale <8,1,1> rotate <0,-90,0> translate <4,0,0.1> }
119 object { Plank scale <8,1,1> rotate <0,-90,0> translate <4,1,0.1> }
120 object { Plank scale <8,1,1> rotate <0,-90,0> translate <4,2,0.1> }
122 // Now for the roof. The top of the roof is at <2,4.5,0>, and the
123 // corners are at <0,3.2,0> and <4,3.2,0>. The planks are 0.1 units
127 superellipsoid { <0.05,0.05> scale <0.5,0.5,0.05> translate <0.5,0.5,0.05> texture { T_Wood14 } }
129 #declare RoofPlank_L = object {
131 rotate <0, -90, RoofAngle - 90>
135 #declare RoofPlank_R = object {
137 rotate <0, -90, -90 - RoofAngle>
141 object { RoofPlank_L translate<2 - (1 * cos(RoofAngleR)), 4.5 - (1 * sin(RoofAngleR)), -0.25> }
142 object { RoofPlank_L translate<2 - (2 * cos(RoofAngleR)), 4.5 - (2 * sin(RoofAngleR)), -0.25> }
143 object { RoofPlank_L translate<2 - (3 * cos(RoofAngleR)), 4.5 - (3 * sin(RoofAngleR)), -0.25> }
145 object { RoofPlank_R translate<2 + (-0.1 * cos(RoofAngleR)), 4.5 - (-0.1 * sin(RoofAngleR)), -0.25> }
146 object { RoofPlank_R translate<2 + (0.9 * cos(RoofAngleR)), 4.5 - (0.9 * sin(RoofAngleR)), -0.25> }
147 object { RoofPlank_R translate<2 + (1.9 * cos(RoofAngleR)), 4.5 - (1.9 * sin(RoofAngleR)), -0.25> }
149 // And just for fun, a dog bowl.
154 box { <-1,-1,-1> <1,0,1> pigment { Black } }
156 cylinder { <0,0,0> <0,0.2,0> 0.9 }
159 translate <-0.5,0,-0.7>