Baldric Posted October 5, 2015 Share Posted October 5, 2015 Hello everyone, I am trying to move some points in a group along their normals, but want to try out doing so by a wrangle sop instead of the point sop, as I have heard that the point sop is getting a bit out of date. Besides it would be good to learn a bit more VEX code... However, I am new to VEX, and am struggling to get things to work. I know it is probably very simple, so my question is: how do I do this the proper way? Thanks, Doug Quote Link to comment Share on other sites More sharing options...
dedeks3000 Posted October 5, 2015 Share Posted October 5, 2015 1 - For a good introduction to vex expressions and wrangles : http://www.sidefx.com/index.php?option=com_content&task=view&id=2512&Itemid=254 2 - To move points along normal , try this: v@P1 = ch("scale") * @N; @P += @P1; or @P += ch("scale") * @N; 3 1 Quote Link to comment Share on other sites More sharing options...
Baldric Posted October 6, 2015 Author Share Posted October 6, 2015 Thanks Dedeks Worked like a charm, and the tutorial was great! Cheers! Doug 1 Quote Link to comment Share on other sites More sharing options...
akelian Posted November 25, 2017 Share Posted November 25, 2017 On 06/10/2015 at 1:19 AM, dedeks3000 said: 1 - For a good introduction to vex expressions and wrangles : http://www.sidefx.com/index.php?option=com_content&task=view&id=2512&Itemid=254 2 - To move points along normal , try this: v@P1 = ch("scale") * @N; @P += @P1; or @P += ch("scale") * @N; I might be wrong but you should normalize the Normal vector first no ? vector moveAlongV(vector position;vector norm; float dist){ return position += normalize(norm) * dist; } Quote Link to comment Share on other sites More sharing options...
FJsam Posted July 16, 2019 Share Posted July 16, 2019 On 11/25/2017 at 8:07 PM, akelian said: I might be wrong but you should normalize the Normal vector first no ? vector moveAlongV(vector position;vector norm; float dist){ return position += normalize(norm) * dist; } Yeah! I think so. 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.