How do I make line scale (graphyque) as geogebra ?

0 favourites
  • 3 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • hello, I would like to know how we should do to create lines

    with the space which becomes large when we zoom (framing), as

    here: (when you zoom in).

    I want to add it to this project to better see the zoom of

    atomic scale, I also want micro lines to appear

    when you zoom enough, for example, lines that represent

    centimeters, when you zoom enough so that the "millimeter" lines

    appear between the "centimeter" lines


  • I gave it a try... you have to do all the scaling manually, and calculate what should be visible or not.

    here is what I came up with - it can zoom in or out indefinitely, although I didn't have it show simplified labelling the way the program you linked does. I also don't zoom into the mouse location.

    drawing graphs gets very tricky! if the canvas size does not match the screen resolution, then the lines will get blurry, different thicknesses, and lighter or darker than their neighbours - which looks terrible.

    so, you have to set the canvas size to match the window size if you want nice looking lines.

    Use the mouse wheel to zoom in and out, and you can use the left mouse button to make lines: click and hold to make the first point, drag to another location and release to complete the line. when you zoom, the lines get updated.

    oh yeah, since I am resetting the canvas and using scale outer to use the whole screen, you can't assume that the top left screen coordinate is 0,0. So you MUST ALWAYS add in viewportLeft and viewportTop to make sure you are where you think you are on the screen. It took me a very long weekend of work a year ago to figure that out - and you would not believe how subtle that mistaken assumption can get!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • really, i am very glad to have a long answer complete with explanations and sources to explain your idea, thank you very much, i don't know how i could see thank.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)