I've been working on the Slider example from the Apparatus examples,
trying to add "stops" to it: I want for the circular handle to stop at the
leftmost and rightmost extent of the rectangular slot it moves on. Maybe
someone can tell me if the path I am on is a dead-end.
I tried to make X a function of value, min(1, max(0, value)), but I
found that when I moved the handle to either end of the slot, it got
stuck.
I figured that the stuck handle had something to do with the slope of
Circle's X versus value being 0 at the end of the slot. Presumably the
Apparatus solver doesn't have any basis for choosing a new value for a
new X when the X / value slope is 0.
In a second attempt (attached), I used the logistic function, which has
asymptotes at y = 0 and 1, to limit Circle's X to the range [0, 1]. The
solver seems to have the same problem with the logistic function, which
makes sense: in the limited precision of the machine, the slope of the
logistic function goes to zero, too.
It seems that I am unlikely to arrive at a slider with non-sticky stops
on my current course. Is there a better way?
Dave
--
David Young
dyo...@pobox.com Urbana, IL
(217) 721-9981