line_segment¶
- line_segment(X0, X1)[source]¶
Calculate the voxel coordinates of a straight line between the two given end points
- Parameters:
X1 (X0 and) – The [x, y] or [x, y, z] coordinates of the start and end points of the line.
- Returns:
coords – A list of lists containing the X, Y, and Z coordinates of all voxels that should be drawn between the start and end points to create a solid line.
- Return type:
list of lists
Examples
Click here to view online example.