Vex setpointgroup snippet

Since I was making circuit looking stuff I tried a different approach above, and in doing so had to explore setting random points into a group via Vex. Enter the setpointgroup function, very handy indeed. This snippet creates a group of random points based on a threshold, and is useful enough to take note of:

if ( rand(@ptnum+chi("seed")) < ch('threshold') ) 
setpointgroup(0, chs("Group"), @ptnum, 1, "set");