Camera.yaw() does exactly that: it yaws the camera’s view without changing the position. roll() and pitch() do the same thing by default. Also no worries about the double posting, that was my fault for letting your first message through moderation without checking to see if you re-sent after singing up for the mailing list. On Wed, Dec 4, 2019 at 7:47 AM Steiner, Andrew (Andrew W. Steiner) via yt-users <yt-users@python.org> wrote:
Matthew,
Thank you. I'll try specifying rot_center, though it seems counterintuitive to me that you can change the orientation of the camera without changing either it's position or its focus. Also, my apologies for the double posting, apparently my mail client was misconfigured...
Take care, Andrew
On 12/4/19 9:23 AM, Matthew Turk wrote:
Hi Andrew,
On Mon, Dec 2, 2019 at 7:58 PM Andrew W. Steiner via yt-users <yt-users@python.org> wrote:
Hello all,
I'm using camera.yaw() iteratively to rotate a full 2*pi around in steps of 2*pi/100. At each iteration I print out the camera properties. The initial print out gives:
<Camera Object>: position:[1.5 0.6 0.7] unitary focus:[0.5 0.5 0.5] unitary north_vector:[-0.19421137 -0.01942114 0.98076744] dimensionless width:[1.5 1.5 1.5] unitary light:None resolution:(512, 512) Lens: <Lens Object>: lens_type:plane-parallel viewpoint:[-1451589.92609281 -239814.12665532
-292191.95321947] unitary
all of which is fine, but then the next iteration gives
<Camera Object>: position:[1.5 0.6 0.7] unitary focus:[0.5 0.5 0.5] unitary north_vector:[-0.19421137 -0.01942114 0.98076744] dimensionless width:[1.5 1.5 1.5] unitary light:None resolution:(512, 512) Lens: <Lens Object>: lens_type:plane-parallel viewpoint:[-1433600.74659457 -332297.23040534
-290461.08804655] unitary
where everything is the same except the "viewpoint" vector. I don't get this at all. It makes sense to me that focus and width are unchanged, but I was expecting position to change. I looked through the source, but I haven't quite figured that out. Is there a good reference to understand how plane-parallel cameras work and how the camera functions modify the internal camera parameters?
So I am not the author of the "yaw" function, but my recollection is that it controls not the position of the camera, but only its orientation. I think to control the position during a rotation, you want to use iter_rotate, which provides a sequence of successive rotations and accepts a rot_center variable.
Thank you, Andrew _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
-- Andrew W. Steiner Joint Faculty Asst. Prof. at UTK/ORNL https://neutronstars.utk.edu/ _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org