Arc travel of a line in 3D space.
Afficher commentaires plus anciens
So I have a code that moves apoint in an arc throught a 3d space. I thought with my code that the line segment between the points would stay constant since the point just moves in an arc. I tested the arc travel of a line segment in a plane. the line segment would stay constant then.
How come when I try it in a 3d space the line segment length between my two points get smaller? is there a way to keep my line segment constant? am i calculating the travel of the point wrong?
for i=1:length(LowerTheta);
clf
L=9;
ax(i)=8*cosd(LowerTheta(i));
az(i)=8*sind(LowerTheta(i));
%to find beta the angle that the camber links actualyl travel
beta(i)=asind(az(i)/L);
ay(i)=L*cosd(beta(i));
a=[ax(i) ay(i) az(i)];
b=[0 0 0];
w(i)=norm(0-a);
plot3(ax(i),ay(i),az(i),'*r')
grid on
hold on
xlabel('X')
ylabel('y')
set(gca, 'YDir','reverse')
zlabel('z')
plot3(bx,by,bz,'*r')
length(i)=norm(a-b);
pause(.4)
end
disp(length)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Mobile dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

