Finding Vector3 of a rotated ellipse in 3D space

30 Views Asked by At

I have the following code to evaluate an (X, Z) point on an Ellipse given a t-value between 0 and 1. I want to be able to rotate the ellipse by a certain number of degrees along the minor axis.

// given 0f <= t <= 1f
float angle = Mathf.Deg2Rad * 360f * t;
float x = Mathf.Sin(angle) * this.MajorAxis;
float z = Mathf.Cos(angle) * this.MinorAxis;

return new Vector3(x, 0f, z);