Stretto

145 Reputation

5 Badges

1 years, 69 days

MaplePrimes Activity


These are replies submitted by Stretto

@acer 

 

First thing I tried was insequence but it failed and just showed all the frames as individual plots... Any two animations will do

 

animate(plot,[f(x*t),x=-5..5],t=0..1)

animate(plot,[g(x*t),x=-15..15],t=0..1)

 

They have the same number of frames, and same time range... just different x and y scale which is irrelevant since they will be on different plots.

 

@Christopher2222 

 

The reason to use numpoints is that it helps evaluate discontinuous or "noisy" graphs more accurately... but then one ends up with a curve that looks worse off visually.

 

It seems to be aliasing and line thickness. As if there is some check that if numpoints > threshold it doesn't anti-alias it.

 

It may be that with fewer points maple is building a spline for the points and that it uses a thinner line... but if the points are large enough it just draws the points, and uses thick points. That is most likely going on. I guess I could find the exact threshold:

plot(sin(x),x=1..4,numpoints=100);<- good

plot(sin(x),x=1..4,numpoints=1000);<- good

plot(sin(x),x=1..4,numpoints=2000); <- bad

plot(sin(x),x=1..4,numpoints=1999); <- good

 

So, in fact, it is 2000. Internally when setting numpoints > 2000 the curve looks to be unaliased.

 

This almost definitely means that it is an internal issue with plot and numpoints. Anyone can bring this to the attention of the maple dev team?

@Carl Love 

 

It seems to be working, although I get a strange result with a cut off sinc function.

 

I didn't realize maple had such issues with piecewise. Maybe fourier function should do the conversion internally.

 

Thanks

@Carl Love 

 

Because they are not the same functions.  The function is used in other places where it does matter.

 

I also use the piecewise for other reasons such as clamping the functions to a finite range to see the transform effect. So all you have successfully done is pushed the issue in to handling another special case. I would like a general case so that no matter what function I have, as long as it has a fourier transform, I would like to be able to plot it.

 

What happens when I stick more complicated functions in and it keeps crapping out? Why is it doing it? Surely it can sample the function numerically and coompute the fft to plot it if necessary?

1 2 3 4 5 6 Page 6 of 6