A Little Humour

Will's picture

This might give you a bit of a laugh:

This is the latest comic from XKCD a webcomic that often posts funny, geeky comics. My personal fave is this one.

Comments

that is really funny. good

that is really funny. good post.

comic

That's a good one, Will.

gkokovidis's picture

A Little Humour ^2

I kind of like this one as well.

Georgios Kokovidis

alec's picture

A Little Humor in Maple

Now, how can that be done in Maple?

In Classic Maple (that doesn't work in Standard Maple),

with(plots): display(textplot([[0,1,"a"],[0,0.3,"a"]],font=[TIMES,ITALIC,160]),
  textplot([[1,0.8,"1"],[1,0.1,"2"]],font=[TIMES,ROMAN,80]),
  textplot([[-1.5,0.3,"["],[2,0.3,"]"]],font=[TIMES,ROMAN,320]),
  view=[-1.5..2.5,0..1.4],axes=none);

Now, put the mouse pointer over the plot, click the right button, and click on export as jpg. I saved it as "humor.jpg".

Note that setting plotdevice as jpg, bmp, or tiff (and they are the only formats supported by ImageTools) won't work - their drivers ignore the font size and produce a completely different picture because of that. So one has to export plot manually.

Now,

with(ImageTools):
A:=Read("humor.jpg");

                   [ 1..483 x 1..483 x 1..3 3-D Array ]
              A := [ Data Type: float[8]              ]
                   [ Storage: rectangular             ]
                   [ Order: C_order                   ]

B:=Array(1..483,1..483,1..3,(i,j,k)->A[484-j,i,k],datatype=float[8]);

                   [ 1..483 x 1..483 x 1..3 3-D Array ]
              B := [ Data Type: float[8]              ]
                   [ Storage: rectangular             ]
                   [ Order: Fortran_order             ]

Write("humor1.jpg",B):

display(Preview(B),axes=none);


The actual size of that plot in Maple is smaller than here - I used humor.jpg (slightly edited by deleting some white space) and humor1.jpg in this post.

_____________
Alec Mihailovs
http://mihailovs.com/Alec/

jan's picture

In the next release of Maple ...

you will be able to do this:


with(ImageTools):
A:=Read("humor.jpg");
B:=Rotate(a, 90);
View(B);

Jan
Applications Engineer, Maplesoft

alec's picture

That's interesting

Jan,

Even if rotation on 90, 180, and 270 degrees can be done quite easily (as in that example), it is certainly good to have a command for that. What values for the second argument will be possible? Would that be possible to rotate on 30, or 60 degrees?

What about reflections? And homothety? Crop? I am anxious to get Maple 11 to see what other editing operations are available.

Wow, I just noticed View instead of Preview. Does that mean that the picture (or plot) will be displayed in all available space (and without axes)?

Thank you,

__________
Alec Mihailovs
http://mihailovs.com/Alec/

jan's picture

ImageTools improvements ...

Hello Alec,

Here are some improvements to the ImageTools packages:

- Thre rotations will be limited in steps of 90 degrees.
- The viewer will launch external Maplet viewer, that can display one or more images.
- cropping and combining images together
- some intensity manipulations
- support for colour images using RGB, YUV, and HSV colour spaces
- image thresholding

The next release of Maple is currently in beta right now, so you should be able to try some of these out.

Jan
Applications Engineer, Maplesoft

alec's picture

Beta

New features seem very exciting. I certainly agree that I should be able to try them out. However, I don't have an access to beta.

__________
Alec Mihailovs
http://mihailovs.com/Alec/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}