Come trasformare la matrice da Get Hull Point in un poligono in senso orarioCiao a tutti,
Esiste un modo per trasformare la matrice da Get Hull Point in un poligono in senso orario? Ho un problema: quando uso Polygon(x,y) per disegnare un poligono, dove x e y provengono da Get Hull Points, il poligono non è continuo.
Codice qui sotto:
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
C'è qualcuno che ha una soluzione per risolvere il problema?
Apprezzare,
Automazione e scriptingEsplorazione e visualizzazione dei datiRe: Come trasformare la matrice da Get Hull Point in un poligono in senso orarioDovresti usare la formattazione JSL quando pubblichi codice JSL, perché lo rende molto più facile da leggere. Ho modificato il tuo post per usare la formattazione JSL.
È possibile utilizzare la formattazione premendo
dalla barra degli strumenti e incollando il tuo JSL nella finestra che si apre.