Euler Math Toolbox 2014-02-10

In the new version I have improved the anti-aliasing of images, and apply it to the images in the graphics window too. Computers are now fast enough to support this. Here is an example.

demos

The old version used the Windows API with special flags to smooth images. You can revert to this method if it is faster on your machine. On very old machines, it might be necessary to turn off anti-aliasing at all. Here is the same image with the old method.

demosold

I tried to use Direct3D for this. But the results were disappointing. My algorithm for anti-aliasing is rather simple. It produces the image with three times magnification, and then reduces it using a partition of unity, which involves 5×5 neighboring pixels of the original image for each new pixel in the reduced image.

The function plot2d() now got a parameter „smaller“, which allows more space at the left of 2D plots.

>plot2d("exp(x)",1,10,yl="exp(x)",xl="x",smaller=3):

Changes-003

There is another frame type of 3D plots.

>plot3d("exp(-x^2-y^2)",r=3,>spectral,frame=3,n=100,grid=12):

Changes-002

Moreover, I now allow control structures in multi-lines. This is due to user request and indeed might be useful.

>x=1; repeat; ...
>x=(x+2/x)/2; until x^2~=2; ...
>end; x,
 1.41421356237

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.