Jump to content

Uniformly Reduce Curves


Recommended Posts

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.

 

curvesnonuniform.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...