How to turn matrix from Get Hull Point into clockwise polygonHi team,
Is there anyway to turn matrix from Get hull point into clockwise polygon. I got the problem is when I use Polygon(x,y) to draw polygon, where x and y are from Get Hull Points, the polygon is not continuous
Code below:
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
Is there anyone having solution to resolve the issue?
Appreciate,
Automation and ScriptingData Exploration and VisualizationRe: How to turn matrix from Get Hull Point into clockwise polygonYou should use JSL formatting when you post JSL code as it makes it much easier to read. I did edit your post to utilize JSL formatting.
You can use formatting by pressing
from toolbar and then pasting your JSL to the window that opens.