How to draw line in viewer3d ?

24 ビュー (過去 30 日間)
philippe duvauchelle
philippe duvauchelle 2025 年 12 月 18 日 8:37
コメント済み: Matt J 2025 年 12 月 20 日 15:25
Hello,
I m trying to use viewer3d as a openGL viewer and it works well for 3D surface and 3D points using images.ui.graphics.Surface and images.ui.graphics.Points but i wonder if it is possible to draw line or connected line inside the viewer ? I dont mean how to show wireframe when using a surface or annotation line.
I just try for exemple to attached 3 vectors in X,Y and Z direction to each 3D object.
I saw 2 functions WideLine and Thinline but i did not find any documentation about them.
Thanks for your help

回答 (1 件)

Matt J
Matt J 2025 年 12 月 19 日 2:30
You could use images.ui.graphics.Surface to create a very thin cylinder, could you not?
  4 件のコメント
philippe duvauchelle
philippe duvauchelle 約10時間 前
移動済み: Dyuman Joshi 約10時間 前
Far in what way?
for a line, i just need 2 points. If i use a surface to make a thin cylinder, i need many vertices and facets.
NOT connected line
your solution works well
I just find out another solution : add 1line with NaN values like for exemple :
0 0 0
1.0000 0 0
NaN NaN NaN
1.0000 1.0000 0
0 1.0000 0
NaN NaN NaN
0 0.5000 0
0 0.5000 1.0000
Maybe not the bast solution but it works
Thanks for your help
Matt J
Matt J 約9時間 前
You're welcome, but please Accept-lik the answer to indicate the quesiton has been resolved.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by