如何將矩陣從取得赫爾點轉換為順時針多邊形大家好,
有沒有辦法把取得船體點的矩陣轉換成順時針多邊形?我的問題是,當我使用 Polygon(x,y) 繪製多邊形時,如果 x 和 y 是取得船體點的,那麼多邊形就不連續了。
下面的程式碼:
x_matrix = dt[rows, {FORCEDROPTIME_3 }];
y_matrix = dt[rows, {ACTUAL_MINCHASEFORCEF_3}];
t = Triangulation( x( x_matrix, y_matrix ) ); // from the current rows
ashape = Alpha Shape(t);
ashape << Set Alpha(alpha=0.5);
{ax, ay} = ashape << Get Points();
ashape2 = ashape<< Subset( ashape<< Get Hull Points ); // get data point of boundary
{ashape2_xx, ashape2_yy} = ashape2 << Get Points();
Polygon(ashape2_xx,ashape2_yy);
Refer to polygon with red area in graph below, it seems that red polygon is not correct. I believe that I need to process matrix x and y return from Get Hull Points, so that Polygon() syntax could draw continuous polygon
有沒有人有辦法解決這個問題?
欣賞,
自動化和腳本數據探索與視覺化回覆:如何將矩陣從取得赫爾點轉換為順時針多邊形發布 JSL 程式碼時應該使用 JSL 格式,因為它更容易閱讀。我已經編輯了你的帖子,使其使用了 JSL 格式。
您可以透過按
從工具列,然後將您的 JSL 貼到打開的視窗中。