Code covered by the BSD License

### Highlights from Euclidian projection on ellipsoid and conic

5.0
5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 31 KB File ID: #27711 Version: 1.4

# Euclidian projection on ellipsoid and conic

### Bruno Luong (view profile)

24 May 2010 (Updated )

Projecting a point on ellipsoid or conic in n-dimensional space

File Information
Description

Find the projection of point P in R^n on the ellipsoid

E = { x = x0 + U*(z.*radii) : |z| = 1 }, where U is orthogonal matrix of the orientation of E, radii are the axis lengths, and x0 is the center.

Or on generalized conic E = { x : x'*A*x + b'*x + c = 0 }.

The projection is the minimization problem:
min | x - P | (or max | x - P|) for x in E.

Method: solve the Euler Lagrange equation with respect to the Lagrange multiplier, which can be written as polynomial equation (from an idea by Roger Stafford)

MATLAB release MATLAB 7.10 (R2010a)
Other requirements Should work from v 2097A (bsxfun required)
29 Dec 2013 Cui

### Cui (view profile)

Excellent work. It solved my problem. Thanks very very much.

24 May 2010 Mark Shore

### Mark Shore (view profile)

It was very interesting to watch this unfold from a simple newsgroup question to this FEX submission. No rating at this point because Bruno has used a number of techniques I'm not familiar with (so my rating would be uninformed), but it seems to work as advertised.

One quick comment: I added alpha(0.5) to his example script to render the ellipsoid semitransparent and make the projection more obvious.

Comment only
25 May 2010 1.2

Extend to generalized conic (ellipsoid, paraboloid, hyperboloid, etc...)

25 May 2010 1.3

Cosmetic changes + Script for test example for 2D conic projection

25 May 2010 1.4

Fix a bug, Introducing an adjustable tolerance value for parabola detection