Algorithmic Solutions > LEDA > LEDA Guide > Geometry > Angles


Intersections

There are functions to compute intersections between lines, rays, and segments.

For example, if l is a LINE and s is a SEGMENT then the following function returns true if l and s have a single POINT in common and false otherwise. In the former case the unique POINT of intersection is assigned to p.

bool l.intersection(s,p);
We use the notation LINE (SEGMENT,POINT) to indicate that the algorithm works both for lines (segments, points) and rat_lines (rat_segments, rat_points). (More information on Writing Kernel Independent Code.)

See also:

Data Types for 2D Geometry

Writing Kernel Independent Code


Geometry

Advanced Data types for 2-D geometry

Data Types for 3-D Geometry

Geometry Algorithms

GeoWin




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH