top of page
  • Writer's pictureKalle Lintinen

I Asked ChatGPT to Help Me Tilt My Ellipse

In my last post I showed how I was able to come up with the length L of the semi-major axis of the ellipse of refraction and I also showed  conveniently I was able to use the data of the ellipse to draw it in untilted projections.

 

If there is no tilting, the orthogonal circle of refraction becomes quite impossible to determine. However, if the whole shape is rotated around the z-axis so that an unrefracted dot is located right at the middle of the two dots that make up the vertical connecting vector between them, the orthogonal circle of refraction is converted into a tilted line that both passes through the center of the vertical connecting vector, as well as the ellipse of refraction.

This shape should be relatively easy to make. The only thing I need to do is to be able to rotate the original shapes around the z axis by a specific amount. While this might not be obvious to you, the rotation needs to be .

 

While I had some idea of what to do, I thought I’d just ask ChatGPT for advice. So, I asked:

“What are the parametric equations for a tilted ellipse?”

While ChatGPT is known to be delusional about its mathematics, if you ask the right sort of questions, you can check from its answers, whether they make any sense. So, this is what ChatGPT answered:


The parametric equations for a tilted ellipse (an ellipse that is rotated or tilted with respect to the coordinate axes) can be expressed in terms of the cosine and sine functions. The standard parametric equations for an ellipse with semi-major axis a and semi-minor axis b aligned with the coordinate axes are:
To tilt the ellipse, you can introduce an angle θ that represents the tilt or rotation angle. The parametric equations for a tilted ellipse become:
Here, (xc​,yc​) represents the center of the ellipse, a is the semi-major axis, b is the semi-minor axis, t is the parameter that varies, and θ  is the angle of rotation or tilt.
Adjusting the values of a, b, θ, and (xc​,yc​) will allow you to control the size, tilt, and position of the ellipse in the coordinate system.

 

And lo and behold: I was pleasantly surprised that this was 100 % accurate. Had I tried to find this with Google I probably would have found this out otherwise. But with ChatGPT, I got the answer in seconds.

 

Just for reference, these are the three projections of the ellipse of refraction (red ellipse/line). The green circle is the reference circle of no refraction and the two diagonal lines in the x-y projection depict the connection of the central dots (not shown) to their neighboring dots. The green circle becomes a green line in the x-z and y-z projections. The blue semicircle in the x-z and y-z projections depicts the distance of 2r from the center of the lower dot (which confusingly isn’t shown in these images).

The red ellipse touches the blue semicircle just at one point. This is because the ellipse is actually comprised of two half-ellipses: one assigned to the blue semi-circle (or spherical surface, if viewed in 3D), whereas the other half-ellipse is assigned to the yellow semi-circle that I showed in my last post.

 

Anyhow, let’s get back to the tilted ellipse. In my case, the xc and yc terms are zero, so can be ignored. Otherwise, the values I already know can just be inserted into the above equations and we transition the shape below left to the shape below right

I was about to show to you how the x-z and y-z projections are tilted as well, but when I tried to do that, I realized that I didn’t quite understand the equations as well as I thought, so I clearly got the wrong results. So, this is what I’m attempting to do next.

 

However, even this I think is quite cool. While I’m at the same time frustrated at how slow I am at seemingly simple mathematics, I also realize that it’s not the mathematics that’s been baffling people all along. Rather, it seems that people try to solve complex problems with mathematics, whereas the really tricky bits are more about logic. The thing I once called “Those Pesky Postulates”. Once the logic has been solved, the mathematics aren’t too difficult. At least it doesn’t feel to me that what I’m doing would get me a PhD in mathematics. I’m probably doing everything all wrong in the eyes of ‘proper mathematicians’.


Update from December 31st 2023:


No wonder I wasn’t able to apply what I learned from ChatGPT to three-dimensional ellipses. You see, for my original equations of shifting ellipses, I took the two-dimensional equation provided by ChatGPT and made them apply to three dimensions. However, this only worked for the x-y projection.

 

So, instead of trying to reinvent the wheel, I instead asked ChatGPT:


What are the parametric equations for an ellipse in three dimensions tilted around the z axis?

This time I won’t give the whole answer, but just the equations:

Here ChatGPT might not be 100% accurate, as the term a for z(t) seems to not be really related to the term a for x(t) and y(t). However, if replace a with c, which is the maximum height of the ellipse on the z-axis, these equations seem to produce what I need. So just for clarity:

So how do I know these equations make sense? Well, I just plot them in Excel, like this:

I wouldn’t call this conclusive proof, but the shapes do look convincing.

 

Next, I need to add the orthogonal circle of refraction. And I guess I need to tilt the vectors of dot connections as well.

6 views0 comments

Recent Posts

See All

Comments


bottom of page