heprom / pymicro

A Python package to work with material microstructures and 3d data sets
http://pymicro.readthedocs.io
MIT License
42 stars 22 forks source link

bug in vtkRotateActorAroundAxis #4

Closed heprom closed 4 years ago

heprom commented 4 years ago

Henry,

Thanks for your reply. When I enter vtkpython euler_angles_anim.py the animation comes up but the 3 vectors just each rotate fast around one axis. The sample axes don't end up rotating to the crystal axes as it does when I run the program from the documentation website. The z and x-axes rotate back to their original positions and y rotates to the negative direction. Do you know why? I cannot figure out where the problem is looking at the code. The attached image shows the final configuration. Below is the terminal output -

I am running Ubuntu 20 and Anaconda3 on a Asus laptop.

Thanks,

Don

after phi1, X axis is [-0.79652992 0.60459911 0. ] after phi1 and Phi, Z axis is [0.32038872 0.42209655 0.8480481 ] t=31, computed the_phi1 = 3.6 t=32, computed the_phi1 = 7.1 t=33, computed the_phi1 = 10.7 t=34, computed the_phi1 = 14.3 t=35, computed the_phi1 = 17.9 t=36, computed the_phi1 = 21.4 t=37, computed the_phi1 = 25.0 t=38, computed the_phi1 = 28.6 t=39, computed the_phi1 = 32.1 t=40, computed the_phi1 = 35.7 t=41, computed the_phi1 = 39.3 t=42, computed the_phi1 = 42.8 t=43, computed the_phi1 = 46.4 t=44, computed the_phi1 = 50.0 t=45, computed the_phi1 = 53.6 t=46, computed the_phi1 = 57.1 t=47, computed the_phi1 = 60.7 t=48, computed the_phi1 = 64.3 t=49, computed the_phi1 = 67.8 t=50, computed the_phi1 = 71.4 t=51, computed the_phi1 = 75.0 t=52, computed the_phi1 = 78.5 t=53, computed the_phi1 = 82.1 t=54, computed the_phi1 = 85.7 t=55, computed the_phi1 = 89.2 t=56, computed the_phi1 = 92.8 t=57, computed the_phi1 = 96.4 t=58, computed the_phi1 = 100.0 t=59, computed the_phi1 = 103.5 t=60, computed the_phi1 = 107.1 t=61, computed the_phi1 = 110.7 t=62, computed the_phi1 = 114.2 t=63, computed the_phi1 = 117.8 t=64, computed the_phi1 = 121.4 t=65, computed the_phi1 = 125.0 t=66, computed the_phi1 = 128.5 t=67, computed the_phi1 = 132.1 t=68, computed the_phi1 = 135.7 t=69, computed the_phi1 = 139.2 t=70, computed the_phi1 = 142.8 end of animation loop, exiting...

On Wed, May 13, 2020 at 10:03 AM Henry Proudhon notifications@github.com wrote:

Hi donwerder, sorry I did not see your issue sooner. if you run anaconda3 it should all be fine. first try to lunch an ipython shell to verify that vtk is install (tifffile is included as an external tool in pymicro):

import vtk if this works then you just have to add pymicro to your python path. This is a standard practice (using for instance the PYTHONPATH environment variable). Then verify that you can import pymicro: from pymicro.crystal.lattice import Lattice and you should be good to go.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/heprom/pymicro/issues/3#issuecomment-628010718, or unsubscribe https://github.com/notifications/unsubscribe-auth/APF6UECNGNHKML443DRF5FDRRKSD3ANCNFSM4MIV6BUA .

Originally posted by @donwerder in https://github.com/heprom/pymicro/issues/3#issuecomment-628689831