I want to create an interactive module, where I can plot the vertices of polygon and some points on a circle(for example, suppose a triangle and 3 points on the circle) and move the vertices of the polygon and use the co-ordinates of the vertices of the polygon and the co-ordinates of the points on the circle to create a polynomial and plot the roots of the polynomial, so that I can observe how the roots of the polynomial behave when I move the vertices of the polygon and the points on the circle.
So far I have been able to do this:-
I saw this post on how to create a polygon interactively in this post:- How To interactively create a Polygon in a Graphic?
I saw how to plot points on a circle so that I can move the points in the graphic:- http://reference.wolfram.com/language/ref/LocatorPane.html, but so far I have been able to plot only one point(which I can move) on the circle. Here is the code:-
DynamicModule[{pt = {0, 1}}, LocatorPane[ Dynamic[pt], Graphics[{Circle[], PointSize[Large], Dynamic[Point[pt/Norm[pt]]]}], Appearance -> None ] ]
Problems:
But I don't know how to get the co-ordinates of the vertices of the polygon and the co-ordinates of the points on the circle to put them in the expression for the polynomial whose roots I want to plot.
Also I want to be able to see how the roots of the polynomial move when I move the vertices of the polygon and the points on the circle, but I have no idea how to do that.
For the sake of simplicity, at the moment, I am assuming the polygon is a triangle and plotting only 3 points on the circle.
In that case, if the vertices of the polygon are $a_1,a_2,a_3$(in complex number) and the points on the circle are $c_1,c_2,c_3$, then the polygon whose roots I want to plot is $ a_1(x-c_2)(x-c_3)+a_2(x-c_1)(x-c_3)+a_3(x-c_1)(x-c_2)$.
I am completely new to Mathematica, so any help would be greatly appreciated.