Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For single-period view for 3D models, set autorotation axis to model center #22

Open
jsoules opened this issue Mar 21, 2024 · 0 comments

Comments

@jsoules
Copy link
Owner

jsoules commented Mar 21, 2024

Autorotation results aren't ideal when looking at a single half-period (rather than the full model), since the rotation is around the absolute Z axis and the models tend to live in one quadrant. So it's spinning on an external axis, which isn't very useful.

It's possible this can be corrected through some grouping method in THREE.js and rotating on a relative z axis, but more likely we'll need to compute the center of mass of the x,y values of all the surface and coil points and rotate around that. Or, to be less computationally expensive, we could just rotate around the x, y center of the bounding box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant