参数化曲面的绘制

clc clear %椎体 % r=0:0.02:1; % theta=0:0.02:2*pi; % [r1,theta1]=meshgrid(r,theta); % x=r1.*cos(theta1); % y=r1.*sin(theta1); % z=r1; %球体 % fai=0:0.02:pi; % theta=0:0.02:pi*2; % a=1 % [fai1,theta1]=meshgrid(fai,theta); % x=a.*sin(fai1).*cos(theta1); % y=a.*sin(fai1).*sin(theta1); % z=a.*cos(fai1); %圆柱体 theta=0:0.02:pi; u=0:0.02:5; [theta1,u1]=meshgrid(theta,u); x=3.*sin(2.*theta1); y=6.*sin(theta1).^2; z=u1; surf(x,y,z); axis equal

%柱面 % x=0:0.02:1; % z=0:0.02:4; % [x1,z1]=meshgrid(x,z); % x=x1; % y=x1.^2; % z=z1; % % hold on % quiver3(1/2, 1/4, 1/2,1/10,1/10,0/10,'g') % quiver3(1/2, 1/4, 1/2,0/10,0/10,1/7,'r') % quiver3(1/2, 1/4, 1/2,1/10,-1/10,0,'y') %抛物面 r=0:0.02:2; theta=0:0.02:2*pi; [r1,theta1]=meshgrid(r,theta); x=r1.*cos(theta1); y=r1.*sin(theta1); z=r1.^2;
空间椭圆曲线参数方程
x+y+z=1 切 x^2+y^2=3形成的空间椭圆
x=3 cos(theta)
y=3 sin(theta)
z=1-x-y
椭圆切面参数方程

theta=0:0.03:2*pi; r=0:0.05:3; [r1,theta1]=meshgrid(r,theta); x=r1.*cos(theta1); y=r1.*sin(theta1); z=1-x-y; surf(x,y,z)

%轮胎 v=0:0.03:2*pi; u=0:0.03:2*pi; [v1,u1]=meshgrid(v,u); R=4; r=1; x=(R+r.*cos(u1)).*cos(v1); y=(R+r.*cos(u1)).*sin(v1); z=r.*sin(u1) ; surf(x,y,z) hold on quiver3(0, 0, 0,1,0,0,'g') quiver3(0, 0, 0,0,1,0,'g') quiver3(0, 0, 0,0,0,1,'g')
theta=0:0.03:2*pi;
u=0:0.03:2;
[theta1,u1]=meshgrid(theta,u);
a=4;
b=5;
c=7;
x=a.*sinh(u1).*sin(theta1);
y=b.*sinh(u1).*cos(theta1);
z=c.*cosh(u1);
mesh(x,y,z);
hold on
z=-c.*cosh(u1);
mesh(x,y,z);
grid on
axis equal
sinh->cosh 单双叶互换
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述