Giter VIP home page Giter VIP logo

Comments (2)

Evan-CTL avatar Evan-CTL commented on August 13, 2024

Since they're all lines why don't we use the y-intercept as the pivot? Or to put it another way, it pivots from the origin (0, 0) offset by the y-intercept. Translating the line in any direction would affect the y-intercept which provides a new pivot point, and changing the slope wouldn't matter at x=0.

from econplayground.

nikolas avatar nikolas commented on August 13, 2024

The goal is to pivot the lines at the point where they intersect. Pivoting at the y-intercept wouldn't really make sense, but maybe I'm not understanding this suggestion. I just put this bug here as a record of this issue, but if you have a proposed solution it may be easier to articulate with code.

The solution has to take into account that the user can drag the lines freely, and we have code which updates their position in the system based on that. If they were not draggable we wouldn't have this problem.

Now that I mention that, I think a possible solution is to have code to adjust the line's center point after each drag from the user. In this graph type, these lines are treated more as graphical objects than mathematical functions, so maybe we don't need math after all to solve this - I'll do some experiments.

from econplayground.

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.