Restrict movable point to integer values

Dr Deepak Shah shared this question 11 months 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 (2)

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.

© 2020 International GeoGebra Institute