Find the average position of a point cloud (VEX)

Find centroid of all points in the stream. Run over points.

vector value;
vector values[];

for (int i=0; i<@numpt; i++){
    value = point(geoself(), "P", i);
    append(values,value);
}

vector avg_pos = avg(values);
Previous
Previous

Copy shape from closest primitive (VEX)

Next
Next

Create animated camera from multiple cameras in Maya (Python)