You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The docstring for anim_rotate_around describes
help?> ?anim_rotate_around
search: anim_rotate_around
anim_rotate_around
Animate the rotation of the attached object (see act!) around a point. Similiar function: anim_rotate to rotate or spin an object
Example
≡≡≡≡≡≡≡≡≡
Background(1:100, ground)
obj = Object((args...) -> rect(O, 50, 50, :fill), Point(100, 0))
act!(obj, Action(1:50, anim_rotate_around(2π, O)))
Options
≡≡≡≡≡≡≡≡≡
• anim_rotate_around(ta::Real, p) define the end angle of the rotation + the rotation center.
• anim_rotate_around(fa::Real, ta::Real, p) define the from and end angle + the rotation center.
julia>
However it is not clear what the rotation center is
To Reproduce
Julia Version (i.e. output of julia -v): 1.7.2
Operating system (Mac, Linux, Windows): Linux
Javis version (i.e output of ] status Javis in the REPL) [78b212ba] Javis v0.8.0 ~/Javis.jl
Minimum working code example that led to bug: (above)
what O in anim_rotate_around( 2π, O) should be better documented.
If intended to be a position relative to the canvas then this is a bug .
or it should be documented that the Point is relative to the objects current position.
Screenshots
The text was updated successfully, but these errors were encountered:
But you use anim_translate before which doesn't update the start position which is used in anim_rotate_around. I think that would be a proper fix.
Then we make it clear in the documentation that one should use the position of each object in such a way that one draws it at the origin but it's shifted to the start position. That way rotation works as we know exactly where each object is.
i'm a little confused , if anim_translate doesnt update the start position,
and anim_rotate_around(ang,p) rotates around around point p relative to start position
then anim_rotate_around( 2\pi , O) should rotate around the start point (O+1 in my example)
From Zulip but to have it here for everyone:
"Nope it rotates around the difference in the positions of the two. So it thinks it is at O+1 and should rotate around O. therefore it rotates with a radius of 1 around O-1 from where it is."
Describe the bug
The docstring for
anim_rotate_around
describesHowever it is not clear what the rotation center is
To Reproduce
Julia Version (i.e. output of
julia -v
): 1.7.2Operating system (Mac, Linux, Windows): Linux
Javis version (i.e output of
] status Javis
in the REPL) [78b212ba] Javis v0.8.0~/Javis.jl
Minimum working code example that led to bug: (above)
Expected Behavior and Actual Behavior
what
O
inanim_rotate_around( 2π, O)
should be better documented.If intended to be a position relative to the canvas then this is a bug .
or it should be documented that the Point is relative to the objects current position.
Screenshots
The text was updated successfully, but these errors were encountered: