a tool to visualize or simulate lidar.There are two ways to run this visualizer.One way is python and the other next is web browser.
python 3.5+
- pygame
pip install pygame
- Run
python3 main.py
in script directory
To build a wall you have to press left mouse button to set starting position for a wall, select ending point and press left mouse button again. To cancel drawing a wall press right mouse button. You can't draw walls while playing
Press Play button in upper-right corner and move your mouse around to change a location of the source of light.
You can stop the game and add more walls if you want.
To add angle to your ray you must press the green box beside the angle(in degrees) and box will turn white. After typing(angle between 0 to 360), Press Enter or Keypad Enter. If angle is written in string or in float the box will not accept the angle.
To add length of rays you should press the green box beside the range of rays(in metres) and box will turn white.After typing(length between 0 to 250m),Press Enter or Keypad Enter. If length is written in string or in float the box will not accept the length.
If you want to reset the map just press Reset Button
Original Code can be found on this https://github.com/kubapilch/Ray-Tracing
BROWSER
- run
index.html
on your browser.
To build a wall you have to touch and press left mouse button till you reach the end point and then leave it. You can't draw walls while playing.
To add angle tyoe in the input box given on the upper side of the screen.
To add range of rays type in the inout box given on the upper right of the screen.