I ask for the communty help, especially to those stronger in mathematics to solve a problem:
I've making tests in a program that should be able to represent in real time a sinus wave depending on a slider value. The idea is to have something similar to a Osciloscope made with a canvas plugin.
So that I try to do so and, as you can see in the example, I'm just near to pick up a solution, but not completely. The line represented in the canvas is not responding to the changes made on the slider. It only takes the initial values of X and Y.
The aim would be to make possible to represent a y=cos(x) for example, where X is given by the slider.
Here you would find an image and a example.
Any idea or comment? Is my approach to the solution a good one? Perhaps it is not possible to be done with a canvas plugin?