Masoud Posted November 11, 2022 Share Posted November 11, 2022 (edited) Hi guys, As you can see in the image below, I have some scattered points on a grid and there are some points near a curve that are selected. Now I need help on how to create a "Normal vector" on each scattered point, that is toward (pointed to) the nearest point to the point selection. Thanks for helping. VEX_temp_01.hip Edited November 11, 2022 by Masoud Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 12, 2022 Share Posted November 12, 2022 maybe this can be of same Help otherwise try to search For Slope example or Just describe what you want to do with them Points .. you can Use Ray also ...PArticles with Groups ..I'm more for visual motion explaining Example ..Don't know new.hipnc 1 1 Quote Link to comment Share on other sites More sharing options...
bunker Posted November 12, 2022 Share Posted November 12, 2022 (edited) you can do that with pointclouds, it's ideal for averaging out the normal directions which is probably what you want. // wrangle1 // change color by proximity to curve points int handle = pcopen(1,"P",@P,chf("radius"),1); if(pcnumfound(handle)>0){ @Cd = {1,0,1}; } // use blast nodes to separte in 2 geometries // wrangle2 // create normals from average closest points int handle = pcopen(1,"P",@P,chf("radius"),chi("maxpoints")); if(pcnumfound(handle)>0){ vector p = pcfilter(handle,"P"); v@N = p-@P; } normal_to_points.hipnc > using 1 point or 40 points for position lookup Edited November 12, 2022 by bunker 2 Quote Link to comment Share on other sites More sharing options...
Masoud Posted November 12, 2022 Author Share Posted November 12, 2022 Hi, dear Tesan and Julien, You are excellent. Thanks for helping! 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.