POV-Ray : Newsgroups : povray.binaries.images : Intersection Of Two Lines : Intersection Of Two Lines Server Time
31 Jul 2024 16:24:24 EDT (-0400)
  Intersection Of Two Lines  
From: Dave Blandston
Date: 28 Jul 2009 03:35:01
Message: <web.4a6ea91085700808ed14c4120@news.povray.org>
Hi there,

Here's a helpful macro to compute the intersection of two lines, given their
starting coordinates and angles. I'm not a mathematician and I'm sure there's a
better way to solve this problem, but it seems to work. Both points must be on
the x, y plane but you can easily adapt it for other situations. The macro
won't tell you if the lines never intersect, so you'll need to be careful.

Regards,
Dave Blandston


Post a reply to this message


Attachments:
Download 'intersection.png' (17 KB)

Preview of image 'intersection.png'
intersection.png


 

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