3D图8圆环在Matlab [英] 3D Figure 8 Torus in Matlab
本文介绍了3D图8圆环在Matlab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是在code我所生成的三维环面。
This is the code to a 3d torus I have generated.
ezmesh('(3.7+0.5*cos(v))*cos(u)','(3.7+ 0.5*cos(v))*sin(u)','0.5*sin(v)',[0,2*pi,0,2*pi])
axis([-7 7 -7 7 -2 2]);
谁能告诉我如何把这个圆环code成8字形圆环?这些是我想要使用的公式和参数。我不知道如何调整,在原来的圆环参数,以便将code将工作了。
Can anyone show me how to transform this torus code into a figure 8 torus? These are the equations and parameters I want to use. I'm not sure how to adjust the parameters in the original torus so the code will work out.
%Figure Eight Torus
%Parameters: c = 1, -pi <= u, v <= pi
%Equations: x = (cos(u)*( c + sin(v)*cos(u)) - (sin(2*v)*sin(u)/2))
% y = (sin(u)*(c + sin(v)*cos(u)) - (sin(2*v)*sin(u)/2))
% z = s(in(u)*sin(v)) + (cos(u)*sin(2*v)/2)
感谢你在前进。 托马斯·
Thank you in advance. -Thomas
推荐答案
这应该工作:
ezmesh('cos(u)*(1+sin(v)*cos(u))-(sin(2.*v))*(sin(u)/2)',...
'sin(u)*((1+sin(v)*cos(u))-(sin(2.*v))*(sin(u)/2))',...
'sin(u)*sin(v)+(cos(u)*(sin(2.*v))/2)',[-pi,3,-3,pi]);
axis([-4 4 -4 4 -4 4])
这篇关于3D图8圆环在Matlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文