# Restrict movable point to integer values

Dr Deepak Shah shared this question 1 month ago

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? 1

Hi,

> Fixed to Grid 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... 1

Move a free movable point C and define

`A=(round(x(C)), round(y(C)))` 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.