Snap B to Set of Points

steponic shared this question 10 months ago

Dear Hive Mind:

I'm trying to create a vector that moves only in 15 degree increments AND is adjustable in length.

The 15 degree points are defined in VPoints, shown by the green points.

Is there any way to Snap Point B to the set of green points only?

I created a vector where the points snap fine by moving Point B and the length is adjustable by a separate slider. But I'd prefer that both of those events happen just by moving Point B.



Comments (5)


the trick: dynamiccoords()

Files: foro.ggb

Sweet! Thanks for the fix! I've seen you mention dynamiccoords() before. I think I need to learn more about this. Can you point me to some tutorials or documentation beyond the GGB Manual?


Not, sorry

when you need a circular definition (in this case the list is generated by B and B must be in list) the dynamiccoords are the solution.

a new point C is defined (this avoid circular definitions). when C is moved really B is selected, moved to C and you really move B in hide mode but you see C


If you do not mind that your point A is at the origin of the coordinate system, you can also change the grid to polar and set the option of "fix to grid". This of course can affect the other parts of your construction, but this can also solve the issue of moving a point to only specific places.


A little scripting ( :( ) to make it work better when you drag A

© 2020 International GeoGebra Institute