Ukazka spojitosti mezi fazory a vyjadrenim v case.
Grafy a ovladaci prvky jsou na konci notebooku.
Staci spustit jednou a pote menit parametry ovladacimi prvky.

Upozorneni : Vsechny otevrene notebooky s dynamickymi zmenami se mohou ovlivnovat.

Remove["Global`*"];
u1Amplituda=10; (*Vychozi hodnota*)
u1Posun=((2*Pi)/9); (*Vychozi hodnota*)
actT=0; (*Vychozi hodnota*)
frekvence=5;

ampColor=Darker[Green];
actVoltColor=Red;
posColor=Purple;
casColor=Blue;


ω:=2*Pi*frekvence; (*omega*)
u1t[t_]:=u1Amplituda*Sin[ω*t+u1Posun];
u1F:=u1Amplituda*Exp[I*u1Posun];

u1FRe[t_]:=Re[u1F*Exp[I*ω*t]];
u1FIm[t_]:=Im[u1F*Exp[I*ω*t]];

defFazorArrow:={Gray,Arrow[{{0,0},{u1FRe[0],u1FIm[0]}}]};
defFazorPoint:={Gray,PointSize->Medium,Point[{u1FRe[0],u1FIm[0]}]};
defFazorAngleStart:=Min[0,u1Posun];
defFazorAngleEnd:=Max[0,u1Posun];
defFazorAngle:={posColor,Dashed,Circle[{0,0},((51*u1Amplituda)/100),{defFazorAngleStart,defFazorAngleEnd}]};

actFazorArrow:={Black,Arrow[{{0,0},{u1FRe[actT],u1FIm[actT]}}]};
actFazorPoint:={Black,PointSize->Large,Point[{u1FRe[actT],u1FIm[actT]}]};
actFazorLineIm:={actVoltColor,Dashed,Line[{{u1FRe[actT],0},{u1FRe[actT],u1FIm[actT]}}]};
actFazorAngleStart:=Min[u1Posun,u1Posun+actT*ω];
actFazorAngleEnd:=Max[u1Posun,u1Posun+actT*ω];
actFazorAngle:={casColor,Dashed,Circle[{0,0},((49*u1Amplituda)/100),{actFazorAngleStart,actFazorAngleEnd}]};

actFazorAmp:={ampColor,Dashed,Thick,Line[{{0,0},{0,u1Amplituda}}]};

fazorEpilog:={defFazorArrow,defFazorPoint,defFazorAngle,actFazorArrow,actFazorPoint,actFazorLineIm,actFazorAngle,actFazorAmp}


actSinVolt:={actVoltColor,Dashed,Line[{{actT,0},{actT,u1FIm[actT]}}]};
actSinPoint:={Black,PointSize->Large,Point[{actT,u1FIm[actT]}]};
defSinAngle:={Thick,posColor,Dashed,Line[{{0,((2*u1Amplituda)/100)},{((-u1Posun)/ω),((2*u1Amplituda)/100)}}]};
actSinAngle:={Thick,casColor,Dashed,Line[{{0,-(u1Amplituda/100)},{actT,-(u1Amplituda/100)}}]};

actSinAmp:={ampColor,Dashed,Line[{{((Mod[-u1Posun+Pi/2,2*Pi]-2*Pi)/ω),0},{((Mod[-u1Posun+Pi/2,2*Pi]-2*Pi)/ω),u1Amplituda}}]};

sinEpilog:={actSinVolt,actSinPoint,defSinAngle,actSinAngle,actSinAmp};



plot1=Dynamic[ParametricPlot[{u1FRe[t],u1FIm[t]},{t,0,(1/frekvence)},
Epilog->fazorEpilog,PlotStyle->{Black,Thick}]];
plot2a:=Plot[u1FIm[t],{t,-(1/frekvence),0},
Epilog->sinEpilog,PlotStyle->{Gray,Dashed,Thick}];
plot2b:=Plot[u1FIm[t],{t,0,(1/frekvence)},PlotStyle->{Black,Thick}];
plot2c:=Plot[u1FIm[t],{t,(1/frekvence),(2/frekvence)},PlotStyle->{Gray,Dashed,Thick}];

plot2=Dynamic[Show[plot2a,plot2b,plot2c,PlotRange->All]];
Grid[{{"Fazor","Casova oblast"},{GraphicsRow[{plot1},ImageSize->{300,300}],GraphicsRow[{plot2},ImageSize->{485,485}]}}]


Grid[{
{"Amplituda [V]: ",Manipulator[Dynamic[u1Amplituda],{1,100,1}],Dynamic[u1Amplituda]},
{"Pocatecni posun [rad]: ",Manipulator[Dynamic[u1Posun],{-2*Pi,2*Pi,(Pi/18)}],Dynamic[u1Posun//N],Dynamic[u1Posun]},
{"Aktualni cas [s]: ",Manipulator[Dynamic[actT],{0,(1/frekvence),(1/(frekvence*72))}],Dynamic[actT//N],Dynamic[actT]},
{"Aktualni posun [rad]: ","",Dynamic[ω*actT//N],Dynamic[ω*actT]},
{"Celkovy (poc + akt) posun [rad]: ","",Dynamic[u1Posun+ω*actT//N],Dynamic[u1Posun+ω*actT]},
{"Aktualni napeti [V]: ","",Dynamic[u1FIm[actT]//N]}
},
Alignment->{{Left,Left,Right,Center},{}},ItemSize->{{Automatic,Automatic,6,5},{{4}}},
ItemStyle->{{},{{ampColor,posColor,casColor,casColor,None,actVoltColor}}}
]