henderthing Posted October 25, 2005 Share Posted October 25, 2005 Hello- I'm using the group POP to create groups using the rand tab according to the rule $PARENT. This is working out great, but requires for me to know how many parents there are--(how many numbered groups I wish to create). For the first iteration, which comes from a SOP group, I can use: argc(pointlist("SOP",groupname)) to get the number of new groups I'll be creating in my POP. However, after that, with every split I'd like to use, this expression does not work. Is there a way to query the number of points in a POP group? How about a way to find out, given a group of points, how many parents there are among them? -m Quote Link to comment Share on other sites More sharing options...
old school Posted October 26, 2005 Share Posted October 26, 2005 In the Attribute POP, set the source group to be the group you want to count the points in. In the value field, put $NGRP. Warning, sidetrack..... I also tried something a bit tricky. I appended a Null SOP to the POP Network SOP and tried to point the pointlist() expression at that. I got the correct value in the value field but the attribute was empty. Perhaps flirting with recursion... In this second case, the Null SOP simply caches the results of the POP network's previous timestep and it "should" be fine to reference anything in SOPs downstream from the current POP SOP. Quote Link to comment Share on other sites More sharing options...
henderthing Posted October 26, 2005 Author Share Posted October 26, 2005 In the Attribute POP, set the source group to be the group you want to count the points in.In the value field, put $NGRP. Warning, sidetrack..... I also tried something a bit tricky. I appended a Null SOP to the POP Network SOP and tried to point the pointlist() expression at that. I got the correct value in the value field but the attribute was empty. Perhaps flirting with recursion... In this second case, the Null SOP simply caches the results of the POP network's previous timestep and it "should" be fine to reference anything in SOPs downstream from the current POP SOP. 22141[/snapback] AARGH! Thank you. I don't know how many times I scanned local variables for POP nodes without seeing $NGRP!!! Since I posted this, I realized that I didn't need to have the group count within POPs, as all I'm using those particular groups for is to draw lines between particles with the Add SOP. I ended up using the Partition SOP instead, which doesn't require a point count. Thanks again. This will come in handy. -m 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.