Hello,
I am trying to reduce the curves of a groom object using VEX code in a point wrangle. This is the code I am currently using which is run over 'roots' to locate the nearest other root points and then to reduce curves that those points are in.
float searchRadius = ch('searchRadius');
int nearpnts[] = nearpoints(0, @P, searchRadius);
foreach (int pnt; nearpnts){
if(pnt < @ptnum){
int primcon[] = pointprims(0,pnt);
removeprim(0,primcon[0],1);
}
}
This way does reduce the number of curves but it doesn't do it in a uniform fashion.
Is there a way to uniformly find the densest points within a threshold so that the curve can be deleted?
Thanks.