我是靠谱客的博主 不安爆米花,最近开发中收集的这篇文章主要介绍matlab三维图像自动旋转,求助,二维图像如何绕轴旋转成为三维图像,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

程序如下

gama = 2*pi/9;

h = 300;

Rr = 400;

Dr = 850;

R1 = h/(2*sin(gama/2));

theta1 = linspace(0,gama/8,10);

theta2 = linspace(gama/8,gama/4,10);

theta3 = linspace(gama/4,3*gama/8,10);

theta4 = linspace(3*gama/8,gama/2,10);

theta5 = linspace(gama/2,5*gama/8,10);

theta6 = linspace(5*gama/8,3*gama/4,10);

theta7 = linspace(3*gama/4,7*gama/8,10);

theta8 = linspace(7*gama/8,gama,10);

theta = [theta1 theta2 theta3 theta4 theta5 theta6 theta7 theta8];

Y1 = -80.9186*theta1.^3+279.4697*theta1.^2-153.9023*theta1+474.3163;

Y2 = -80.9186*(theta2-gama/8).^3+258.2853*(theta2-gama/8).^2-106.7218*(theta2-gama/8)+462.9603;

Y3 = -407.0496*(theta3-gama/4).^3+237.1009*(theta3-gama/4).^2-63.7437*(theta3-gama/4)+455.5382;

Y4 = 388.6254*(theta4-3*gama/8).^3+130.5355*(theta4-3*gama/8).^2-31.6614*(theta4-3*gama/8)+451.5106;

Y5 = -388.6254*(theta5-gama/2).^3+232.2774*(theta5-gama/2).^2+450.0000;

Y6 = 407.0496*(theta6-5*gama/8).^3+130.5355*(theta6-5*gama/8).^2+31.6614*(theta6-5*gama/8)+451.5106;

Y7 = 80.9186*(theta7-3*gama/4).^3+237.1009*(theta7-3*gama/4).^2+63.7437*(theta7-3*gama/4)+455.5382;

Y8 = 80.9186*(theta8-7*gama/8).^3+258.2853*(theta8-7*gama/8).^2+106.9743*(theta8-7*gama/8)+462.9603;

c1 = -R1.*(sin(gama-theta)+sin(theta));

c2 = R1.*(cos(gama-theta)-cos(theta));

c3 = -h^2*sin(theta)./(sin(gama-theta)+sin(theta))+h^2/2-...

R1^2*sin(gama).*(cos(gama-theta)-cos(theta))./(sin(gama-theta)+sin(theta));

c5 = h.*sin(theta)./(sin(gama-theta)+sin(theta));

YY4 = [Y4(1) Y4(2) Y4(3) Y4(4) Y4(5) Y4(6) Y4(7) Y4(8) Y4(9) ceil(Y4(10))];

Y11 = [Y1 Y2 Y3 YY4];

Y22 = [Y5 Y6 Y7 Y8];

Y =[Y11 Y22];

Z1 = -sqrt(Rr^2-(Y11-Dr).^2);

Z2 = sqrt(Rr^2-(Y22-Dr).^2);

Z = [Z1 Z2];

X = -c3./c1-h./c1.*Z-c2./c1.*Y;

R1 = h/(2*sin(gama/2));

Xc = 0;

Yc = R1*sin(gama)./(sin(gama-theta)+sin(theta));

Zc = h*sin(theta)./(sin(gama-theta)+sin(theta))-h/2;

r = sqrt((X-Xc).^2+(Y-Yc).^2+(Z-Zc).^2);

plot(theta,r)

谢谢各位大哥,想要实现的就是将r绕theta轴进行旋转,成为空间曲面

最后

以上就是不安爆米花为你收集整理的matlab三维图像自动旋转,求助,二维图像如何绕轴旋转成为三维图像的全部内容,希望文章能够帮你解决matlab三维图像自动旋转,求助,二维图像如何绕轴旋转成为三维图像所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部