Results 1 to 4 of 4

Thread: Darned ellipsoid !

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Angry Darned ellipsoid !

    Does anyone know any free/shareware pack for fitting a cloud of points in space to a surface?

    The idea is, I have a number of (say, about half a dozen) experimental points that should be theoretically distributed on the surface of an ellipsoid:

    z = Sqr(1 - (x/a)2 -(y/b)2)

    The problem is determining a and b so the error (or the sum of the squared errors) is a minimum. The error would be the distance from each point to the surface (measured along a direction which is perpendicular to the tangent plane to the surface).

    Now, the above equation corresponds to an ellipsoid with its center at the coordinate origin and its main (symmetry) axes coincident with the corrdinate axes x,y & z.

    However, the points are not necessarily distributed around my coordinate origin so you've got to make a translation. And secondly, the ellipsoid's main axes could be arbitrarily oriented in space. Therefore you have to somehow determine what the most probable orientation would be and rotate the coordinate axes accordingly.

    I kind of solved the problem using Excel but the whole thing was very messy and I wouldn't waste any more time on it. That's why I'd like to use someone else's (better!?) software.

  2. #2

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Darned ellipsoid !

    Originally posted by krtxmrtz

    z = Sqr(1 - (x/a)2 -(y/b)2)
    Btw, maybe it's more "correct" to write the equation in this fashion.

    (x/a)2 + (y/b)2 + (z/c)2 = 1

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I think placing the origin in the center of the cloud would usually give best results, but on the other hand the points might as well be originated along one side of the surface with no error. Does the solution certainly have to be minimal?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573
    The points are not just "any points", i.e. they are not random. They will most likely be distributed throughout (very near) the surface.

    Precisely, the main problem is what you justly point out. How best determine whether you should place the new origin at the geometrical center of the cloud or elsewhere, and how to decide this mathematically. Maybe one has to try a more general fit (i.e. a more general / complex model than the equation I've written) without doing any previous transformation (translation + rotations).

    The minimal error condition was the requirement I thought would help me best in crunching the algebra but there may be other useful methods. I haven't thought of any other though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width