|
![](/i/fill.gif) |
Hi,
I'm trying to make a pediment (I think that's the architectural term for
the triangle on top of columns on classical buildings) out of a
height-field differenced with two sloping boxes.
Using difference I'm not successfully cutting out the triangle. (it
works if I replace the height-field with a box) Am I missing something
obvious in the manual... is there a good reason for this not to work?
I can get it to work if I take the intersection of the height_field with
a suitably differenced box but this seems silly.
Also is there a way to invert the height field (I ended up inverting the
image in an image editor).
Here's a minimal scene showing the problem (it's meant to render a
triangle). The commented out code shows that it works with intersection.
thanks
-----------------------------------
#default {
pigment {rgb 1}
}
camera {
location <0.0, 3.5, -9.0>
//direction 1.5*z
//right x*image_width/image_height
look_at <0.0, 1, 0.0>
}
light_source {
<-30, 30, -30>
color rgb 1
}
#local fh = 3;
#local fl = 5;
#local fw = 4;
#local fa = degrees(asin(fh/fl)) ;
difference {
height_field {
png "plasma3.png"
rotate x*-90
translate <-0.5,0,0>
scale <fw*2,fh,0.2>
}
union {
box{<0,-0.1,-2> <fl,4,2> rotate z*-fa translate <0,fh,0>}
box{<0,-0.1,-2> <fl,4,2> rotate z*-fa translate <0,fh,0> scale x*-1}
}
}
/*intersection {
height_field {
png "plasma3.png"
rotate x*-90
translate <-0.5,0,0>
scale <fw*2,fh,0.2>
}
difference {
box { <-fw,0,-1> <fw,fh,1> }
union {
box{<0,-0.1,-2> <fl,4,2> rotate z*-fa translate <0,fh,0>}
box{<0,-0.1,-2> <fl,4,2> rotate z*-fa translate <0,fh,0> scale x*-1}
}
}
} */
Post a reply to this message
|
![](/i/fill.gif) |