How to make Delaunay sphere

#1

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

//setup
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));
    }
    delaunay.triangulate();
//draw
    delaunay.triangleMesh.drawWireframe();

but, this code connect go through in sphere.

I want to make on surface…

#3

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: https://www.redblobgames.com/x/1842-delaunay-voronoi-sphere.

-Gabor