restart;
with(plots);
with(plottools);
Vdot := proc (U, V)local i: add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc:
ngon := n -> local i; [seq([cos(2*Pi*i/n), sin(2*Pi*i/n)], i = 1 .. n)]:
theta := (2*Pi)/5;
poly := [seq([cos(k*theta), sin(k*theta)], k = 1 .. 5), datatype = float];
Ii := [0, 1/2]:
H := [-1/4, 0]:
r := dist(Ii, H):
theta := (2*Pi)/5:
p1 := pointplot([seq([cos(k*theta), sin(k*theta)], k = 0 .. 5)], symbol = solidcircle, color = red, symbolsize = 10):
p2 := textplot([seq([cos(k*theta), sin(k*theta), cat("M", k)], k = 0 .. 4)], align = ["above", "right"]):
cir1 := circle([0, 0], 1/2, color = green,dashdot:):
cir2 := circle([-1/4, 0], r, color = black):
cir3:=circle([0,0],1,color=red):
display([p1, p2, cir1, cir2, cir3,polygonplot(poly, thickness = 5, color = blue, transparency = 0.95)], axes = normal);
Why this error , Thank you.