Lines2dDoc.tioga
Bier, February 18, 1987 10:51:53 pm PST
Lines, Vectors, and Angles
CEDAR 7.0 —
Lines2d
Lines, Vectors, and Angles
Eric Bier
© Copyright 1987 Xerox Corporation. All rights reserved.
Abstract: Supplies interfaces Angles2d, Vectors2d, and Lines2d. Angles2d provides an interface for dealing with angles in a careful fashion. It distinguishes between position angles (slopes) and relative angles (the difference between slopes) and normalizes results to lie between -180 and 180 degrees. Vectors2d provides the standard dot product, cross product and includes some more isoteric operations like making a unit vector with a given slope. Lines2d provides a rather storage-hungry representation of lines, which however leads to fast implementations of line-line, and line-segment intersections, computing distances from points to lines and segments, and dropping perpendiculars. All three modules use Imager.VEC as the base type for points and vectors and REAL as the base type for angles.
Created by: Eric Bier
Maintained by: Eric Bier and Ken Pier <GargoyleImplementors^.pa>
Keywords: Angle, Vector, Line, Plane Geometry
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

1. Using the Lines2d Package
The interfaces Angles2d, Vectors2d, and Lines2d are fairly heavily commented. Message Bier.pa if anything is unclear.
Vectors2d overlaps some with the Vector2 package found in Imager.df. Perhaps a unification will happen at some point.