当前位置:网站首页>Mathematical experiment -- function drawing experiment
Mathematical experiment -- function drawing experiment
2022-04-21 08:03:00 【Top Secret】

3、 Program design and operation results
(1)Octave The code is as follows :
clc;clear;
a=1;
b=1;
x=[-10:0.1:10];
y=(b^2*(x.^2/a^2-1)).^0.5;
plot(x,y,'k');
title('x^2/a^2-y^2/b^2=1,x=-+b/a*x Asymptote')
hold on
plot(x,-y,'k')
plot(-x,y,'k')
plot(-x,-y,'k')
% Asymptotes
x=-10:0.1:10;
plot(x,b/a.*x,'r')
plot(x,-b/a.*x,'r')
hold off
(2)Octave The code is as follows :
clear ; clc
t=0:0.1:pi;
r=0:0.1:2*pi;
[r,t]=meshgrid(r,t);
x1=1*sin(t).*cos(r);
y1=1*sin(t).*sin(r);
z1=1*cos(t);
mesh(x1,y1,z1);
hold on
xgrid = -1:0.1:1;
ygrid = -1:0.1:1;
[x,y] = meshgrid(xgrid,ygrid);
z_p = sqrt(x.^2+y.^2);
z_n = -sqrt(x.^2+y.^2);
mesh(x,y,z_p);
hold on;
mesh(x,y,z_n);
axis equal;
axis('square')
xlabel('X-axis');ylabel('Y-axis');zlabel('Z-axis');
shading flat;
title('The surface of intersecting sphere and cone');
(3)Octave The code is as follows :
clc;
clear;
t=0:0.1:pi;
r=0:0.1:2*pi;
[r,t]=meshgrid(r,t);
##The rectangular coordinate equation of the
## ball is transformed into polar coordinate equation
##x^2+y^2+z^2=9
x1=3*sin(t).*cos(r);
y1=3*sin(t).*sin(r);
z1=3*cos(t);
##Polar coordinate equation of cylinder
##x^2+z^2=4
u=0:0.1:2*pi;
v=-3:0.1:3;
[u,v]=meshgrid(u,v);
x2=2*cos(u);
y2=v;
z2=2*sin(u);
mesh(x1,y1,z1)
hold on
mesh(x2,y2,z2)
xlabel('X-axis');ylabel('Y-axis');zlabel('Z-axis');
shading flat;
title('The surface of intersecting sphere and cylinder');
hold off
4、 Discussion and analysis
When drawing plane graphics , You can change one variable into an expression of another variable , Then use simple plot You can draw an image . When drawing some common simple three-dimensional surfaces , Polar coordinates can be used to represent the variables of rectangular coordinate system , You can simplify the problem , Use basic drawing tools . When drawing some complex function graphics , You can choose to use some functions to draw surfaces .
版权声明
本文为[Top Secret]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210656003957.html
边栏推荐
- NAS选购参考对比
- 2022 R2 mobile pressure vessel filling test question simulation test question bank and simulation test
- PHP determines whether it is the same month
- Sword finger offer day22 bit operation (medium)
- 图片素材 免费素材 图片素材网站 图片素材在哪里找 哪里有的图片素材下载 图片素材的用途 图片素材 产品图片素材网站 什么的素材可以 PPT素材
- Mysql双主双从+Atlas数据测试
- 融资融券安全线是多少?
- shell脚本之正则表达式
- NAS purchase reference comparison
- 2022年R2移动式压力容器充装考试题模拟考试题库及模拟考试
猜你喜欢

CouchDB vertical ultra vires

实战JDBC连接Mysql数据库

Apache solr 远程代码执行漏洞(CVE-2019-0193)复现

类中的泛型以及泛型类型

VMware 16 newly installed win11 professional edition, unable to read the ISO image, unable to start the installer

PDF OCR

Ancient artifact VIM

matlab画散点图

VMware16 新安装Win11专业版 ,无法读取ISO镜像无法启动安装程序
![[Ethernet switching security] - port security and MAC address drift prevention and detection](/img/78/972b840f8c77712d971ba7ab04f7fb.png)
[Ethernet switching security] - port security and MAC address drift prevention and detection
随机推荐
MongoDB 实验——数据备份和恢复和数据库优化
Codeforces Round #783 (Div. 2) ABC
在Win10系统中用mimikatz抓取明文密码
数学实验——函数绘图实验
IIC bus design ① - IIC communication protocol
数据库实验一、数据库的创建及基本查询
go-数组 切片
【项目】小帽外卖(五)
YOLOv5模型环境搭建及使用google colab训练
模块化的概念
EF de duplication operation
Nail custom robot docking source code
Unity -- Enumeration class
Unity---枚举类
It can be downloaded to the data set running loam
Return value iresult of standard function
Valentina Studio Pro for MAC (MAC database management software)
Php article keyword replacement class
Laravel print SQL
显示器选购参考天梯