|
![](/i/fill.gif) |
> "Warp"<war### [at] tag povray org> wrote in message
> news:4bbebfde@news.povray.org...
>> Dre<and### [at] gmail com> wrote:
>>> No it parses correctly, however none of the intersections are correct,
>>> they
>>> are all either at<0, 0, 0> or some weird location.
>>
>> Because you are not shooting the rays towards<0, -1, 0>.
>>
>> --
>> - Warp
>
> I believe I am shooting them in that direction, they are starting at<x, 10,
> z> and finishing at<x, -10, y>, thats towards<0, -1, 0> in my mind or am I
> wrong here?
>
> Cheers Dre
>
>
You are wrong :(
If you start at <x,10,z> and have a direction of <x,-10,z>, then, you
shoot toward <x*2,0, z*2>.
Remember, the first value is the starting location.
The second value is a *direction* vector, it is ADDED to the start
location. If you use a /location/ your tracing rays will fan out.
The result is that most rays, about 75% if the hight_field is around the
X-Z plane, will totaly miss the hight_field. Any ray that don't hit the
target will return a location of <0,0,0> and a normal of <0,0,0>.
If the hight_field is a around -10*y, then only 1/16 trace will hit it,
at the wrong locations.
Alain
Post a reply to this message
|
![](/i/fill.gif) |