# Child Space Coordinate System in VisionPro Shapes

Every VisionPro shape has a special coordinate space named $ which is used to draw the shape's Children. In most cases the children of a shape are the interactive handles used to manipulate the shape when it is in Interactive mode. VisionPro uses this coordinate system to make sure that the handles appear in the right place on the shape even if it has been rotated or skewed. You can use this coordinate system yourself to locate points relative to a shape.

In general, the child space coordinate system for each shape represents the shape in its simplest form. For lines and rectangular shapes, the child space is a unit square; for circular and elliptical shapes, the child space is a unit circle. To draw into a shape's child space, set the selected space name to $. You can use GetParentFromChildTransform to obtain a CogTransform2D that you can use to map from the child space to any other space.

Shape | Child space coordinate system
--- | ---
CogLineSegment | Unit square such that (0,0) maps to (StartX, StartY) and (1,0) maps to (EndX, EndY) X- and y-units scale uniformly. The child space has the same handedness as the shape, but may be rotated.
CogCoordinateAxes | The child space point (1,0) maps to the end point of the x-axis; the point (0,1) maps to the end-point of the y-axis. The child space point (0,0) maps to (OriginX,OriginY).
CogRectangle | Unit square such that (0,0) maps to (X,Y) and (1,1) maps to (X+Width, Y+Height)
CogRectangleAffine | Unit square such that (0,0) maps to (CornerOriginX,CornerOriginY) and (1,1) maps to (CornerOppositeX,CornerOppositeY)
CogLine | Same as parent coordinate space with (0,0) mapped to (X,Y)
CogGraphicLabel | Same as parent coordinate space with (0,0) mapped to (X,Y)
CogPointMarker | Same as parent coordinate space with (0,0) mapped to (X,Y)
CogPolygon | Same as parent coordinate space with (0,0) mapped to (X,Y) of GetVertex
CogCircle | Unit circle in which (0,0) maps to (CenterX, CenterY) and (1,1) maps to (CenterX+Radius,CenterY+Radius)
CogCircularArc | Unit circle in which (0,0) maps to (CenterX,CenterY) and (1,1) maps to (CenterX+Radius,CenterY+Radius)
CogCircularAnnulusSection | Unit circle in which (0,0) maps to (CenterX, CenterY) and (1,1) maps to (CenterX+Radius,CenterY+Radius)
CogEllipse | Unit circle in which (0,0) maps to (CenterX, CenterY) and (1,1) maps to (CenterX+RadiusX,CenterY+RadiusY)
CogEllipticalArc | Unit circle in which (0,0) maps to (CenterX,CenterY) and (1,1) maps to (CenterX+RadiusX,CenterY+RadiusY)
CogEllipticalAnnulusSection | Unit circle in which (0,0) maps to (CenterX,CenterY) and (1,1) maps to (CenterX+RadiusX,CenterY+RadiusY)