Next Previous Up Contents
Next: Strings
Up: General Functions
Previous: Maths

B.1.14 Shapes

Functions useful for working with shapes in the (X, Y) plane.

polyLine( x, xys, ... )
Function of x defined by straight line segments between a specified list of vertices. The vertices are specified as a sequence of Xi, Yi pairs, for which the Xi values must be monotonic. The line segment at each end of the specified point sequence is considered to be extended to infinity. If only two points are specified, this is the equation of a straight line between those points. As a special case, if only one point is specified, the line is considered to be a horizontal line (equal to the sole specified Yi coordinate for all x).

By reversing the Xi and Yi values, this function can equally be used to represent a function X(y) rather than Y(x).

If the number of coordinates is odd, or the Xi values are not monotonic, behaviour is undefined.

isInside( x, y, xys, ... )
Indicates whether a given test point is inside a polygon defined by specified list of vertices. The vertices are specified as a sequence of Xi, Yi pairs.

If the number of coordinates is odd, the behaviour is not defined.


Next Previous Up Contents
Next: Strings
Up: General Functions
Previous: Maths

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk