File:Contour plot of all solutions to Euler's equations.png

Original file (967 × 475 pixels, file size: 410 KB, MIME type: image/png)
![]() | This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionContour plot of all solutions to Euler's equations.png |
English: Given fixed angular momentum, for each value of kinetic energy, we have a family of curves for the possible value of angular velocity. The curves are plotted in black, on the orange ellipsoid of fixed angular momentum.
```python import numpy as np import matplotlib.pyplot as plt import scipy
L = 1.0 L2 = L**2 I1, I2, I3 = 1.0, 2.0, 3.0 xmin, xmax, ymin, ymax, zmin, zmax = -L/I1, L/I1, -L/I2, L/I2, -L/I3, L/I3 E1, E2, E3 = 0.5*L2/I1, 0.5*L2/I2, 0.5*L2/I3 def parametric_plot(E, orbit_res=1000): thetas = np.linspace(0, 2*np.pi, orbit_res) if E3 < E and E < E2: rs = np.zeros(orbit_res) zs = np.zeros(orbit_res) for i, theta in enumerate(thetas): invmatrix = scipy.linalg.inv(np.array([[I1 * np.cos(theta)**2 + I2 * np.sin(theta)**2 , I3], [(I1 * np.cos(theta))**2 + (I2 * np.sin(theta))**2, I3**2]])) r2z2 = invmatrix @ np.array([[2*E], [L2]]) rs[i] = np.sqrt(r2z2[0,0]) zs[i] = np.sqrt(r2z2[1,0]) return rs * np.cos(thetas), rs * np.sin(thetas), zs if E2 < E and E < E1: xs = np.zeros(orbit_res) rs = np.zeros(orbit_res) for i, theta in enumerate(thetas): invmatrix = scipy.linalg.inv(np.array([[I1, I2 * np.cos(theta)**2 + I3 * np.sin(theta)**2], [I1, (I2 * np.cos(theta))**2 + (I3 * np.sin(theta))**2]])) x2r2 = invmatrix @ np.array([[2*E], [L2]]) xs[i] = np.sqrt(x2r2[0,0]) rs[i] = np.sqrt(x2r2[1,0]) return xs, rs * np.cos(thetas), rs * np.sin(thetas) fig = plt.figure(figsize = (16,16)) ax = plt.axes(projection='3d') u = np.linspace(0, 2 * np.pi, 100) v = np.linspace(0, np.pi, 100) x = np.outer(np.cos(u), np.sin(v)) y = np.outer(np.sin(u), np.sin(v)) z = np.outer(np.ones(np.size(u)), np.cos(v)) x *= L/I1 y *= L/I2 z *= L/I3 ax.plot_surface(x, y, z, color='orange', alpha=0.3) epsilon=1e-3 for E in np.linspace(E3+epsilon, E1-epsilon, 20): xs, ys, zs = parametric_plot(E) xs *= 1+epsilon ys *= 1+epsilon zs *= 1+epsilon ax.plot3D(xs, ys, zs, linewidth=1, color='k') ax.plot3D(-xs, -ys, -zs, linewidth=1, color='k') ax.axes.set_xlim3d(xmin, xmax) ax.axes.set_ylim3d(ymin, ymax) ax.axes.set_zlim3d(zmin, zmax) ax.set_aspect('equal') ax.set_axis_off() plt.show() ``` |
Date | |
Source | Own work |
Author | Cosmia Nebula |
Licensing



- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Captions
Items portrayed in this file
depicts
some value
27 April 2023
image/png
3f70ffc7c31726752c9c0c8984e7988f129f6030
420,129 byte
475 pixel
967 pixel
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 23:21, 27 April 2023 | ![]() | 967 × 475 (410 KB) | wikimediacommons>Cosmia Nebula | cropped |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Horizontal resolution | 39.37 dpc |
---|---|
Vertical resolution | 39.37 dpc |