ObiNon Posted May 2, 2020 Share Posted May 2, 2020 (edited) Hi Guys, I am trying to learn more VEX and I am definitely in need of some assistance here. This is very basic. I have stacked rows of curves that have 3 points each. I want to delete from 0 to 2 pts per curve randomly. Curently I am assigning an @del_qty to each primitive that will tell me how many point on that primitive I am to delete. I dont know how to delete the points using a wrangle since my @del_qty lives on the primitive. Below is an imag that show what I am attempting to do (the red x's are deleted points). . Edited May 2, 2020 by Mdonovan bottom image does not represent data in spreadsheet. Quote Link to comment Share on other sites More sharing options...
ObiNon Posted May 2, 2020 Author Share Posted May 2, 2020 (edited) Here is another image kind of showing my progress .... What I want to do based on this data is randomly delete: 1 point on prim1 2 points on prim2 1 point on prim5 1 point on prim6 1 point on prim9 I underlined some points in the return value from primpoints just to illlustrate possible points to delete. Edited May 2, 2020 by Mdonovan Quote Link to comment Share on other sites More sharing options...
anim Posted May 3, 2020 Share Posted May 3, 2020 (edited) you can use removepoint() function to delete any input point you want Edited May 3, 2020 by anim Quote Link to comment Share on other sites More sharing options...
ObiNon Posted May 3, 2020 Author Share Posted May 3, 2020 Maybe this image will help ... I think I need to iterate over each primitive and then get the min and max value of a static id to delete the points. Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted May 3, 2020 Share Posted May 3, 2020 (edited) Hi, I would go with two steps: get the number of points to be deleted for each prim (already done) use this number to calculate a random selection of points for each prim (the selection can be obtained using the primpoints() function to get all points from each prim) random_selection.hipnc Edited May 3, 2020 by Aizatulin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.