MATLAB中常见空间曲线和曲面
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
双曲抛物面的绘制
2 2
x y − 2 = 2z 2 a b
( a, b > 0)
例:取 a=4, b=3 >> ezsurf('x', 'y' , ... '(x*x/4^2-y*y/3^2)/2', ... [-4,4,-3,3]);
圆柱螺线的绘制
x = a ⋅ cos t y = a ⋅ sin t z = b⋅t
0 ≤ θ < 2π − π / 2 < ϕ < 3π / 2, ϕ ≠ π / 2
椭圆抛物面的绘制
x = r ⋅ a ⋅ cos θ y = r ⋅ b ⋅ sin θ z = r2 2
0 ≤ θ < 2π r>0
例:取 a=2, b=3 >> ezsurf('r*2*cos(u)', 'r*3*sin(u)' , ... 'r*r/2', [0,10,0,2*pi]);
例:取 a=2, b=2, c=3, 0 ≤ t ≤ 50 >> ezplot3('2*t*cos(t)','2*t*sin(t)', ... '3*t', [0,50]);
抛物螺线的绘制
轴截面的曲边为抛物线的螺线
x = a ⋅ t ⋅ cos t y = b ⋅ t ⋅ sin t z = c ⋅ t2
球面的绘制
法二、利用球面的参数方程符号作图:ezsurf
x = R ⋅ sin ϕ ⋅ cos θ y = R ⋅ sin ϕ ⋅ sin θ z = R ⋅ cos ϕ
0 ≤ θ < 2π 0 ≤ϕ ≤π
>> ezsurf('3*sin(u)*cos(v)', ... '3*sin(u)*sin(v)','3*cos(u)', ... [0,pi,0,2*pi]); 第一自变量的取值范围 第二自变量的取值范围
例:取 a=3, b=3, c=1 >> ezsurf('3*sin(u)*cos(v)', ... '3*sin(u)*sin(v)','1*cos(u)', ... [0,pi,0,2*pi]);
0 ≤ θ < 2π 0 ≤ϕ ≤π
单叶双曲面的绘制
x = a ⋅ sec ϕ ⋅ cos θ y = b ⋅ sec ϕ ⋅ sin θ z = c ⋅ tan ϕ
双叶双曲面的绘制
x = a ⋅ tan ϕ ⋅ cos θ y = b ⋅ tan ϕ ⋅ sin θ z = c ⋅ sec ϕ
例:取 a=3, b=4, c=5 >> ezsurf('3*tan(u)*cos(v)', ... '3*tan(u)*sin(v)','5*sec(u)', ... [-pi/2,3*pi/2,0,2*pi]); >> axis auto
− ∞ < t < +∞
例:取 a=3, b=5, 0 ≤ t ≤ 50 >> ezplot3('3*cos(t)','3*sin(t)','5*t',... [0,50]);
圆锥螺线的绘制
x = a ⋅ t ⋅ cos t y = b ⋅ t ⋅ sin t z = c⋅t
0 < t < +∞
0 < t < +∞
例:取 a=2, b=2, c=1/3, 0 ≤ t ≤ 50 >> ezplot3('2*t*cos(t)','2*t*sin(t)', ... 't.^2/3', [0,50]);
上机作业
自己动手
试用 surf 绘制椭球面、单叶和双叶双曲面。 试用 plot3 绘制三类螺线。
例:取 a=3, b=4, c=5 >> ezsurf('3*sec(u)*cos(v)', ... '3*sec(u)*sin(v)','5*tan(u)', ... [-pi/2,pi/2,0,2*pi]); >> axis auto
0 ≤ θ < 2π −π /2 <ϕ <π /2
自动截取坐标轴显示范围
椭圆抛物面
椭圆抛物面标准方程
x 2 y2 + 2 = 2z 2 a b
x = r ⋅ a ⋅ cos θ y = r ⋅ b ⋅ sin θ z = r2 2
( a, b > 0)
0 ≤ θ < 2π r>0
双曲抛物面
双曲抛物面标准方程
Baidu Nhomakorabea
x 2 y2 − 2 = 2z 2 a b
数学实验
常见空间曲线和曲面
标准方程及其 Matlab 绘图
常见空间曲线与曲面方程
球面标准方程(以原点为球心) 以原点为球心)
x 2 + y 2 + z 2 = R2
x = R ⋅ sin ϕ ⋅ cos θ y = R ⋅ sin ϕ ⋅ sin θ z = R ⋅ cos ϕ
双叶双曲面
双叶双曲面标准方程
x2 y2 z2 + 2 − 2 = −1 2 a b c
x = a ⋅ tan ϕ ⋅ cos θ y = b ⋅ tan ϕ ⋅ sin θ z = c ⋅ sec ϕ
( a, b, c > 0)
0 ≤ θ < 2π − π / 2 < ϕ < 3π / 2, ϕ ≠ π / 2
按字母顺序
球面的绘制
法三、利用 sphere 函数数值作图 >> >> >> >> [X,Y,Z]=sphere(60); R=3; X=R*X; Y=R*Y; Z=R*Z; surf(X,Y,Z);
椭球面的绘制
x = a ⋅ sin ϕ ⋅ cos θ y = b ⋅ sin ϕ ⋅ sin θ z = c ⋅ cos ϕ
( R > 0)
经度
0 ≤ θ < 2π 0 ≤ϕ ≤π
纬度
椭球面
椭球面标准方程
x y z + 2 + 2 =1 2 a b c
x = a ⋅ sin ϕ ⋅ cos θ y = b ⋅ sin ϕ ⋅ sin θ z = c ⋅ cos ϕ
2
2
2
( a, b, c > 0)
0 ≤ θ < 2π 0 ≤ϕ ≤π
单叶双曲面
单叶双曲面标准方程
x y z + 2 − 2 =1 2 a b c
x = a ⋅ sec ϕ ⋅ cos θ y = b ⋅ sec ϕ ⋅ sin θ z = c ⋅ tan ϕ
2
2
2
( a, b, c > 0)
0 ≤ θ < 2π −π / 2 < ϕ < π / 2
( a, b > 0)
圆柱螺线和圆锥螺线
圆柱螺线标准方程
x = a ⋅ cos t y = a ⋅ sin t z = b⋅t x = a ⋅ t ⋅ cos t y = b ⋅ t ⋅ sin t z = c⋅t
( −∞ < t < +∞)
圆锥螺线标准方程
(0 < t < +∞)
抛物螺线
轴截面的曲边为一条抛物线的螺线
x = a ⋅ t ⋅ cos t y = b ⋅ t ⋅ sin t z = c ⋅ t2
2 2
0 < t < +∞
易知该螺线位于下面的抛物面上
x y z + 2 = 2 a b c
球面的绘制
法一、利用球面的参数方程数值作图:surf
x = R ⋅ sin ϕ ⋅ cos θ y = R ⋅ sin ϕ ⋅ sin θ z = R ⋅ cos ϕ
>> >> >> >> >> >> >> >>
0 ≤ θ < 2π 0 ≤ϕ ≤π
u=[0:pi/60:2*pi]; v=[0:pi/60:pi]; [U,V]=meshgrid(u,v); R=3; X=R*sin(V).*cos(U); Y=R*sin(V).*sin(U); Z=R*cos(V); surf(X,Y,Z); axis equal;