From: Alberto Fasso' <fasso_at_slac.stanford.edu>

Date: Wed, 4 May 2011 08:22:01 -0700 (PDT)

Date: Wed, 4 May 2011 08:22:01 -0700 (PDT)

Adam,

you are right: the two formulae are equivalent. You have simply divided

all my coefficients by (a*b*c)**2. (There is just a typing error in your Az

coefficient, see below).

I had tried to eliminate all fractions, but I admit that your formula looks

simpler.

I take the liberty to post your mail on the discussion list, together

with this reply of mine. Other users might be interested.

Kind regards,

Alberto

On Wed, 4 May 2011, adwasil_at_poczta.onet.pl wrote:

*> Thanks a lot Alberto.
*

*> Your answer was very helpful. I tried to count himself a little bit and I came
*

*> out slightly different formula.
*

*> Axx = 1 / a ** 2
*

*> Ayy = 1 / b ** 2
*

*> Azz = 1 / c ** 2
*

*> Axy = AXZ = Ayz = 0
*

*> Ax =- 2x0 / a ** 2
*

*> Ay =- 2y0 / b ** 2
*

*> Az =- 2y0 / c ** 2<-- obviously this was a typo: not -2y0 but -2z0
*

*> A0 = x0 ** 2 / a ** 2 + y0 ** 2 / b ** 2 + z0 ** 2 / c ** 2 - 1
*

*> They seem to me to be simpler, although probably we describe the same thing. I
*

*> checked them with concrete numbers in the flair code and it seems to work.
*

*> Best regards
*

*> Adam Wasilewski
*

*>
*

*>
*

*> W dniu 2011-04-29 15:19:54 u?ytkownik Alberto Fasso'<fasso_at_slac.stanford.edu> napisa?:
*

*>> Yes, it is possible. An ellipsoid is a quadric, so you can use the QUA body.
*

*>>
*

*>> The equation of a generic ellipsoid with semiaxes a, b, c parallel to the
*

*>> axes of the coordinates is:
*

*>> (x-x0)**2/a**2 + (y-y0)**2/b**2 + (z-z0)**2/b**2 -1 = 0
*

*>>
*

*>> The QUA (see the manual) is defined by 10 numbers:
*

*>>
*

*>> Axx, Ayy, Azz, Axy, A_xz, Ayz, Ax, Ay, Az, A0
*

*>>
*

*>> corresponding to the equation:
*

*>> Axx*x**2 + Ayy*y**2 + Azz*z**2 + Axy*xy + Axz*xz + Ayz*yz +
*

*>> + Ax*x + Ay*y + Az*x + A0 = 0
*

*>>
*

*>> Re-arranging the ellipsoid equation above, the 10 numbers become:
*

*>> Axx = (b*c)**2
*

*>> Ayy = (a*c)**2
*

*>> Azz = (a*b)**2
*

*>> Axy = Axz = Ayz = 0
*

*>> Ax = -2*x0*(b*c)**2
*

*>> Ay = -2*y0*(a*c)**2
*

*>> Az = -2*z0*(a*b)**2
*

*>> A0 = (b*c*x0)**2 + (a*c*y0)**2 + (a*b*z0)**2 - (a*b*c)**2
*

*>>
*

*>> If the ellipsoid is oblate (ellipsoid of rotation around the minor axis),
*

*>> two of its semiaxes are equal, and larger than the third:
*

*>> b = c> a (minor axis parallel to x)
*

*>> or
*

*>> a = c> b (minor axis parallel to y)
*

*>> or
*

*>> a = b> c (minor axis parallel to z)
*

*>>
*

*>> Finally if your oblate ellipsoid is a generic one with semiaxes not
*

*>> parallel to the coordinate axes, you could in principle work out
*

*>> its equation (in which Axy, Axz and Ayz are not equal to zero): but
*

*>> it is much easier to use one of the above simpler equations, and to rotate
*

*>> the body by means of a transformation directive (see Manual 8.4.3})
*

*>>
*

*>> Alberto
*

*>>
*

*>> On Thu, 28 Apr 2011, adwasil_at_poczta.onet.pl wrote:
*

*>>
*

*>>> Is there any possibilities to define oblate ellipsoid?
*

*>>> Best regards
*

*>>> Adam Wasilewski
*

*>>
*

*>
*

*>
*

*>
*

*>
*

-- Alberto Fasso` SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025 Phone: (1 650) 926 4762 Fax: (1 650) 926 3569 fasso_at_slac.stanford.eduReceived on Wed May 04 2011 - 17:53:09 CEST

*
This archive was generated by hypermail 2.2.0
: Wed May 04 2011 - 17:53:10 CEST
*