draw trajectory

A simple way to store a list of XY coordinates.

You can draw a trajectory on the panel and select a particular point by it’s index to retrieve his coordinates.

The drawing is stretched if you resize the panel. X and Y coordinates are expressed from 0 to 1, relative to the panel dimension.

nbpoints

Total number of point stored in the trajectory.

index

The selected point index

  • index >= -1 : no point selected
  • index < nbpoints : point with corresponding index selected
  • index >= nbpoints : no point selected

pos X

X coordinate of the last selected point

  • from 0 : left
  • to 1 : right

pos Y

Y coordinate of the last selected point

  • from 0 : bottom
  • to 1 : top

reset

Clear the stored trajectory.