vector min,max; getbbox(1, min, max); vector avg = avg(min, max); addpoint(geoself(), avg);
int in = 1; vector avgP = 0; int numpt1 = npoints(in); for(int i = 0; i < numpt1; i++) { avgP += point(in, "P", i); } avgP /= float(numpt1); addpoint(geoself(), avgP);
Use "cluster" node and get only 2 cluster points.
vector p0 = point(0,"P",0); vector p1 = point(0,"P",1); @N = normalize(p1-p0);
タグ