Return Highest Point Position with VEX

Return the highest position of a point in a set of points. This is accomplished using point clouds in VEX.

Useful expression for point positions.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Sunday January 31st, 2010 09:06 PM

* Author: Dan Lynch

#pragma hint filename oppath
#pragma hint height hidden
find_highest(string filename="";
            export float height = 0;
            export vector pos = 0)
    string file = concat("op:", filename);
    int numpoints = npoints(0);
    int pointcloud = pcopen(file, "P", P, 1000000, numpoints);


        vector tempVec;
        pcimport(pointcloud, "P", tempVec);
        if (tempVec.y > height)
            height = tempVec.y;
            pos = tempVec;



Download: return_highest.vfl 597 B

Please login or Click Here to register for downloads
Creative Commons License
Return Highest Point Position with VEX by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at
Permissions beyond the scope of this license may be available at