Write a program that plots the sine function in red and cosine in blue, as shown in Figure.
Hint: The Unicode for p is \u03c0. To display -2p, use Text(x, y, "-2\u03c0"). For a trigonometric function like sin(x), x is in radians. Use the following loop to add the points to a polyline:
Polyline polyline = new Polyline();
ObservableList
double scaleFactor = 50;for (int x = -170; x <= 170; x++) { list.add(x + 200.0); list.add(100 – 50 * Math.sin((x / 100.0) * 2 * Math.PI));}
(c) Exercise plots the sine/cosine functions.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.