我是靠谱客的博主 乐观毛巾,这篇文章主要介绍Python在已知参数方程情况下绘制三维曲线,现在分享给大家,希望可以做个参考。

已知螺旋线的参数方程
{ x = cos ⁡ t y = sin ⁡ t z = t left{begin{array}{l} x=cos t\ y=sin t \ z=t end{array}right. x=costy=sintz=t

import matplotlib.pyplot as plt
import numpy as np

ax = plt.axes(projection='3d')  # 设置三维图形模式
z = np.arange(-50, 50, 0.1)	 # z坐标范围-50~50
x = np.cos(z)
y = np.sin(z)
ax.plot3D(x, y, z, 'k')
plt.show()

在这里插入图片描述
已知螺旋线的参数方程
{ x = t cos ⁡ t y = t sin ⁡ t z = t left{begin{array}{l} x=tcos t\ y=tsin t \ z=t end{array}right. x=tcosty=tsintz=t

import matplotlib.pyplot as plt
import numpy as np

ax = plt.axes(projection='3d')  # 设置三维图形模式
z = np.arange(-50, 50, 0.1)
x = z * np.cos(z)
y = z * np.sin(z)
ax.plot3D(x, y, z, 'k')
plt.show()

在这里插入图片描述

最后

以上就是乐观毛巾最近收集整理的关于Python在已知参数方程情况下绘制三维曲线的全部内容,更多相关Python在已知参数方程情况下绘制三维曲线内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(126)

评论列表共有 0 条评论

立即
投稿
返回
顶部