Skip to content

Construct Ellipsoid Given Inertia Tensor #978

Discussion options

You must be logged in to vote

Ok, I was able to take what you had and consistently match it to the same orientation of the original numpy ellipsoid by sorting the eigenvectors first, and then rotating 90 degrees about the eigenvector axis with the middle eigenvalue. The one thing I can't figure out though is how to match the scale of the original numpy ellipsoid. I scaled it by 0.08 to match this specific case, but the scale needed to match to the original is dependent on its size.

from skimage import measure
from skimage.measure._regionprops import _inertia_eigvals_to_axes_lengths_3D as axis_lengths_3D
from vedo import *
import numpy as np

settings.use_parallel_projection = True 

# Create Ellipsoid
ellipsoid = Elli…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@daniel-a-diaz
Comment options

Comment options

You must be logged in to vote
3 replies
@marcomusy
Comment options

@daniel-a-diaz
Comment options

Answer selected by daniel-a-diaz
@daniel-a-diaz
Comment options

Comment options

You must be logged in to vote
1 reply
@daniel-a-diaz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants