Intersection curves BBX in an ellipsoid, why not always ellipse curves?

Hello everyone,

I was testing a theory that if you cut through an ellipsoid (stretched sphere), and all cutting shapes are parallel to the axes of this ellipsoid, these intersection curves should be ellipses or circles.

Some background information:
I made this ellipsoid in a specific way for a project, so the sphere dimensions derive from an arc radius, and the sphere is then scaled in 1 direction to achieve the preferred longitudinal length of the ellipse. The arc and length are given beforehand, what I would like to achieve is a elipseshaped bowl, and every intersection curve on this bowl should be an ellipse or circle. To make this bowl shape as ‘‘clean’’ and mathematically explanatory as possible.

As a test I made several cutting shapes, using the same axis directions of the ellipsoid. And now comes the problem, with almost all intersection curves I get a confirmation that this is indeed an ellipse. Except for one. Rotating the ellipsoid doesn’t solve it.

I’ve used the Pufferfish ‘‘is arc/ellipse’’ function to find out if the curve is an ellipse curve.

Is this a bug? Or is my hypothesis about cutting an ellipsoid creating ellipses not true?


2025 0501 - Ellipsoid test.gh (60.8 KB)

I deleted (and bypassed) the Pufferfish component and see this:


Ellipsoid test_2025May12a.gh (26.4 KB)

This code is more complex than I expected, making it difficult to understand and modify. The extreme size (54000 :interrobang:) doesn’t help.

Mathematically every planar section of an ellipsoid is an ellipse or a point, if the cutting plane is tangent to the ellipsoid.

1 Like

there is a precision problem…
the curves claim to be planar - but the boundingbox created using the plane has a volume.
and the bounding box of the problem curve has a much bigger volume.
(i wanted to construct the perfect elipse to measure the difference..
get the center from the bounding box…)

None of these plane intersections say “Elliptical Curve” - any idea why :question:
Happens in both R7 and R8, regardless of parameter values.


Ellipsoid X_2025May12a.gh (15.2 KB)

Look at a sphere | plane section. Only sections perpendicular to the axis between the two poles appear as circles.

sphere-plane.gh (18.7 KB)

what is -after all- the problem?
is there a relevant deviation? how would it help to make the software admit that the curves are eliptical
the elipsoid is huge : a 170m sphere streched to 224m length are you sure about the size? and i guess that causes the precision problems

This version (below) is telling me that only horizontal XY plane intersections (yellow group) result in “Elliptical Curve” while vertical XZ planes intersections do not. Seems very odd.


Ellipsoid X_2025May12b.gh (18.7 KB)

The ellipsoid in this version is much smaller.

Look at the control polygon of the ellipse or circle…

sphere-plane-iscircle.gh (22.8 KB)

Your Python component is in agreement with the “Elliptical Curve" I see in the text panel.


Ellipsoid X_2025May12c.gh (21.4 KB)

Horizontal sections are ellipses, vertical sections are not. :thinking:

1 Like

That’s what I described as perpendicular to the axis

Different questions:

  1. Does the section match a circle or ellipse within absolute tolerance?

  2. Is the section an exact rational NURBS circle or ellipse?

  3. Is the section labeled as a circle or ellipse?

Short answer is these differences are due to some sections being isocurves while the others are not isocurves.

Usually when a rational NURBS surface is sectioned (intersected with a plane) the result is a non-rational NURBS curve with a sufficient number of control points to match the exact intersection within absolute tolerance.

An exception is if the section coincides with an isocurve of the surface. Then the result will be a NURBS curve with the exact form of the isocurve, which for a sphere is a circle and for an ellipsoid is an ellipse.

In the examples quoted the sections labeled as circles or ellipse coincide with isocurves.

2 Likes

you might also be interested in Rhino.Geometry.Curve.TryGetEllypse() and its overloads

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.curve/trygetellipse?version=8.x#(out,double)

the interesting thing is that despite the Rhinocommon method confirming it was able to get an Ellypse out of that curve with that tolerance, that very same confirmed_to_be_an_ellypse curve is still not seen as an ellypse by gh .__. and also not seen as an ellypse by Pufferfish dedicated component:

sphere-plane-trygetellypse.gh (18.8 KB)

1 Like

I’m not sure if this clue means something or “obviously not”? Text panel and Python test are not affected by rotating the intersection curves 90 degrees.


Ellipsoid X_2025May12d.gh (23.7 KB)

I retrofitted your Python to my version ‘a’ and got very mysterious results :interrobang:

  1. Solution exception:Object reference not set to an instance of an object.


Ellipsoid X_2025May12aa.gh (21.5 KB)

P.S. Aha :bangbang: Increasing the tolerance value to ‘0.001’ fixed it:

Bingo! I think you got it @inno - can you explain it? :wink:

P.P.S. Nudging the ‘Scale X’ slider affects the results.

2 Likes

Thank you all for joining me in this research.

I will give some more background. The shape (ellipse bowl) that I try to create is used in an architecture project, hence the size. Firstly the ellipsoid, then I would boolean cut the bowl part out. But for this problem the size could also be for example 1% of that. Sorry I could have given you a much smaller file. But mr Oster also mentioned it, the size/precision in this problem is not the problem.
Also I would like to recreate the shape in different software (without importing a shape from rhino). So it would be nice to mathematically define it, which is why it would be nice is all sections are ellipses.

If I understand correctly, in one direction (derived from the ellipsoid plane) the intersection curve is an ellipse, in the other direction it is a closed planar curve (which is the same as an isocurve)? With Python you could name this an ellipse again, but still GH will name it a closed planar curve?

I am not that familiar with Python, but if this closed planar curve is in fact an ellipse than that was what I was looking for. Still I am not sure what causes this issue. Any ideas?

That intersection curve coincides with an isocurve of the NURBS ellipsoid, and is labeled as an “ellipse”.

That intersection curve does not coincide with an isocurve of the NURBS ellipsoid, and is not labele as an ellipse, but the shape is an ellipse (within a tolerance).

It will be an ellipse within a tolerance. In Rhino that tolerance is the absolute tolerance which the user sets. I don’t know how what tolerance Grasshopper uses.

It appears that the root cause of which intersection curves is labeled as an ellipse is the orientation of the ellipsoid’s isocurves. The orientation of the ellipsoid’s isocurves depends on the details of how the NURBS ellipsoid is constructed.

The size (54000 units) is because you are using millimeters instead of meters, eh?

None of that helps at all.

Thank you, this makes it much clearer!

Correct!

I am not able to answer my own question with background information, if that was what you were looking for. There were specific rules in this project constructing this ‘‘elipse bowl’’. Which is why the code was ‘‘complex’’, I thought to explain that a bit more.

Anyway, thanks for the help!