I'm trying to develop an implicit plotter.
For example, if I want to draw a parable, x will vary and y will be computed for corresponding x values.
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.beginPath();
// y = (x-5)*(x-5)
var iPoints=20,
nY=0;
for (var x=-10; x<=iPoints; x++) {
nY = ( (x-5)*(x-5) );
ctx.lineTo(200-x, 300-nY);
}
ctx.stroke();
Or see here https://jsfiddle.net/a0gLqrvr/
But how can I plot an implicit function?
For example:
x^3 + y^3 = 3*x*y^2 - x - 1
How can I vary x and y simultaneously?
Could you show me by means of an example for some points (maybe in jsfiddle )?
Thanks in advance.