In a question on Mathematics Stack Exchange, CoryG asked for a way to compute a bounding box for a possibly rotated egg shape.

Here is an illustration of my answer. It is based on rotating the direction of the box, not the egg.

Move the point for to change that direction. Move the point for to adjust the shape of the egg.

The egg has the following formula:

The tangents are chosen to be orthogonal to which can be controlled using the point on the circle. The actual length of that vector is irrelevant, only the direction counts.

The points of tangency are determined by solving

for . Of the four solutions, the two real-valued ones are picked. Then is the parameter for the corresponding points of tangency, marked in green.

The dimensions of the box in one dimension can be obtained from those points of tangency, by applying the rotations that are applied to the egg to these points, too. The orthogonal bounds could be computed using as the direction vector, which is orthogonal to .