In the reference page for the Locator
function, 2nd basic example, I found this:
DynamicModule[{p = {0.5, 0.5}}, {Graphics[Locator[Dynamic[p]], PlotRange -> 2], Dynamic[p]}]
I tried to replicate this command for complex number p
, in two ways, but for no success:
DynamicModule[{p = 0.5 + I 0.5},
{
Graphics[{Locator[Dynamic[ReIm[p]]], Circle[]}, PlotRange -> 2]
, Dynamic[p]}]
and
DynamicModule[{p =
0.5 + I 0.5}, {ComplexListPlot[{Locator[Dynamic[p]], Circle[]},
PlotRange -> 2], Dynamic[p]}]
My objective is to do some complex algebra manipulations on the point p
, and therefore I want to present it as a complex number in the first place. I know I can do the algebra on p[[1]] + I p[[2]]
but I would like to check for the option of assigning to p
a complex number.