Skip to content

Commit 2fc62f0

Browse files
committed
Attrib Wrangle VEXpression preset -- number of points in vicinity #831
1 parent d5bbb85 commit 2fc62f0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

VEXpressions.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,25 @@ attribexpression/snippet
6262
[qL] Random distribution (id)
6363
chramp("distribution", random(@id*76))
6464

65+
attribexpression/snippet
66+
[qL] Number of nearby points
67+
len(nearpoints(0, v@P, chf('maxdist'), chi('maxpts')))
68+
69+
attribexpression/snippet
70+
[qL] Number of nearby points (normalized)
71+
len(nearpoints(0, v@P, chf('maxdist'), chi('maxpts'))) / float(chi('maxpts'))
72+
73+
74+
75+
attribwrangle/snippet
76+
[qL] Number of nearby points
77+
float maxdist = chf('maxdist');
78+
int maxpts = chi('maxpts');
79+
i@numnear = len(nearpoints(0, v@P, maxdist, maxpts));
80+
81+
attribwrangle/snippet
82+
[qL] Number of nearby points (normalized)
83+
float maxdist = chf('maxdist');
84+
int maxpts = chi('maxpts');
85+
f@numnear = len(nearpoints(0, v@P, maxdist, maxpts)) / float(maxpts);
6586

0 commit comments

Comments
 (0)