Python/matplotlib : Plotting an arc in 3D plot
I'm trying to draw an arc that is tangent to Z axis, as shown in the figure below, using matplotlib.
In this arc one end point O is fixed to the origin of a right-handed Euclidean space, which is tangent to Z axis and other end point P at any location in the space.
C is the center of the arc in the x-y plane, θ is the angle between O and P on x-y plane, as shown in the next figure.
Position and size of the arc depend on the 3 parameters. The arc parameters that describes a circular arc, namely curvature (k), plane (φ), and arc length (l), are shown in figure. r is the radius of the arc and it is inversely proportional to k. When φ is zero, the arc lies in the x-z plane.
My questions are,
- How to get projection of this arc/circle on x, y and z axis?
- How can I know the position of end point in the space?
- How can I get the arc according to input parameters i.e. φ, θ and k?
- How can I write all this in Phython code?
I would be grateful if someone could help me to solve this problem.
I gave it a try. Here is what I did: https://github.com/callinSwitzer/GarbageCollector/blob/master/ArcPlotter.ipynb