Nevron Open Vision Documentation
Primitive Geometries

This topic provides general information about the most commonly used geometry primitives:


 

 

Rectangles

The NRectangle structure defines a rectangle in 2D space by the location of its it's Left-Top corner (X and Y) and its dimensions (Width and Height).

The NRange2D structure defines a rectangle in 2D space by respective coordinates of its four sides - XMin (left side X), XMax (right side X), YMin (top side Y) and YMax (bottom sdze Y).

Both rectangle

Lines

The NLine structure represents an infinite line in 2D space defined by it's general equation: Ax + By + C = 0. The parameters of the line are accessible by the NLine - A, B and C fields. The general line form is convenient when you want to measure the normal distance of a point to the line.

The NRay structure represents an infinite line in 2D space defined by an origin point and X and Y gradients (i.e. a parametric line form). The parameters of the ray are accessible from the NRay - OriginX, OriginY, GradientX and GradientY fields. The parametric line form is convenient when you want to get a point on the line, given a time parameter (0 for start point, 1 for end point).

Strictly speaking, in geometry a ray is infinite only in the one direction, so the NRay structure does not actually represent a geometry ray, although it is defined in the same manner.

 The NLineSegment represents a finite segment of a line defined by start and end points. The parameters of the line segment are accessible from the NLineSegment - StartX, StartY, EndX and EndY fields.

Circles

The NCircle structure represents a circle defined by its center and radius. The parameters of the circle are accessible by the NCircle - CenterX, CenterY and Radius fields.

The NCircleSegment structure represents a segment of a circle defined by a circle and start and sweep angles. The parameters of the circle segment are accessible by the NCircleSegment - CircleStartAngle and SweepAngle fields.

Ellipses

The NEllipse structure represents an ellipse defined by its center, major and minor axis lengths and optional angle that the major axis forms with the X-axis. The parameters of the ellipse are accessible by the NEllipse - CenterX, CenterY, A, B and Angle fields.

The NEllipseSegment structure represents a segment of an ellipse defined by an ellipse and start and sweep angles. The parameters of the ellipse segment are accessible by the NEllipseSegment - EllipseStartAngle and SweepAngle fields.

Beziers

The NCubicBezier structure represents a cubic bezier curve, defined by start and end points and two control points.

The NQuadraticBezier structure represents a quadratic bezier curve, defined by start and end points and one control point.

Simple Polygons

The NTriangle structure represents a polygon with 3 points, while the NQuadrangle structure represents a polygon with 4 points.

Send Feedback