I'm trying to dynamically draw an ellipse on the image acquired from a camera. See code below:
Dynamic[
cameraImage = CurrentImage[RasterSize -> {324, 243}];
Manipulate[
Show[
cameraImage
,Graphics[{Red, Thick, Circle[pt, Abs[pt2 - pt]*Sqrt[2]]}]
],
{{pt, {324, 243}/2.}, Locator,
Appearance ->
Style["\[CircleDot]", Red, 30]}, {{pt2, {281, 200}/2.}, Locator,
Appearance -> Style["\[FilledCircle]", Red, 16]}
]]
I'd like to have the centre of the ellipse independent from the "radius" point (if I move the external point I don't change the position of the centre), while if I move the central point I'd like the ellipse to move consistently (without reshaping), i.e. the external point has to move accordingly to the movement of the centre.
I tried to adapt Kuba's code from here: Moving a locator based on the movement of another but I'm having troubles with nesting dynamic of his code with dynamic in my code.
(I also tried Dr. belisarius answer that kind-of-works but is very laggy and not reliable)
Any suggestion?