stig_olsen Posted February 27, 2014 Share Posted February 27, 2014 Hi, I have some particles that I want to group based on how fare they have reached down the Y-axis. In H12 I used the $TY < -5 -expression to say that it should group when the particles had fallen to under Y-5. Im a newbie so I dont understand the new POP Group, and my old expression doesnt work. I really appreciate your help! All the best, Stig Olsen Quote Link to comment Share on other sites More sharing options...
j00ey Posted February 27, 2014 Share Posted February 27, 2014 You can use the expression ingroup = @P.y < -5; see attached hipnc pop_group.hipnc Quote Link to comment Share on other sites More sharing options...
stig_olsen Posted February 28, 2014 Author Share Posted February 28, 2014 Thank you!! How does that VEX expression really works? Why write ingroup, why use the @ and what does P.y stand for? Stig Quote Link to comment Share on other sites More sharing options...
magneto Posted February 28, 2014 Share Posted February 28, 2014 You can also use setpointgroup function I think. But ingroup is easier in this case. @ is for binding to the attribute and P.y is the Y coordinate of point/particle position. You can also do P[1] if you want. Quote Link to comment Share on other sites More sharing options...
j00ey Posted February 28, 2014 Share Posted February 28, 2014 Just to clarify, P - referring to position - is a vector and y refers to the second component of the vector. The reason P[1] also works is that the components are numbered starting at 0 so P[1] is the second component of the vector P. A good way to learn some very useful vex snippets is if you look in the little dropdown arrow to the right of the text box, there are some presets in there. Most, if not all, of the vexpression text boxes have them. 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.