我知道如何得到一个圆筒,但我想描绘的东西像卫生纸卷在表面与圆筒螺旋。你知道吗
How to parameterize a curved cylinder?
但我需要的是像情节一样的卫生纸卷。你知道吗
我发现了这个背后的数学,有人能帮我用python吗?我需要用3D来绘制它,如下等式 实际上,公式
我想用L作为参数,我的方程变成
这里h是金属厚度,r是轧辊的内半径。该公式采用螺旋辊的圆近似。我也知道长度L=50有人能帮我用matplotlib代码吗
这正是我需要的 http://pgfplots.net/tikz/examples/cylinder-spiral/请看这个链接
以原点和半径为中心的圆的参数方程是,
x = r \times sin(\theta)
y = r \times cos(\theta)
其中\theta \in [0,2\pi]
。你知道吗对于螺旋,半径随\$\θ\$增加。假设\$r\$依赖于
\theta
,就像r = (a+b\theta)
一样,x = (a+b\theta) sin(\theta)
y = (a+b\theta) cos(\theta)
要使其成为具有垂直轴的三维图形,可以在
linspace(0, L)
中添加z
,其中L
是圆柱体的长度。你知道吗既然你有一个工作代码,你可以把它放在代码复查堆栈交换中,我可以用排版数学解释。你知道吗
下面是我不知怎么想出来的解决方案如果有人能帮我改进我的解决方案,我会很高兴的
相关问题 更多 >
编程相关推荐