From: Robert D. <rob...@gm...> - 2023-06-08 15:23:34
|
On Thu, Jun 8, 2023 at 6:08 AM Gunter Königsmann via Maxima-discuss <max...@li...> wrote: > Not a bug - and arguably not even avoidable. But this week I found a fun example of the adaptive plot routine creating an alias effect: > > draw2d( > explicit(sin(x*81),x,1,10) > )$ Haha, that's a good one. Here's a way to have some more fun with it. Capture the points at which sin is evaluated and then plot those along with a smoother (greater nticks) version. foo(x):=block([y:sin(x*81)], push ([x,y],L), y); L: []; plot2d(foo,[x,1,10]); /* shows a straight line */ plot2d ([sin(x*81), [discrete, L]], [x, 1, 10], [nticks, 87], [style, lines, points]); Now the line plot shows the sine waves as expected, overlaid with the points from before. Zooming in on the plot shows how the points fall on successive waves. I suspect any adaptive plotting routine can be fooled -- I don't feel much motivation to modify Maxima's existing adaptive plotter, although we might consider increasing the default value of nticks. best Robert |