File Exchange

image thumbnail

Euclidian projection on ellipsoid and conic

version 1.4 (31 KB) by

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

8 Downloads

Updated

View License

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)

Comments and Ratings (2)

Cui

Cui (view profile)

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

Mark Shore

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.

Updates

1.4

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

1.3

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

1.2

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

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video