|
![](/i/fill.gif) |
"Slime" <fak### [at] email address> wrote in message
news:42044254$1@news.povray.org...
>> One of the bizarre effects was that
>> no matter what I did, the hole cut by the heightfield would extend all
>> the
>> way through to the other side of the object. It didn't seem to matter
>> how
>> small I made the heightfield or how deep I made the box.
>
>
> By the way, are you aware that your height field surface is completely
> outside of the box's surface? This is why it cuts all the way through.
> Since
> you're rotating it by -90 degrees in the x direction, it extends from Z =
> 0
> backwards to Z = -0.5, whereas your box extends from Z = 0 to Z = 1. So
> everything in the box {0, <0.5, 0.5, infinity>} is cut away by the height
> field.
>
I think I understand what's going on now. Originally, I had used a
heightfield with "waterlevel". Even though the heightfield appeared just as
I expected, the difference operation was quite a bit different from what I
had expected. I tried to make an example based on that faulty bit of code.
Simply rotating and translating (in order so "slice" from the other
direction) seems to have fixed the problem.
I was not aware of the "infinity" aspect of heightfields. I believed that
they were contained within a box, which then led to my confusion. Thanks
for the "paradigm shift". ;-)
This code below produces what I expected to see (though it's not the
cleanest bit of code).
difference {
box { 0, 1}
height_field {
png "hole.png"
rotate x*-90
scale 0.5
translate z*1.2
}
rotate y*160
pigment {Red}
}
--
Jeremy
www.beantoad.com
Post a reply to this message
|
![](/i/fill.gif) |