Line2dDoc.tioga
Bier, February 18, 1987 5:00:26 pm PST
Lines, Vectors, and Angles
CEDAR 7.0 — FOR INTERNAL XEROX USE ONLY
Line2d
Lines, Vectors, and Angles
Eric Bier
© Copyright 1987 Xerox Corporation. All rights reserved.
Abstract: Supplies interfaces Angle2d, Vector2d, and Line2d. Angle2d 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. Vector2d provides the standard dot product, cross product and includes some more isoteric operations like making a unit vector with a given slope. Line2d 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

For Internal Xerox Use Only
1. Using the Line2d Package
The interfaces Angle2d, Vector2d, and Line2d are fairly heavily commented. Message Bier.pa if anything is unclear.
Vector2d overlaps some with the Vector2 package found in Imager.df. Perhaps a unification will happen at some point.