Skip to content
/ linetrace Public

Simple 2D and 3D accurate line tracing through cartesian grid

Notifications You must be signed in to change notification settings

modk/linetrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

linetrace

Simple and accurate 2D and 3D line tracing through a cartesian grid. [path, ds] = traceLine2D(p1, p2) returns the intersection points (path) of the line from p1 to p2 with the standard cartesian grid as well as the lengths of the line segments (ds) from one intersection point to another such that eucdist(path(i+1) - path(i)) = ds(i).

traceLine3D works similarly in 3D. Both functions are not particularly optimized for speed. The default MAX_PATH_LEN = 1500 can be adapted to larger grids and the EPS = 1e-6 should be tuned per application.

About

Simple 2D and 3D accurate line tracing through cartesian grid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages