I found this algorithm which works quite well for spheres but i cant seem to rewrite it to work for ellipsoids: https://people.sc.fsu.edu/~jburkardt/m_src/sphere_cvt/sphere_cvt.html?fbclid=IwAR2GXWXhqnBhrrhGmKi_AuU0kEBOhMOO4HHHqBYuCxc6TZ0QtpmFgnKJ5Sg