Codementor Events

Python/matplotlib : Plotting an arc in 3D plot

Published Jul 10, 2019

I'm trying to draw an arc that is tangent to Z axis, as shown in the figure below, using matplotlib.

20190703_121733(1).jpg

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.

20190703_124805.jpg

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,

  1. How to get projection of this arc/circle on x, y and z axis?
  2. How can I know the position of end point in the space?
  3. How can I get the arc according to input parameters i.e. φ, θ and k?
  4. How can I write all this in Phython code?

I would be grateful if someone could help me to solve this problem.

Discover and read more posts from Higa
get started
post comments1Reply
Callin Switzer
5 years ago