contour_plot and implicit_plot terrible resolution and cutting graph
Subject: contour_plot and implicit_plot terrible resolution and cutting graph
From: Mario Rodriguez
Date: Fri, 19 Aug 2011 16:40:54 -0400
On 08/18/2011 11:58 AM, Andres Cimmarusti wrote:
> Hi, I'm using wxMaxima 0.8.5 atop maxima 5.21.1 on Debian Squeeze.
>
> I need to graph the following expression that I have defined as a
> function in maxima:
>
> ygs(x,C,d,t) := x * ( ( 1 + 3 * C / x * log( 1/2 + 1/2 * sqrt( 1 + 8 *
> x / ( 3 * ( 1 + d^2 ) ) ) ) )^2
> + ( t - 3 * C * d / x * log( 1/2 + 1/2 * sqrt( 1 + 8 * x / ( 3 * ( 1 +
> d^2 ) ) ) ) )^2 );
>
> So I'm using both implicit_plot and contour_plot as follows:
>
> implicit_plot( ygs(x,8,d,0) = 100 , [d,-20,20] , [x,0,120] )$
>
> contour_plot( ygs(x,8,d,0) , [d,-20,20] , [x,0,200] )$
>
> As soon as you do this you will notice 3 things:
>
> 1. The plot where ygs(x,8,d,0) = 100 is incomplete! it has a gap in the middle
> 2. There appears to be a mysterious line running parallel to the d-axis
> 2. The resolution is quite poor
>
> Now for what I'm doing both x and the value of the function, that is
> ygs, cannot possibly be negative, but I decided to give this a try:
>
> implicit_plot( ygs(x,8,d,0) = 100 , [d,-20,20] , [x,-200,200] )$
>
> So the mysterious lines running parallel to the axis are explained.
> But I don't want these to show in the plot and interfere with the
> display of the graph I do want.
>
> Therefore I have the following questions and comments:
>
> 1. Is it possible to tell contour/implicit_plot's numerical solver to
> disregard anything where x< 0 and/or ygs< 0 ?. I tried using assume
> but it seems to be ignored.
> 2. Is this why there is a gap in the plot?
> 3. Is there a way to increase the resolution so that the plot traces
> don't look so bad? I couldn't find anything in the maxima help.
> 4. Is this a bug? if so, is this the proper place to report it?
> 5. For comparison I ran roughly the same commands in Mathematica 8.0.1
> for Linux and it had no trouble displaying this curve and it displayed
> nothing running parallel to the axis
>
> Thanks in advance for any assistance!
>
> Andres Cimmarusti
>
> PS: I have reproduced the same issue running wxMaxima 11.04 atop
> 5.24.0 on Debian testing
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
Hello,
You can try the draw version for implicit functions; it seems to work
better for this example. Relevant options are 'ip_grid' and 'ip_grid_in':
load(draw) $
draw2d(
ip_grid = [80,80],
ip_grid_in = [10,10],
implicit(ygs(x,8,d,0) = 100, d,-20,20,x,0,200)) $
--
Mario