Geometric Library

    This library is devoted to geometric (and trigonometric) objects such as the square, circle, triangle and so forth.  The C++ classes model the well-known objects and provide some useful methods for each.  This library also supports the mapping of one coordinate system to another (via the rectangle warper).
    Note that the software is distributed under the GNU Public License.  No warranty is made for it whatsoever.  We have done our best to ensure that this software is high quality and error-free, but cannot guarantee anything real about it due to potential legal culpability. 
    If you find bugs in this software or wish to contribute enhancements to it, please send them to the HOOPLE Administrator.


angle template [h, cpp]

Models the classic notion of an angle, often measured as the rotation between two lines or two line segments.  This is templated on the numeric type for the angle, although double floating points are commonly used.  Supports measurements in degrees or radians.

cartesian objects [h, cpp]

Provides point, line and rectangle instances using double floating point.  This serves well for high precision arithmetic with those objects.

circle template [h, cpp]

The C++ representation of "the perfect shape".  A circle is the set of all points equidistant from the center point.  This class provides several common functions on circles, such as circumference and area.

ellipse [h, cpp]

Supplies algorithms for the ellipse.  An ellipse is the set of all points where the sum of the distance to two focal points is a constant.  Currently dealt with in terms of the width and height of the ellipse given a central point; more operations are needed.

line [h, cpp]

This is a bit of a misnomer since this class implements a line segment.  That is the set of all points on the line which connects two points, including the endpoints.  The line segments that compose other shapes (such as the rectangle) can often be computed by those objects.

math_bits [h, cpp]

A few helper functions that attempt to templatize operations on numbers to give them a small amount of self-awareness.  For example, one method reports true if the numerical type for the instance is a floating point type.  These are somewhat questionable and unproven methods however.

point [h, cpp]

Models the notion of a dimensionless location in two-space.  A point has no height or width but can be compared to other points.  A point has a specific location in the cartesian coordinate system which is indicated by its x and y position.

rectangle [h, cpp]

A collection of two pairs of connected parallel line segments that share 4 endpoints.  Each line segment is perpendicular to its neighbors.  Methods for computing intersections of rectangles are provided.

screen_rectangle [h, cpp]

A rectangle that's appropriate for a somewhat standard graphical display.  The origin is in the top-left corner.  The x coordinate increases to the right, while the y coordinate increases downards on the display.

triangle [h, cpp]

Describes a figure of three connected line segments that share three endpoints.  Still in development.

rectangle_warper [h, cpp]

Provides methods for translating the locations of points between coordinate systems.  Imagine a coordinate system with an arbitrary origin and x/y scales.  Now imagine another coordinate system overlaid on top of the first but with different origin and scale.  Each point that exists in the first coordinate system also exists in the second one but at a different position.  The rectangle_warper can calculate those positions.