POV-Ray : Newsgroups : povray.text.scene-files : Intersection Of Two Lines : Re: Intersection Of Two Lines Server Time
1 May 2024 19:26:49 EDT (-0400)
  Re: Intersection Of Two Lines  
From: Warp
Date: 28 Jul 2009 04:20:15
Message: <4a6eb4be@news.povray.org>
Dave Blandston <nomail@nomail> wrote:
>    #local Theta = degrees (atan (Point2_Macro.y / Point2_Macro.x));
>    #local R1 = R2 * sin (radians (Angle2_Macro)) / sin (radians (Angle3_Macro));

  You have potential divisions by zero in these two lines, even for completely
valid parameters passed to the macro.

  The intersection point of two 2D lines is a basic geometrical problem which
can be solved without having to resort to trigonometry, and this solution
avoids divisions by zero. Try googling for "intersection of two lines".

-- 
                                                          - Warp


Post a reply to this message

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