Render lines to lasers. Sibling to "trap". https://git.rubenvandeven.com/security_vision/trap
Find a file
2025-07-11 15:13:47 +02:00
assets/screenshots video demo 2025-07-11 11:57:20 +02:00
examples Give the tool a name 2025-07-10 13:14:16 +02:00
src zmq url as cli arg 2025-07-11 15:13:47 +02:00
.gitignore test some laser linedrawing 2025-04-08 11:39:23 +02:00
Cargo.lock Give the tool a name 2025-07-10 13:14:16 +02:00
Cargo.toml Give the tool a name 2025-07-10 13:14:16 +02:00
README.md video demo 2025-07-11 11:57:20 +02:00

A tool to send lines to a series of laser projectors (showlasers). Uses the nannou creative coding framework for laser control, and optimisation of the lines before sending them to the DAC.

It's still a bit of a hacked-together tool. But it works for my case.

Features

  • Receive lines over ZMQ.
    • Safety feature: stop the output if no lines are received
  • Clipping mask, to mark laser-free zones
  • Homography by simply dragging the corners of the projection area/corner-pin.
  • Change intensity of projected lines.
  • Geometric (pincushion/barrel) correction for x and y axes independently
    • Particularly x-distortion tends to be present in laser systems due to the independent x/y galvanometer setup.
  • Configuration can be saved to a JSON file.
  • Many of the settings can be configured per DAC.
  • Some pre-defined shapes for debugging purposes.

Basic idea

This tool was initially an adaption of the laser_frame_stream_gui.rs example code to enable projection mapping of a large space, which required multiple lasers. Received lines are assumed to be in world-space coordinates. The space is mapped to distinct laser DACs by means of homography/corner-pinning and various geometric correction parameters.

By using ZMQ as input, the mapping of the lines is decoupled from the generation code. In my own setup (trap) the lines are generated by means of a sequence of Python scripts.

Laser DAC controls Full canvas Laser preview

Usage

cargo run --bin render_lines_gui