Point at absolute screen position

rademur shared this idea 12 years ago
Completed

At present a locus of point A can only be drawn, if A is depending on another point B. If it is depending on a slider value a locus is not possible.


As a substitute we can use the affine ratio of a point on a segment. The only thing that's missing now is: We cannot fix points at a certain absolute screen position as we can do with sliders.


Is it possible to add this feature?


Konrad Remus


P.S. If there were functions to get the actual coordinates of the upper left and lower right corner of the drawing pad, this would do as well.

Comments (14)

photo
1

Try:


A = Corner[1]

B = Corner[3]

(A + B)/2

photo
1

hello

in pre-release version the command corner[1] or corner[2] corner[3] corner[4] give the corners of screen

you can see an example in http://www.geogebra.org/en/...


saludos

photo
1

Thank you, Murkle and Mathmagic, for your information.


The "corner solution" is a good solution. It is i.m.o. more consistant with Geogebra's paradigmata. If points get the feature to be fixed at some screen position the next question might be: how about circles, lines and so on? I see, we should leave it as it is now. (I.m.o. not against the paradigmata, however, is to implement "Locus[<Number>, <Point> ] in addition to Locus[ <Point>, <Point> ]).


B.t.w.: The little context help (F1) is up to date if the english language is chosen. The german context help is lacking of the syntax "Corner[ <Number> ]" = "Eckpunkt[ <Zahl> ]". That's why I never had the idea to use this function.


Konrad Remus

photo
1

how about circles, lines and so on?


Just define them in terms of fixed points :)

photo
1

Thank you, Murkle and Mathmagic, for your information.


(I.m.o. not against the paradigmata, however, is to implement "Locus[<Number>, <Point> ] in addition to Locus[ <Point>, <Point> ]).


Konrad Remus


If you have a way to calculate the point from the number, can't you use the Curve command?

photo
1

How to make always a fixed point when shift and zoom anywhere in 2d?

A (Corner[1]) is fixed to the shift and zoom

B (Corner[1] + 4) is fixed in shift and move when zoom

B (x (A) +4, y (A) +4) is fixed in shift and move when zoom

photo
1

Absolute-Position is allway relative to Corner[4]

Corner[2] is allway changed when zoom or position of (0,0) or relation X/Y axis is changed (script in Corner[2] for synchronice).

The absolute Position can't be in ggb-units, it must be in pixels. This need a dynamic value for the size of 1 pixel in ggb-units.

This is a workaround for your idea "Add a menu item absolute position" (I vote this idea)

photo
1

create a point P then type in input bar AttachCopyToView[P, 1]

hide P

photo
1

I do not understand.

That's just the point.

In:

30ea308064768764d57d3ec2a0593b6b


(

Distance [Corner [1], Corner [2]] / x (Corner [5] + (2, 2)),

Distance [Corner [1], Corner [4]] / y (Corner [5] + (2, 2))

)

Does not work.

What to enter here?

(?,?)

photo
1

see this A; is it you want?

zoom, move the axis etc

say why not

Files: foro.ggb
photo
2

First: the solution of mathmagic is much more nice. Use this.

----------------------------------------------------------------------------------------------------------

My solution works too.

pixX = Distance[Corner[1], Corner[2]] / x(Corner[5] + (2, 2))

is the length of 1 pixel in the Xdirection depending of the actual zoom-factor (analog for pixY)

The point ""Absolut" has his cartesian-coordinates (something else is not possible) BUT this coordinates are changed by the script in C_2 (Corner[2]) (allway when something change at the windows). And he is fixed, so the user can't shift him (only the script in C_2).

You can see the function of (simulated) absolut position when you

- change the size of the applet

- change x/y relation

- move the graphic-windows

- zoom-In -Out

Then the point is allway at the same place similare as a text with absolut position.

(also the point A in the solution of mathmagic)

photo
1

this idea made the attach command some years ago

photo
1

for axis see this https://help.geogebra.org/t...

photo
photo
1

One solution:

Create point A.

In the console:

AttachCopyToView [A, 1]

This will create a point B coordinates which control the moving A.

Not a big improvement:

The properties of B is:

AttachCopyToView [A, 1, (some numbers, some numbers), (some numbers, some numbers), (0, 684), (934, 0)]

You can add a slight improvement from:

x (Corner [5])

y (Corner [5])

For example:

AttachCopyToView [A, 1, (some numbers, some numbers), (some numbers, some numbers), (0, 684), (x (Corner [5]), 0)]

Allows not crawl point B when compressed window borders.

© 2021 International GeoGebra Institute