How to make a Point follow another Point in a Circle in GeoGebra

Tanmay shared this question 5 months ago
Answered

I am new to GeoGebra and this site. I find it wonderful, but I have a question how to make a Point (called C) follow a Point (called M).


In the file Below I have Point C attached to a circle and a Point M Moving in range of a circle.

How can I make a Checkbox which in GeoGebra Script will make C always go to the nearest Point to the Point M.

Please help Me

Thanks in advance


File: https://www.geogebra.org/m/f2cyr8qf

Best Answer
photo

2 possibilities:

without scripts (CatAndMouse2) and with scripts (CatAndMouse3)

Note: whenever possible: work without scripts (safer, faster, clearer)

Comments (3)

photo
1

??????

photo
1

You need a ray from the origin through the mouse. Intersection between ray and circle gives the position of the cat.

photo
1

2 possibilities:

without scripts (CatAndMouse2) and with scripts (CatAndMouse3)

Note: whenever possible: work without scripts (safer, faster, clearer)

© 2021 International GeoGebra Institute