Merry Christmas! : ) |
The original picture of Jokerman font found on the web:
(1)The easiest step: Find the font you want on the web
(2)Use Binarize[ ] to create a binary(0 is black,1 is white) image of the original picture. After that, use ImageTake[ ] to take out each alphabet.
The 2 binarized images:
(3)Use ImageTake[ ] again to take out each alphabet and use ColorNegate[ ] to create figures like the following:
The reason for using ColorNegate[ ] is because I will use the value of each pixel as the z value in 3D space (x,y,z), so color white indicates z=1, color black indicates z=0.
Note: If you use drawing tool to modify your pictures, remember to Binarize[ ] the modified pictures again even if the color you use in modification is the same as the color on the picture or Plot3D will take forever to draw the result!!
(4)Use ImageDimensions[ ] to measure how many rows and columns of pixels in each alphabet.
(5)Use a list as a container to store these data(alphabet figure, its' dimensions) into corresponding variables. For instance:
(6)Thanks to the new Texture[ ] function in Mathematica 8, it's very easy to apply texture on anything you drew, whether it's 2D or 3D.
2 images of plastic texture I found on the web:
Set up the following function:
Comment: use ImageValue[ ] as the function to be drawn by Plot3D[ ] |
(7) Use the function and produce a single character:
DA LA!! You got A! Good job, dude!! |
If you want to create a series of characters like the picture at the beginning of the post, just use Map[singleC,{W,o,r,l,d,P,e,a,s,e}], or singleC/@{W,o,r,l,d,P,e,a,s,e} will also do the job. I have built data for all non-capital alphabets but not all capital alphabets, you can do that easily in my notebook since I list out all the functions I used.(Beware that some capital alphabet are built-in symbols of Mathematica so they're protected.)
Here's the link for you to download the notebook:
the main program
http://www.megaupload.com/?d=RH97O32C
the output of singleC[ ] using "Merry Christmas" as arguments http://www.megaupload.com/?d=Q488CC09
p.s. If you find the links are not working or the download speed is a disaster, feel free to leave a comment: )