# Equation of a transformed (rotated) ellipsoid

Given an ellipsoid with semi-axis {a,b,c} and cantered at {a,0,0}, how do I use RotationTransform to:

1. Rotate the ellipsoid with respect to the y-axis
2. Obtain the volume bellow the plane $z=0$

Finally, I need to get a general equation to obtain the bounding region.

• I am having trouble with trying to understand what you are asking. 1) you use left-handed coordinate system in your diagram. This in not consistent with Mathematica's way of plotting with a right-handed coordinate system. 2) You ask about doing a rotation about the y-axis, but your diagram shows a translation along the x-axis. 3) you introduce a parameter h in you volume expression without explanation or defintion. – m_goldberg Oct 20 '14 at 6:20
• @m_goldberg I agree that it is difficult to understand exactly what is desired. In my answer, I referred to OP previous question, a starting point as it seems similar...rotating plane through origin<->rotating ellipsoid around y axis but I may have misunderstood – ubpdqn Oct 20 '14 at 6:45
• I think the question is clear enough to have two answers, don't see reason to be closed. – rhermans Oct 20 '14 at 9:39

This appears to be equivalent to your previous question.

volume[p_, abc_] := π Times @@ abc (2/3 + # - #^3/3) & @@ Normalize[abc p]
an[a_] := {Cos[Pi/2 - a], Sin[Pi/2 - a], 0}
vol[a_, abc_] := 4 Pi Times @@ abc/3 - volume[an[a], abc]


a in the above is the angle of rotation about the y axis through the origin. vol subtracts ybeltukov's answer from the volume of the ellipsoid.

Some 'reality checks':

Sphere, zero angle:Refine[vol[0, {a, a, a}], {a > 0}] yields volume of hemisphere: (2 $a^3 \pi$)/3

General ellipsoid, zero angle:

Refine[vol[0, {a, b, c}], {a > 0, b > 0, c > 0}]


yields: $2 \pi a b c /3$

General ellipoid 90 degree (counterclockwise) should be zero:

Refine[vol[Pi/2, {a, b, c}], {a > 0, b > 0, c > 0}]


and is.

Refine[vol[angle, {a, b, c}], {a > 0, b > 0, c > 0}]


yields:

4/3 a b c π -
a b c π
(2/3 +
(a Sin[angle])/Sqrt[b^2 Abs[Cos[angle]]^2 + a^2 Abs[Sin[angle]]^2] -
(a^3 Sin[angle]^3)/(3 (b^2 Abs[Cos[angle]]^2 + a^2 Abs[Sin[angle]]^2)^(3/2)))


You may wish to simplify or refine further.

Apologies if I have misunderstood the question.

• if the code is to be adapted to obtain the area of the ellipse lying on the xy plane, it would require a separate definition of the ellipse equation right? say using RegionMeasure? – Corse Oct 20 '14 at 8:18
• I think the OP explicitly asked for the use of RotationTransform. – rhermans Oct 20 '14 at 9:15
• @rhermans thank you for your helpful answer. I accept my interpretation may be incorrect. However, I interpreted the primary aim of the question to determine a closed form expression for the volume of region of rotated ellipsoid that is below x-y plane (consistent with his previous question). His use of RotationTransform was to support this aim. In my view, this unnecessarily complicates matters. It may well be the OP accepted my answer prematurely. However, that is a matter you and OP may wish to discuss. – ubpdqn Oct 20 '14 at 10:41
• @ubpdqn your implementation is a great solution! I'm just wondering (in my extremely limited knowledge of Mathematica) if RotationTransform would make it more straightforward to compute the intersection area and also the bounded volume. To be clear, your interpretation of my answer has been perfect! @rhermans Well I guess not, seems like my suggestion of using RotationTransform is causing more problems in obtaining the area and volume than I anticipated. Thank you for helping me understand how it works! – Corse Oct 20 '14 at 13:24
• @Corse I made a small mistake an[a_]:={Cos[Pi/2-a],0,Sin[Pi/2-a]} as you are rotating ellipsoid about y axis. . There are many ways to get answers as this site is testimony to. So have fun. It is 1:28 am in the antipodes and doing this from phone. Apologies for error but concept, courtesy of ybeltukov, sound. – ubpdqn Oct 20 '14 at 15:30

To use RotationTransform, as far as I know, you need to have either a vector (or parametric function) or a graphic primitives. I'm still trying to figure out how to transform regions defined by ImplicitRegion

## For vector

We define the ellipsoid parametrically by

paramE = {a + a Cos[u] Sin[v], b Sin[u] Sin[v], c Cos[v]}


and the rotation function

rf = RotationTransform[Pi/8, {0, 1, 0}]


That can be plot by

ParametricPlot3D[rf[paramE] /. {a -> 2, b -> 1, c -> 1}, {u, 0, 2 Pi}, {v, 0, Pi}]


## For graphic primitives

Graphics3D[
GeometricTransformation[
Ellipsoid[{2, 0, 0}, {2, 1, 1}],
RotationTransform[Pi/8, {0, 1, 0}]
]]


## For regions

Here the function to use with RotationTransform is TransformedRegion

rotEl = TransformedRegion[
ImplicitRegion[x^2/4 + y^2 + z^2 < 1, {x, y, z}],
RotationTransform[Pi/8, {0, 1, 0}]];


Now we intersect with the half plane

cutEl = RegionIntersection[rotEl, ImplicitRegion[z < 0, {x, y, z}]]


For display

RegionPlot3D[cutEl, PlotPoints -> 100]


## The equation

RotationTransform[w, {0, 1, 0}][{a + a Cos[u] Sin[v], b Sin[u] Sin[v], c Cos[v]}]

{Cos[w] (a + a Cos[u] Sin[v]) + c Cos[v] Sin[w], b Sin[u] Sin[v], c Cos[v] Cos[w] - (a + a Cos[u] Sin[v]) Sin[w]}

• yeah, it does seem like the parametric approach is somewhat unwieldy due to the transformation functions. I'll try to work on your implementation to get the volume. thank you! – Corse Oct 21 '14 at 2:20