1
$\begingroup$

Is there any canonical way to constrain locators either continuously (e.g. to lie on the graph of a function) or discretely (snap to grid leaps to mind)? The documentation seems a little sketchy on the subject...

$\endgroup$
4
  • $\begingroup$ Please look at the questions under "related" in the right column on this page. This has been done many times before using the second argument of Dynamic. $\endgroup$
    – C. E.
    Apr 4, 2017 at 16:04
  • $\begingroup$ For a curve represented as an implicit Cartesian equation, I used RegionNearest[] for this answer. If you need locators to be constrained to a function, see this (a similar approach should work for parametrically-defined curves). $\endgroup$ Apr 4, 2017 at 16:10
  • $\begingroup$ @C.E. Ah, I see! My browser was not showing me this before, for some reason - I did not have any doubt that the question was not exactly new... $\endgroup$
    – Igor Rivin
    Apr 4, 2017 at 16:37
  • $\begingroup$ 29888, 47221 etc. $\endgroup$
    – Kuba
    Apr 4, 2017 at 17:29

0

Browse other questions tagged or ask your own question.