0

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);
CaldwellYSR
  • 101
  • 1
  • 1
    The question that you linked to gives you a rotation about the $y$-axis, not about the ellipse’s minor axis. You need a rotation about the $z$-axis instead. – amd Oct 05 '18 at 21:09
  • Yeah see I have no idea what I'm doing. I tried asking this question on MathOverflow and was told it's elementary geometry and doesn't belong on that site. Told to put it here instead. – CaldwellYSR Oct 06 '18 at 01:04
  • You must apply to the result a rotation about z-axis, see $R_z(\theta)$ here: https://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations – Intelligenti pauca Oct 07 '18 at 10:55

0 Answers0