Coder Social home page Coder Social logo

Comments (3)

Wikunia avatar Wikunia commented on June 11, 2024

It was intended to work like this:


obj = Object(1:nframes+ext,(args...)-> box(O,10,20,:stroke),O+10)
obj2 = Object(1:nframes+ext,(args...)-> circle(O,5,:fill), O )
act!(obj, Action(nframes÷2+1:nframes, anim_rotate_around(2π,O)  ))

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.

from javis.jl.

ArbitRandomUser avatar ArbitRandomUser commented on June 11, 2024

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 javis.jl.

Wikunia avatar Wikunia commented on June 11, 2024

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."

from javis.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.