Skip to content

Calculate the projection of a point on the surface of a 3D ellipsoid

License

Notifications You must be signed in to change notification settings

nedelec/Orthogonal-Projection-on-Ellipsoid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Orthogonal projection of a point onto an ellipse (2D) or ellipsoid (3D)

We provide two C-routines to calculate the projection P of a point W on an ellipse aligned with the principal axes. The projection P is the point of the ellipse that is closest to W. The result is calculated with the precision of the machine.


/// set the floating point precision here:
typedef double real;


/// calculate (pX, pY), the projection of (wX, wY) on the ellipse of axes radX, radY
void projectEllipse(real* pX, real* pY, real wX, real wY, real radX, real radY);


/// calculate p, the projection of a 3D point w on the ellipse of axes given in rad[]
void projectEllipsoid(real p[3], const real w[3], const real rad[3]);

About

Calculate the projection of a point on the surface of a 3D ellipsoid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages