Plot Points 6
Select an example to enter its points into the form and display the curve.
Sine wave | y = a sin x |
Cosine logo | y = a cos (bx) cos (cx) |
Circle | r = a |
Spiral | r = aθ |
Parabola | y = ax2 + bx + c |
Cubic Equation | y = ax3 + bx2 + cx + d |
Hyperbola | |
Cardioid | r = a + b sin θ x = –r cos θ y = –r sin θ |
Heart | x = 16 sin θ sin2θ y = 13 cos θ – 5 cos 2θ – 2 cos 3θ – cos 4θ |
Limacon | r = a + b cos θ |
Rose 3 | r = a cos 3θ |
Rose 5 | r = a cos 5θ |
Lemniscate | r = √ (sin 2θ) |
Butterfly | r = 1 – cos 2θ sin 6θ |
Enter an expression to plot.
The expression must be something that JavaScript can evaluate. It should use the variable x as an independent variable. The expression will be evaluated over the independent variable range –180 to 180, incrementing by 1.
Example: 0.66 * x + 17
Example: 100 * Math.cos (x / 12)
Notes.
- 100 and 12 are scale factors that let us see the curve better.
- You must use the * operator for multiplication.
- To use trigonometry and other functions, you must invoke the Math library.
- To use a function, you must put the arguments in parentheses.
- Enter polar expressions using x, which will be treated as θ to compute r.
Canvas. The drawing canvas extends from (–180, –120) to (180, 120). However, the program will scale your coordinates to fit the screen.
How to use. Paste your coordinates in the Points tab. Coordinates can be separated by spaces, commas, new lines, or any combination of those.
Closed Polygon. Connect the last point back to the first, for example, when plotting a circle.
Polar Coordinates. The pairs are (r, θ). This is standard practice.
About This Project. My C++ class needs a way to verify that the coordinate pairs generated by their programs were correct. This simple HTML form allows them to test their programs.