So wandeln Sie die Matrix von Get Hull Point in ein im Uhrzeigersinn verlaufendes Polygon umHallo Team,
Gibt es eine Möglichkeit, die Matrix von „Get Hull Point“ in ein im Uhrzeigersinn verlaufendes Polygon umzuwandeln? Das Problem ist, dass das Polygon nicht kontinuierlich ist, wenn ich Polygon(x,y) verwende, um ein Polygon zu zeichnen, wobei x und y von „Get Hull Points“ stammen.
Code unten:
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
Hat jemand eine Lösung zur Behebung des Problems?
Anerkennen,
Automatisierung und SkriptingDatenexploration und -visualisierungBetreff: So wandeln Sie die Matrix von „Get Hull Point“ in ein im Uhrzeigersinn verlaufendes Polygon umVerwenden Sie beim Posten von JSL-Code die JSL-Formatierung, da diese die Lesbarkeit deutlich verbessert. Ich habe Ihren Beitrag bearbeitet, um die JSL-Formatierung zu verwenden.
Sie können die Formatierung verwenden, indem Sie drücken
aus der Symbolleiste und fügen Sie dann Ihr JSL in das sich öffnende Fenster ein.