POV-Ray : Newsgroups : povray.binaries.images : Intersection Of Two Lines Server Time
14 Nov 2024 10:17:24 EST (-0500)
  Intersection Of Two Lines (Message 1 to 2 of 2)  
From: Dave Blandston
Subject: Intersection Of Two Lines
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


 

From: Dave Blandston
Subject: Re: Intersection Of Two Lines
Date: 28 Jul 2009 03:40:00
Message: <web.4a6eaad97fed82f4ed14c4120@news.povray.org>
I forgot to mention the source code is posted in the "POV-Ray Text Files" >
"scene-files" group.


Post a reply to this message

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