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
Sven 2011 年 11 月 27 日

0 投票

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?

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

タグ

質問済み:

eve
2011 年 11 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by