|
|
You need to have a real understanding of 3 dimensional space and coordinates
and know exactly where everything is in your scene.
It is often a lot easier to create an object at the origin and then traslate
and rotate it to it's final position. For example, if you wanted to place a
chair in the corner of your room, it would be very difficult to figure out
it's geometry in relation to it's absolute position, if you wanted the chair
rotated 20 degrees, it would be near impossible. You would, instead create
your chair at the origin. Now you know it's actual size and position at the
origin, you can do your 20 degree rotation and then translate it to it's
final position in the scene. Now you decide you don't want it in that
corner, you want it it a different one, it's just a matter of changing the
translation of the chair. If you had created in it's final position, you'd
have to change the entire geometry of the chair to suit.
let's look at your back wall with window:
you can create it like this
// Back Wall
difference{
box{<-10,0,-12>,<10,10,-13>}
box{<-4,2,-11><9,6,-14>}
texture{Wall_Texture}}
}
but you can also achieve the same results doing this:
difference{
box{<0,0,0> <20,10,-1>}
// wall is 20 units wide, 10 high and 1 thick
box{<0,0,1> <4,4,-2> translate<8,2,0>}
// window is 4 units by 4 units (notice it exeeds the thickness of the wall
in the z-axis)
// it is then translated right 8 units and up 2 units
translate<-10,0,-12>
// the whole wall with the cutout is now moved to it's final position in the
scene
}
// you now know that you have a wall 20w x 10h x 1t with a 4x4 window with
its bottom 2 units
// up and it's left 8 units from the left hand end of the wall and that the
bottom left corner of the
// wall is 10 units to the right and 12 units back
you can now create a window pane and trim for the window, and you know the
exact size of the window opening and where it is located
-tgq
--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
Post a reply to this message
|
|