Restrict movable point to integer values

Dr Deepak Shah shared this question 1 month ago
Answered

Hi there kind helper,

I've created a little Geogebra file to show my students a locus to do with circles...

They can drag the centre of each circle (movable points 'A' and 'B') to where they like

BUT, I want to restrict it so they can only drag the centres to points with INTEGER COORDINATES.

Is that possible?

Thanks for your help...

Comments (4)

photo
1

Hi,


https://wiki.geogebra.org/e...

> Fixed to Grid

photo
1

Oh thanks ever so much Noel...

(I spent ages trying to work out how to do that; then as soon as I saw your reply, I realised what I need to do. Thanks...

photo
1

Move a free movable point C and define


A=(round(x(C)), round(y(C)))

photo
1

Create a free movable and hide point A'

then define:

A = DynamicCoordinates(A', round(x(A')), round(y(A')))

Or if the integer is for example 2, then define

A = DynamicCoordinates(A', round(x(A') / 2) 2, round(y(A') / 2) 2)

instead of constant 2 a slider is also possible

.

Note: you should use this variant if you want the integer to be independent of the zoom factor.

© 2019 International GeoGebra Institute