Matla绘图——正四面体
来源:互联网 发布:qq三国100js打孟获配置 编辑:程序博客网 时间:2024/06/08 16:07
clcclearclose all% 绘制正四面体FirstPoint = [8 1];SecondPoint = [14 3.5];ThirdPoint = [2 5];FourthPoint = [9 13];xx1 = linspace(FirstPoint(1),SecondPoint(1),10000);yy1 = interp1([FirstPoint(1),SecondPoint(1)],[FirstPoint(2),SecondPoint(2)],xx1);xx2 = linspace(FirstPoint(1),ThirdPoint(1),10000);yy2 = interp1([FirstPoint(1),ThirdPoint(1)],[FirstPoint(2),ThirdPoint(2)],xx2);xx3 = linspace(FirstPoint(1),FourthPoint(1),10000);yy3 = interp1([FirstPoint(1),FourthPoint(1)],[FirstPoint(2),FourthPoint(2)],xx3);xx4 = linspace(SecondPoint(1),ThirdPoint(1),10000);yy4 = interp1([SecondPoint(1),ThirdPoint(1)],[SecondPoint(2),ThirdPoint(2)],xx4);xx5 = linspace(SecondPoint(1),FourthPoint(1),10000);yy5 = interp1([SecondPoint(1),FourthPoint(1)],[SecondPoint(2),FourthPoint(2)],xx5);xx6 = linspace(ThirdPoint(1),FourthPoint(1),10000);yy6 = linspace(ThirdPoint(2),FourthPoint(2),10000);xx = linspace(FourthPoint(1),SecondPoint(1),19);yy = interp1([SecondPoint(1),FourthPoint(1)],[SecondPoint(2),FourthPoint(2)],xx);FinalX(1,7:24) = xx(1,1:18);FinalY(1,7:24) = yy(1,1:18);FinalX(1) = FirstPoint(1);FinalY(1) = FirstPoint(2);FinalX(2) = xx1(523);FinalY(2) = yy1(523);FinalX(3) = SecondPoint(1);FinalY(3) = SecondPoint(2);FinalX(4) = xx2(523);FinalY(4) = yy2(523);FinalX(5) = ThirdPoint(1);FinalY(5) = ThirdPoint(2);FinalX(6) = xx3(523);FinalY(6) = yy3(523);FinalX(25) = FourthPoint(1);FinalY(25) = FourthPoint(2);Data = [0.1977 0.1130 0.0000 0.3672 0.2044 0.1130 0.0000 0.0000 0.0000 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0006 0.0006 0.0005 0.0004 0.0002 0.0001 0.0001 0.0000 0.0000 0.0000 0.1979 0.1131 0.0004 0.3675 0.0003 0.1131 0.0006 0.0012 0.0025 0.0047 0.0081 0.0125 0.0179 0.0233 0.0274 0.0288 0.0265 0.0212 0.0148 0.0091 0.0050 0.0025 0.0011 0.0004 0.0001 0.1735 0.1129 0.0005 0.2998 0.0002 0.1077 0.0007 0.0016 0.0034 0.0064 0.0111 0.0176 0.0254 0.0333 0.0392 0.0409 0.0378 0.0310 0.0227 0.0151 0.0092 0.0052 0.0027 0.0013 0.0003 ];TitleData = [2.5,0.1; 2.5,1; 2.5,1.4];Label = {'(a)' '(b)' '(c)'};W = get(0,'ScreenSize');figure;set(gcf,'Position',[0.1*W(3) 0.3*W(4) 0.8*W(3) 0.4*W(4)]);for jj = 1:1:3 SubName{1} = subplot(1,3,jj); set(SubName{1},'Position',[0.05+0.3*(jj-1) 0.05 0.27 0.85]); scatter(xx1,yy1,0.6,'k','.'); hold on; scatter(xx2,yy2,0.6,'k','.'); hold on; scatter(xx3,yy3,0.6,'k','.'); hold on; scatter(xx4,yy4,0.6,'k','.'); hold on; scatter(xx5,yy5,0.6,'k','.'); hold on; scatter(xx6,yy6,0.6,'k','.'); hold on c = Data(jj,:); scatter(FinalX,FinalY,[],c,'filled','MarkerEdgeColor',[0 .5 .5]); CBar = colorbar; load Mymap; colormap(Mymap); axis([0 18 0 16]); axis off; text(FirstPoint(1)-1,FirstPoint(2)-0.5,'L','FontSize',14); text(SecondPoint(1)+1,SecondPoint(2),'P','FontSize',14); text(ThirdPoint(1)-2,ThirdPoint(2),'D','FontSize',14); text(FourthPoint(1),FourthPoint(2)+1,'C','FontSize',14); text(ThirdPoint(1)-2,16,cell2mat(Label(jj)),'FontSize',15); title(['r = ' num2str(TitleData(count,1)) ',\sigma = ' num2str(TitleData(count,2))]);end
阅读全文
0 0
- Matla绘图——正四面体
- D3D显示正四面体
- 旋转正四面体
- OpenGL绘制正四面体
- 开始绘制立体图形立方体正四面体
- bzoj2518: [Shoi2010]滚动的正四面体 线段树
- 关于直线分平面以及正四面体无线扩展构成的空间等问题
- HDU 5733 tetrahedron(几何——四面体内心/体积/内切圆)
- PHP 绘图——使用jpgraph绘图
- 第五周—正差值
- matla数字图像处理基础
- Matla相关知识
- Matla第一课
- 绘图类—Graphics
- openCV—基本绘图
- 移动四面体
- 英语美句——正能量
- 螺旋矩阵——正逆序
- mysql性能优化
- Spring Boot进阶之Web进阶 学习笔记
- C/C++:判断文件存在
- Python3 Socket编程
- JavaSwing_5.7: 闪屏(Splash Screen)
- Matla绘图——正四面体
- C++间接寻址实现
- Python 利用StringVar接收用户输入, 制作用户名和密码的验证登录窗口
- RATEI.CO——将会改变ICO市场
- rabbitMQ配置spring boot
- 济南培训第二天
- UVA-11029-Leading and Trailing-(快速幂,log10函数求大数首末数)
- 数组的常用算法(求最大值,最小值,总和,平均数,复制数组,反转数组)
- Git基本使用流程