如何将矩阵从获取赫尔点转换为顺时针多边形大家好,
有没有办法把获取船体点的矩阵转换成顺时针多边形?我的问题是,当我使用 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 粘贴到打开的窗口中。