I am looking for a C or C++ library/engine that will draw a path line plot (2D and/or 3D), given a set of segment inputs. Each segment is generally connected to the previous segment, and each segment includes distance, a degree bearing, and a declination. See the images below for sample output. 2D would require only distance and bearing, while 3D would require distance, bearing, and declination.
I’m not looking for a charting/reporting library.
Does anyone know of any libraries, preferably open source, that would suffice to draw a path line plot given inputs?

Ultimately I’d like to draw something like this (a map):

If you break down what the library would need to do,
you end up with some pretty basic functions,
which you probably won’t find encapsulated as a library
since they are pretty trivial.
Step 1: “Segments to 3d Points”
a) Create a unit vector along your reference axis.
b) Scale it by the segment distance.
c) Rotate it by the bearing.
d) Rotate it by the declination.
(Note: Assuming bearing and declination are orthogonal you shouldn’t run into any trouble.)
e) Add the start of the segment (aka the last vector).
Step 2: “3d Points to 2d Points”
a) Multiply your 3d vector through a perspective or orthognal projection matrix.
Step 3: “2d points to lines”
a) Use the bresenham line algorithm to gte the individual pixels.
Once you finished Step 2 and actually have lines in 2-point representation
all drawing libraries should do.
No magic at all 😉
(Note: There are lots of flight tracking/mapping apps out there that do a mighty fine job.)