Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import geometry;
- import graph;
- import contour;
- size(9cm, 0);
- defaultpen(fontsize(12pt));
- dotfactor = 4;
- picture axis;
- real xmin = -5, xmax = 5,
- ymin = -5, ymax = 5;
- xaxis(axis, xmin=xmin, xmax=xmax,
- Ticks(scale(.7)*Label(align=E, Fill(white) ),
- NoZero,
- beginlabel=false, endlabel=false,
- begin=false, end=false,
- Step=0, step=0,
- Size=0mm, size = 0mm),
- Arrow(2mm),true);
- yaxis(axis, ymin=ymin, ymax=ymax,
- // Ticks(scale(.7)*Label(align=W, Fill(white) ),
- // NoZero,
- // beginlabel=false, endlabel=false,
- // begin=false, end=false,
- // Step=0, step=0,
- // Size=0mm, size = 0mm),
- Arrow(2mm),true);
- real f(real x,real y){
- return (x^2+2*x)*y-2;
- }
- guide[][] Cf = contour(f,(xmin,ymin),(xmax,ymax),nx=400,ny=400, new real[]{0}, operator ..);
- draw(Cf[0], green+1pt);
- label("$x$", (xmax,0), 2S);
- label("$y$", (0,ymax), 2W);
- //label(scale(.7)*"$0$", origin, S+W, UnFill);
- ylimits(ymin, ymax, Crop);
- add(axis);
- addMargins(2mm,2mm);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement