Friday, March 20, 2009

As I mentioned in previous posts, I do some molecular dynamics work. It's helpful sometimes to have cartoon-ish pictures to aid in atomic visualization, especially when describing domains with different types of atoms. I'm also a big fan of really pretty graphics, even at the expense of time. I got a copy of Adobe Illustrator CS3 after using CS for way too long, and decided to play around. After a Google search I found out most of the information I needed, but was unfamiliar with the use of some of the tools. After compiling information from a few different sites, I finally got the hang of it. Still, what's the point in learning if you don't share what you know?

Once you're in Illustrator you're going to want to start with a simple circle. I usually show the grid and set snap to grid via the View menu. Make the path invisible and fill the circle with a solid color of your choice. Next, you are going to use the scissors tool (often hidden under the eraser or knife tool) to cut the circle in half. Do this by actively selecting the circle (so the paths are shown, you can do it with the white pointer known as the direct selection tool). Next, with the scissors tool, click the anchor point at the bottom of the circle, and then again at the top of the circle. If this has been done correctly, the middle point of the circle will suddenly shift right as shown in the pictures. Drag the right half of the circle away and delete the left half. Next, select the right half of the circle and go to Effect -> 3D -> Revolve. Leave the settings as the default, and select the preview box. You should now see your 3D sphere. Feel free to play with the lighting and other options, but I've found the default settings look best.

Thursday, March 12, 2009

Not to many people's surprise anymore, I'm both an engineer and a Mac user. While this would have been a serious anomaly a couple years ago, it seems more and more common these days, especially when working with other Unix/Linux machines. That aside, I had long been plotting all my data using the various functions in Matlab, and for the most part, I was very happy with the results (see here for reference). What I found, however, is that 3D scatter plots came out looking pretty terrible, and my start in molecular dynamics simulations required the scatter plots somewhat frequently.

So, there I was, looking lustfully at the gnuplot demos, so rich in their 3D visualization options. However, after downloading, extracting, and messing around in the terminal I found latest build (4.2.4) was having some issues with the makefile, even after configuration. I searched on the web for a while for some help which was fruitless until I stumbled upon this little nugget, which was a great relief, as I tend to be sort of lazy when sifting through readme's. To be honest, that entry alone has all the information you really need, but it assumes some basic awareness of a few things I hadn't heard about before, so I thought I'd post this information in a more outright manner.

MacPorts: Probably one of the coolest things ever, simple as hell, and quite powerful. MacPorts allows you to install a number of software packages by simply typing "install packagename" in the Terminal. Installation of MacPorts is a breeze once you download their disk image (.dmg) and run their installer (.mpkg), which you can get here.

Once MacPorts has been installed, you'll need to start a new Terminal session. At that point, it's as easy as typing "sudo port install gnuplot" in the Terminal. I'll warn you, this installation can take a while (~30 minutes) as you download and install all the smaller software packages required.

And that's about it. Just start the terminal up and type "gnuplot". If there are any questions, leave a comment. I've only done this on 10.5, but MacPorts claims to support the latest OS, and the last release (10.4 for now). I have no reason to doubt anything they say considering how simple this all was. They should start some funny rumors since their credibility is so high right now.

UPDATE: Thanks to some feedback, I failed to note that you should install X11 and XCode before attempting to install MacPorts. X11 is available on your OS X install disc, and XCode is available (at no cost) on the Apple Developer webpage.

Wednesday, March 11, 2009

March Madness is here and and what better way to keep track of the action than with a scoreboard tracker at the bottom of your screen. Check out the image below:

This is accomplished by combining a python script with the conky variable scroll. The python script will get the data, parse it and put it into a acceptable format for conky to handle the display. I've talked about conky earlier and using displaying the last instant message.

Remember to edit your .conkyrc to run the right path to bottomscore.py. You may need to edit certain parameters for your screen resolution but this should give you a good start. Any questions, post a comment.Pro Tip:To run multiple conky screens:"conky -c .conkyrc2"

When you run the script it will prompt you for the directory, name, and extension of the video file. It will then prompt you for the aspect ratio of video file and run MEncoder to decompress the file to an mpeg format. It will then run DVD Author to write to DVD format and create an .iso file.