Books by M. Majewski

MuPAD logo in metalic

About Flash in my Web Site

In this web site many 2D, and in rare cases 3D graphs, are presented as bitmaps. This is often case where the graphics is very simple and contains large empty areas. However, many 2D graphs are displayed as Flash objects. There is a serious reason for this. MuPAD 2.5 produced all its graphics in vector format. Therefore it was quite convenient to embed these graphics into Flash files. The Flash pictures are very crispy and have quite well saturated colors.

For many examples, Flash files are much smaller that GIF, JPG or PNG files. For example, the bird surface, that is presented below in Flash format is only 64kb, while the same file in GIF or JPG was much larger. This picture can be easily resized to any sensible size starting from 10x10 pixels to 1000x1000 pixels without changing the file size and the quality. I am sure that, the size of Flash files for more complex graphics with a lot of patches and lines can be also quite large. In such case I will rather make in MuPAD the grid/mesh size smaller instead of going into bitmap display of graphs.

There is additional benefit of MuPAD graphics in Flash format. Try the right click on such picture and see that you can zoom into any part of the graph or move it in its window. Just check the below enclosed example.

The Rainbow Bird - Flash file 64 kb.

If you have MuPAD installed on your computer, then you can try to develop your own picture of the Rainbow Bird. Just copy the enclosed code into MuPAD notebook, execute the code and experiment with the graph in MuPAD's Virtual Camera. You will get much better quality of the picture if you use larger values of the Grid, e.g. Grid=[50,50].  Note, the code is for MuPAD 2.5. In MuPAD versions 3.x you have to replace spherical by Spherical and adjust a few settings. The code for MuPAD 3.x is enclosed below.

MuPAD 2.5 code

//The Rainbow Bird MuPAD 2.5 code
// M.L.Majewski

//The color function
h := (x,y,z) -> [abs(sin(x)),abs(sin(y)),abs(sin(z))]:

bird := plot::spherical(
   [sin(phi^2*theta), phi, theta],
   phi = -PI..PI, theta = 0..0.5*PI,
   Grid = [25, 25],
   Style = [ColorPatches, AndMesh],
   Color = [Function, h]
):

plot(
   bird,
   Scaling ;= Constrained,
   CameraPoint = [10,-70,10],
   FocalPoint = [0,0,0],
   Axes = None
)

MuPAD 3.x code

// The Rainbow Bird - MuPAD 3.x code
// M.L.Majewski
// The color function
h := (x,y,z) -> [abs(sin(x)),abs(sin(y)),abs(sin(z))]:
bird := plot::Spherical(  
   [sin(phi^2*theta), phi, theta],  
   phi = -PI..PI, 
   theta = 0..0.5*PI,  
   Mesh = [25, 25],  
   FillColorFunction=h
):

camera := plot::Camera([10,-70,10],[0,0,0],PI/100):
plot(  bird, camera,  Scaling = Constrained,  Axes = None)

.