The LAMP Application

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

lamp_mac/D7_g/

intersection_points.pro


**************************************************************************** --------------------------------------------------------------------------- FUNCTION intersection_points, a1,b1,c1,d1,a2,b2,c2,d2 Finds intersection points between 2 quadrilaterals Input quadrilateral points must be ordered returns an array (axis, npoints) (if no intersection, then returns 0) where the intersecting polygon has npoints vertices. Note that the output polygon points are not ordered JRS 21/10/2009 **************************************************************************** ---------------------------------------------------------------------------

Routines

result = inside_quad(p, a, b, c, d)

result = between(a, b, p)

result = crossing_lines(a, b, c, d)

result = intersection_points(a1, b1, c1, d1, a2, b2, c2, d2)

Routine details

top inside_quad

result = inside_quad(p, a, b, c, d)

******* *********** ** Decides whether point p is inside quadrilateral with vertices (a,b,c,d) ** Uses barycentric coordinates technique ** (see www.blackpawn.com/texts/pointinpoly)

Parameters

p
a
b
c
d

top between

result = between(a, b, p)

******* ******* ** checks that point p is between a and b

Parameters

a
b
p

top crossing_lines

result = crossing_lines(a, b, c, d)

******* ************** ** finds crossing points of 2 lines a-b and c-d

Parameters

a
b
c
d

top intersection_points

result = intersection_points(a1, b1, c1, d1, a2, b2, c2, d2)

******* ******************* ** finds intersection points between 2 quadrilaterals

Parameters

a1
b1
c1
d1
a2
b2
c2
d2

File attributes

Modification date: Tue Oct 1 14:43:35 2013
Lines: 174