Vertex

(Engine-Level Function)

Description: Returns a Vertex value, which is a collection of 3 points and a mode.
Returns: Vertex
Usage: Steady State only.
Function Groups: Graphics
Related to: Path | Point
Format:  Vertex(Mode, CenterPoint[, InHandlePoint, OutHandlePoint])
Parameters:  
Mode
Required. Any numeric constant that specifies the behavior of the handle points, as shown in the following table

Mode

Handle Point Behavior 

0

Rectangular - handles are ignored

1

Cusp - no restrictions on handle points

2

Reserved for future use

3

Reserved for future use

4

ManhattanClosed Meaning that all lines are horizontal or vertical. Inspired by a skyline of tall, rectangular buildings. - handles are ignored. Right angles between this vertex and neighboring vertices are preserved, enforcing horizontal or vertical lines.

CenterPoint
Required. Any expression that returns a point object. This is the center point and location of this Vertex.
InHandlePoint
Optional. Any expression that returns a point.
OutHandlePoint
Optional. Any expression that returns a point.
Comments:

A vertex describes a group of up to three point values. The first sets the location. The following two are used when drawing curves and should be set invalid otherwise.

Vertex values are grouped to form paths.

For each vertex, the center point defines a point on the path. Each line segment or Bezier curve along the path is defined by two vertices, one at each end. The vertices' center point is the end point of the Bezier curve. The OutHandlePoint of one vertex and the InHandlePoint of the other vertex define the Bezier curve shape points. So, each Bezier curve is defined by 4 points: the two end points, and two 'handle' points.
Vertex values are also used in the graphics functions GUIArc, GUIChord, and GUIPie to determine the start and end angles for those graphics functions. The angle from the center point to the InHandlePoint defines the starting angle. The angle from the center point to the OutHandlePoint defines the ending angle

Example:

GUIArc(10, 100, 100, 10 { Bounding box for the arc },
       1, 1, 1, 1, 1 { No scaling }, 
       0, 0 { No trajectory or rotation }, 
       1, 0 { Arc is visible; reserved }, 
       0, 0, 0 { Cannot be focused/selected }, 
       Pen(12, 1, 1) { Solid lt red line, 1 pixel wide }, 
       Vertex(0 { Rectangular mode }, 
       Point(50, 50, Invalid, Invalid) { Arc center }, 
       Point(50, 0, Invalid, Invalid) { Start angle },
       Point(0, 50, Invalid, Invalid) { End angle }));

The Vertex function in this case defines the center, starting angle and ending angle for the arc. The center point is (50, 50); the starting angle is defined by the center point and a point that lies directly above it, and the ending angle is defined by the center point and a point that lies directly to the left of it. The result is a small arc that starts at the 12 o'clock position and runs counter-clockwise to the 9 o'clock position.