from matplotlib import pyplot as plt

from vortex import Range
from vortex.scan import RasterWaypoints

wpts = RasterWaypoints()
wpts.volume_extent = Range.symmetric(1)
wpts.bscan_extent = Range.symmetric(1)
wpts.samples_per_segment = 20
wpts.segments_per_volume = 10

xy = wpts.to_waypoints()

fig, ax = plt.subplots(constrained_layout=True)

for segment in xy:
    ax.plot(segment[:, 0], segment[:, 1], 'x')

ax.set_title('Raster Scan Waypoints')
ax.set_xlabel('x (au)')
ax.set_ylabel('y (au)')
ax.axis('equal')