POV-Ray : Newsgroups : povray.newusers : trace direction Server Time
25 Nov 2024 15:23:27 EST (-0500)
  trace direction (Message 1 to 3 of 3)  
From: Jim Charter
Subject: trace direction
Date: 21 Jun 2005 11:30:08
Message: <42b83280$1@news.povray.org>
I have any point, A
I have a second point B

I want to use the trace() function such that I want to intersect a 
surface between A and B, travelling From A to B.

So, is this correct?

#local Surface = some object;
#local Start = A;
#local Dir = B-A;
#local Norm = <0,0,0>;

#local Pos = trace(Surface,Start,Dir,Norm);


Post a reply to this message

From: Mike Williams
Subject: Re: trace direction
Date: 21 Jun 2005 12:13:35
Message: <zEJvODAgyDuCFw0Q@econym.demon.co.uk>
Wasn't it Jim Charter who wrote:
>I have any point, A
>I have a second point B
>
>I want to use the trace() function such that I want to intersect a 
>surface between A and B, travelling From A to B.
>
>So, is this correct?
>
>#local Surface = some object;
>#local Start = A;
>#local Dir = B-A;
>#local Norm = <0,0,0>;
>
>#local Pos = trace(Surface,Start,Dir,Norm);

Yes.

Don't foreget to check to see if Norm isn't <0,0,0> if there's any
possibility of missing the Surface.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Jim Charter
Subject: Re: trace direction
Date: 21 Jun 2005 13:46:04
Message: <42b8525c$1@news.povray.org>
Mike Williams wrote:
> Wasn't it Jim Charter who wrote:
> 
>>I have any point, A
>>I have a second point B
>>
>>I want to use the trace() function such that I want to intersect a 
>>surface between A and B, travelling From A to B.
>>
>>So, is this correct?
>>
>>#local Surface = some object;
>>#local Start = A;
>>#local Dir = B-A;
>>#local Norm = <0,0,0>;
>>
>>#local Pos = trace(Surface,Start,Dir,Norm);
> 
> 
> Yes.
> 
> Don't foreget to check to see if Norm isn't <0,0,0> if there's any
> possibility of missing the Surface.
> 
Thanks Mike.

Kind of a silly question but I thought I was going crazy.  Turned out it 
was a stupid thing, I had a sneaky little translate buried in my 
definition of the target surface but not in my generation of Start and 
Dir points until *after* I'd called trace().

Meanwhile I am having other weird results with trace() in another 
situation too so my self-confidence was diminishing with every trial.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.