How to make Delaunay sphere


Hi I’m Japanese. my English is not better.
I want to make Delaunay sphere with ofxDelaunay.
I can add Vertex random on sphere.

ofxDelaunay delaunay;
int num = 300;
    for(int i = 0; i < num; i++){
        int radius = 600;
        float z = ofRandom(-1.0, 1.0);
        float phi = ofDegToRad(ofRandom(360)); 
        float x = sqrt(1 - z * z) * cos(phi);
        float y = sqrt(1 - z * z) * sin(phi);
        delaunay.addPoint(radius * ofVec3f(x, y, z));

but, this code connect go through in sphere.

I want to make on surface…


You can try transforming your points to a plane using stereographic projection. Create the triangulation in 2d, then transform your results back.
Here’s a tutorial that describes this method: