💸 Reduce costs by consolidating proprietary analytics & reporting software to open-source & Dash.
Challenge us to replace your analytics with Dash and reduce costs.

Function to attach individual plots in MATLAB/python?

I have created individual plots that increase in the Z-direction in my graph. The plots/circles have different a radius at different distances between each other. I need to link these plots to each other to create a cyclinder/pipe.

Is it possible to use a cubic spline function or any other alternatives to solve this? I am looking for an equation to describe the surface, created by individual circles/plots.

Here is a screenshot of my graph and its individual plots:

If r_i is the radius of the circle at the height z_i, then you can define a function r(z) that interpolates the points (z_i, r_i). The surface you need has the following parameterization:

x=r(u)cos(v)
y=r(u)sin(v)
 z=u

with u in [min(z_i), max(z_i)], and v in [0,2 pi]

1 Like