How to plot circle with Maxima?

9.7k Views Asked by At

I cannot get equitation plotted

Expression:

f1: (x^2) + (y^2) = 9;

I try this command:

wxplot2d(f1, [x, -5, 5], [y, -5, 5]);

And it gives:

plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: nothing to plot.

What is correct way to plot such expressions?

3

There are 3 best solutions below

0
On BEST ANSWER

Comment turned answer by request. One can plot the circle as an implicit plot. $$ \begin{align} & \text{load(draw);}\\ & \text{draw2d(implicit(x^2+y^2-9,x,-4,4,y,-4,4));} \end{align} $$

0
On

There are 4 methods to draw circle with radius = 3 and centered at the origin :

  1. load(draw); draw2d(polar(3,theta,0,2*%pi));
  2. load(draw); draw2d(ellipse (0, 0, 3, 3, 0,360)
  3. plot2d ([parametric, 3*cos(t), 3*sin(t), [t,-%pi,%pi],[nticks,80]], [x, -4, 4])$
  4. load(implicit_plot); z:x+y*%i; implicit_plot (abs(z) = 3, [x, -4, 4], [y, -4, 4]);

Your function is implicit and multivalued

HTH

0
On

I ended with qdraw:

(load(draw), load(qdraw));
f1: (x^2) + (y^2) = 9;
qdraw(imp(f1, x, -4, 4, y, -4, 4));