|
From: Leo B. <leo...@um...> - 2020-03-22 19:56:47
|
Here are two other ways to get implicit to do the right thing, besides
using f^(1/3) as I posted earlier. Using the form
unit_step(f-c)
guarantees that the fudge factor epsilon is side-stepped altogether.
(%o41) feq0(x,y):=unit_step(2*y^5-x*y^3+2*x^2*y^2-x^3*y+2*x^5)
(%i42) draw2d(grid = true,ip_grid=[100,100],ip_grid_in=[10,10],implicit(feq0,x,-0.1,0.1,y,-0.1,0.1),terminal=dumb);
0.1 +------------------------------------------+
| : : : |
| : : : |
| : : : |
| : : : |
| : : : |
| : : *** : |
| : : ** * : |
| : : ** * : |
| : : * * : |
| : :** * : |
0.05 |-+........:..........:*....*...:..........|
| : :* ** : |
| : ** * : |
| : * * : |
| : * ** : |
| : * * ****** |
| : * ** *** * |
| : * * *** : * |
| : * ***** : ** |
|**** : ***** : *** |
| ***** : *** *** |
| ******* ** ***** |
0 |-+........:..***************...:..........|
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
-0.05 |-+........:..........*.........:..........|
| : ** : |
| : :* : |
| : :* : |
| : :* : |
| : :* : |
| : :* : |
| : :** : |
| : : * : |
| : : * : |
| : : * : |
| + + ** + |
-0.1 +------------------------------------------+
-0.1 -0.05 0 0.05 0.1
(%o42) [gr2d(implicit)]
(%i43) feq0(x,y) := if is(''f>0) then true else -1;
(%o43) feq0(x,y):=if is(2*y^5-x*y^3+2*x^2*y^2-x^3*y+2*x^5 > 0) then true else -1
(%i44) draw2d(grid = true,ip_grid=[100,100],ip_grid_in=[10,10],implicit(feq0,x,-0.1,0.1,y,-0.1,0.1),terminal=dumb);
0.1 +------------------------------------------+
| : : : |
| : : : |
| : : : |
| : : : |
| : : : |
| : : *** : |
| : : ** * : |
| : : ** * : |
| : : * * : |
| : :** * : |
0.05 |-+........:..........:*....*...:..........|
| : :* ** : |
| : ** * : |
| : * * : |
| : * ** : |
| : * * ****** |
| : * ** *** * |
| : * * *** : * |
| : * ***** : ** |
|**** : ***** : *** |
| ***** : *** *** |
| ******* ** ***** |
0 |-+........:..***************...:..........|
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
| : * : |
-0.05 |-+........:..........*.........:..........|
| : ** : |
| : :* : |
| : :* : |
| : :* : |
| : :* : |
| : :* : |
| : :** : |
| : : * : |
| : : * : |
| : : * : |
| + + ** + |
-0.1 +------------------------------------------+
-0.1 -0.05 0 0.05 0.1
(%o44) [gr2d(implicit)]
Gunter Königsmann <gu...@pe...> writes:
> ********************************************************
> Caution: This message was sent from outside the University of Manitoba.
> ********************************************************
>
> I am still convinced that I have overlooked something important: In all
> examples I could fild the line from the "implicit" graphics object was
> at plus epsilon, never at 0 and I don't really understand why. But for
> all problems I found the attached patch seems to resolve the problem -
> even if epsilon for problems with really big numbers should be outside
> the dynamic range of the floats and for problems that use small numbers
> it feels way too high. What do we do with problems that include both big
> and small floats?
>
> Kind regards,
>
> Gunter.
>
>
> _______________________________________________
> Maxima-discuss mailing list
> Max...@li...
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
|