From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intersection of two arbitrary 2D lines

Hello,

 

I have a program (attached) which samples a height from two intensity graphs, creates a contour for each, and finds the intersection between these two contours. To do this I simply "brute force" by finding the distance from each point on one contour to each point on the other contour and save the values corresponding to the smallest distance. I'd like this process to be as fast as possible, and I'm sure there exists a much more elegant solution. Can anyone point me in the right direction? Unfortunately the contours are not necessarily the same size and do not share axis values, so I don't believe I can subtract one from the other and find the minimum.

 

Additionally I'd like to perform a check for the input intensity graphs (this will be variable in my application) which plots some ammount of contours along each graphs' range (see Contour Graph 2) and reports if any contour from Intensity Graph 1 intersects more than once with any contour from Intensity Graph 2

 

I'm working with LabVIEW 2015 SP1 32 bit. Any advice is appreciated! Thank you

0 Kudos
Message 1 of 2
(2,582 Views)

Hey pschmidt89,

 

Taking a look at your graphs, it looks like the contours do share some axis values. Would you expand more on this?

 

Also, have you looked into calculating the relative size of the contours to compensate for them not necessarily being the same size?

 

Regards,

 

Shane K

Applications Engineering

National Instruments

http://www.ni.com/support

0 Kudos
Message 2 of 2
(2,514 Views)