This is kind of getting old. How do programs implement implicit
plotting, say of F(x,y) = 0? Is it something we could just
implement in two hours?
Do they;
(1) For symbolic expressions try to solve for one variables (say y)
using a symbolic solver, and if so plot the union of all solutions y =
.... that are real?
E.g., to plot y^2 - x^3 - x implicitly, one could do:
sage: var('x,y')
(x, y)
sage: solve(y^2 - x^3 - x == 0, [y])
[y == -sqrt(x)*sqrt(x^2 + 1), y == sqrt(x)*sqrt(x^2 + 1)]
then just plot each of those two above and combine them.
(2) If solving symbolically fails, or is impossible, e.g., if the
input is a Python function
with no symbolic meaning, fall back to some uniform sampling of the rectangular
region where we are plotting the function. In this case, we are really
iteratively finding
solutions to an equations F(x,y) = 0, and plotting a dot or something
at every point
we find, and possibly connecting the dots. How does one do that.
I think (1) above would already be pretty useful and easy to implement.
I bet Josh Kantor or Carl Witty will have something to say about (2).
And if I'm just completely wrong about what to do, then that's good too because
it's about time to discuss this.
> In the case of the circle, you can parameterize it and use parametric_plot,
> http://www.sagemath.org/doc/html/ref/module-sage.plot.plot.html#l2h-564
> In the case of a curve F(x,y)=c, you can use contour plot
> http://www.sagemath.org/doc/html/ref/module-sage.plot.plot.html#l2h-575
> If you install the gnuplot package then you can use the maxima
> interface to gnuplot (maxima has implicit plot
> http://maxima.sourceforge.net/docs/manual/en/maxima_55.html#IDX2072)
> I think if you install the fricas4sage page then you can use that package for
> implicit plot, though I haven't tried that.
>
>
> On Jan 19, 2008 3:44 AM, Dagda <phyzik...@gmail.com> wrote:
> >
> > Hi,
> > I was wondering if there was a way to plot relations implicitly, in 2D
> > and/or 3D. A simple example would be to plot a circle with something
> > like the following:
> >
> > plot_implicit(x^2+y^2=1)
> >
> > Thanks!
> > -Pavan
> > >
> >
>
> >
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org