deawing 3d vector lines
이전 댓글 표시
how to draw a line as a vector through a point (4,3,2) with direction (4,6,1)?
답변 (2개)
Sven
2011년 11월 27일
Hi Eve, you can use the following to draw a line from your original point in the direction specified.
pt = [4 3 2] % Your point
d = [4 6 1] % Your direction vector
twoPts = [pt; pt+d];
figure, hold on
plot3(pt(1),pt(2),pt(3),'go') % Your original pt for comparison
plot3(twoPts(:,1),twoPts(:,2),twoPts(:,3),'-b.')
Is that what you were looking for?
Jan
2011년 11월 27일
0 개 추천
There are several function to draw 3D arrows in the FEX:
- http://www.mathworks.com/matlabcentral/fileexchange/14056-arrow3-version-5
- http://www.mathworks.com/matlabcentral/fileexchange/28324-3d-arrow-plot
- http://www.mathworks.com/matlabcentral/fileexchange/25372-marrow3-m-easy-to-use-3d-arrow
- http://www.mathworks.com/matlabcentral/fileexchange/278-arrow-m
- http://www.mathworks.com/matlabcentral/fileexchange/12274-3d-arrow-with-many-colorparameter-options
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!