Friday, April 27, 2007

ALBERTA on Mac

System: MacBook Intel-Mac OS X 10.4


1. Make sure development libraries are installed.

They are available from OS X installation DVD. Or you can go to HPC for Mac. They have everything.

2. If you want to use gltools, see the following instruction by Omar Lakkis.

Before installing gltools, one must make sure GL are present. A quick check can be performed by doing

$ locate libGL.a
[which in my case gave me]
/usr/X11R6/lib/libGL.a
[this information is important for later.]

and
locate include/GL

/usr/X11R6/include/GL
/usr/X11R6/include/GL/gl.h
/usr/X11R6/include/GL/glext.h
/usr/X11R6/include/GL/glu.h
/usr/X11R6/include/GL/GLwDrawA.h
/usr/X11R6/include/GL/GLwDrawAP.h
/usr/X11R6/include/GL/GLwMDrawA.h
/usr/X11R6/include/GL/GLwMDrawAP.h
/usr/X11R6/include/GL/glx.h
/usr/X11R6/include/GL/glxext.h
/usr/X11R6/include/GL/glxint.h
/usr/X11R6/include/GL/glxmd.h
/usr/X11R6/include/GL/glxproto.h
/usr/X11R6/include/GL/glxtokens.h
/usr/X11R6/include/GL/osmesa.h

INFOS TO RETAIN FROM HERE ARE:
the lib directory /usr/X11R6/lib and the include directory /usr/X11R6/include

Now we must edit the Makefile, namely
[here we use the information retained above from checking the presence of GL]
-----------------------------------------------------------

######
#uncomment or correct these
LIBRARY_PATH=-L/usr/X11R6/lib #this is changed from original
INCLUDE_PATH=-I/usr/X11R6/include #this is changed from original
#GL_LIB=MesaGL

CC=gcc #this is changed from original
CCOPT=-O2

------------------------------------------------------------

Then

# make lib

# make bin


3. Then just config and make install; see my old post.

Before "config", do the following

ln -s /usr/include/malloc/malloc.h /usr/include/malloc.h

otherwise it cannot find the head file "malloc.h".


It seems dynamic library does not work for Alberta on Mac. But if you add an argument "-static" to "EXTRA_LIBS" in "include/Makefile.alberta". I would like to know if there is any other way out.


Acknowledgment:

I would like to thank Dr. Omar Lakkis and Dr. Andera Bonito for sharing their invaluable experience.

Thursday, March 29, 2007

Generating 3D Pictures in PSTricks for TeX

Sketch is a small, simple system for producing line drawings of two- or three-dimensional solid objects and scenes. It began as a way to make illustrations for a textbook after we could find no suitable tool for this purpose.

Existing scene processors emphasized GUIs and/or photo-realism, both un-useful to us. We wanted to produce finely wrought, mathematically-based illustrations with no extraneous detail.

The input language is reminiscent of PSTricks, so will be easy to learn for current PSTricks users.

It is easy to use and works across platforms!

Download

Documentation

Install

Thursday, March 22, 2007

Using SpeedDownload to replace Mac default download software

SpeedDownload works fine with FireFox + FlashGot(add-on).

It makes downloading and uploading much faster.

Friday, March 09, 2007

Using LaTeX in Your Blog

Here is an interesting tool to input LaTaX in your blog: LINK

Wednesday, February 28, 2007

Gmail keyboard Shortcut

Firefox + Gmail is a good solution to mail, better than Windows Mail, Outlook, and Mozilla Thunderbird. Mac Mail is the best but I lost my mac.

With those shortcut, you can mange Gmail efficiently. (Sorted by my usage.)
  • g i go to inbox
  • x select conversation
  • s star
  • y archive
  • c compose
  • / search
  • g a go to all mail
  • g s go to starred mail
  • o open
  • u return conversation list
  • m mute
  • ! report spam
  • r reply
  • a reply all
  • f forward
  • k move to newer conversation
  • j move to older converstation
  • n next message
  • p previous message

EMacs+AUCTex

This is the best solution for writing Latex. There is a fundamental question for all latex editors: how to jump between latex source file and output dvi/pdf file? In Mac, TexShop provides a simple and good solution: Apple + CLICK will try to match locations of source file and pdf file. Lyx and Texmacs are WYSIWYM editors. The price you pay is the slow typing speed (the desirable typing speed will simulate your thinking) and difficulty of collaboration. Preview-latex, a built-in package of AUCtex, strikes a balance. Let me copy the following paragraph from preview-latex manual:

WYSIWYG (what you see is what you get) sometimes is considered all
the rage, sometimes frowned upon. Do we really want it? Wrong
question. The right question is _what_ we want from it. Except when
finetuning the layout, we don't want to use printer fonts for on-screen
text editing. The low resolution and contrast of a computer screen
render all but the coarsest printer fonts (those for low-quality
newsprint) unappealing, and the margins and pagination of the print are
not wanted on the screen, either. On the other hand, more complex
visual compositions like math formulas and tables can't easily be taken
in when seen only in the source. preview-latex strikes a balance: it
only uses graphic renditions of the output for certain, configurable
constructs, does this only when told, and then right in the source code.
Switching back and forth between the source and preview is easy and
natural and can be done for each image independently. Behind the scenes
of preview-latex, a sophisticated framework of other programs like
`dvipng', Dvips and Ghostscript are employed together with a special
LaTeX style file for extracting the material of interest in the
background and providing fast interactive response.

Wednesday, November 15, 2006

A New Version of AFEM@matlab released!

In this new version:

1. Many not so efficient commands are replaced by more efficient ones.

2. More comments are added.

3. A new test example Lbig is added. In this example, the maximal degree of freedom is about 110,000. It costs only 60 sec on a Pentium IV 1.4GHz desktop PC.

4. Corrections made according to the M-Lint suggestions.


To download the package, go to:

Matlab Central File Exchange

M-files Database.