I have a task where I need to display in the graph the change in potential energies depending on the angle phi, but I need to change phi and get the values of potential energies. And get stable segments of the mechanism on the chart
This is an attempt:
func[phi_] = Sin[2*phi] - 0.5; Manipulate[ Plot[func[phi], {phi, -Pi, Pi}, Epilog -> {Line[{{\[Phi], 0}, {\[Phi], func[\[Phi]]}, {0, func[\[Phi]]}}]}], {\[Phi], -Pi, Pi, Animator}]