ttricco / sarracen

A Python library for smoothed particle hydrodynamics (SPH) analysis and visualization.
https://sarracen.readthedocs.io
GNU General Public License v3.0
15 stars 17 forks source link

x/y limits with rotation #77

Open ttricco opened 8 months ago

ttricco commented 8 months ago

The default x/y limits when interpolating are based off the initial view before rotation is applied. This means things can be rotated out of the field of view.

Default view: sdf.render('rho') image

10 degree and 45 degree rotations: sdf.render('rho', rotation=[10, 0, 0], rot_origin=[0, 0, 0]) sdf.render('rho', rotation=[45, 0, 0], rot_origin=[0, 0, 0]) image image

The default x/y limits should instead be set using the rotated frame, not the original frame. This will need to be updated both for interpolation and render, as they currently obtain their limits independently.