Repeated Scan with Bidirectional Segments

A repeated scan that takes advantage of bidirectional segments for better scan efficiency is obtained using RepeatedPattern. It can be used directly for a custom scan or access conveniently through RepeatedRasterScan or RepeatedRadialScan. The sample below uses RepeatedRasterScan to illustrate a bidirectional repeated scan.

  1. Imports and instantiate RepeatedRasterScanConfig.

from vortex.scan import RepeatedRasterScanConfig, RepeatedRasterScan
cfg = RepeatedRasterScanConfig()
  1. Configure bidirectional segments.

# use bidirectional segment directions
# NOTE: if repeat_period below is odd, a single segment may alternate directions
cfg.bidirectional_segments = True
  1. Configure repetition options. The fields come through RepeatedPattern.

# repeat every segment twice
cfg.repeat_count = 2
# complete 4 segments in order before repeating them
cfg.repeat_period = 4
  1. Initialize the RepeatedRasterScan as usual.

scan = RepeatedRasterScan()

(Source code)


(svg, pdf)


(svg, pdf)