tips mainly for Houdini

Instruction



Center point of a bounding box

vector min,max;
getbbox(1, min, max);

vector avg = avg(min, max);

addpoint(geoself(), avg);
Center point of all points

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);
Oriented direction of all points
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);
タグ

Wiki内検索

管理人/副管理人のみ編集できます