Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you want it to work like OpenGL, you would convert your 3D position Vec6f to two 2D coordinates, then use something like Bresenham's line algorithm in 2D to draw a line between the points. I believe that there is a line function in OpenCV, which can be used as a shortcut.

If you want it to work like OpenGL, you would convert your 3D position Vec6f to two 2D coordinates, then use something like Bresenham's line algorithm in 2D to draw a line between the points. I believe that there is a line line() function in OpenCV, which can be used as a shortcut.

If you want to draw a line in 3D, you need to draw a cylinder, capped with spheres or circles.