HOWTO: Converting Simple OpenGL Code from C++ to Perl

August 22, 2007

Over the last few weeks I’ve been trying to learn OpenGL. However, I’ve had a miserable time trying to get various implementations of it to work on my Mac, notably with C++ and Java. I was surprised to learn that installing the Perl OpenGL implementation (or POGL) is pretty simple, and that converting OpenGL code written in C++ to Perl is also reasonably easy. The following is a heuristic method you can use to do the same, using an example from the OpenGL SuperBible by Richard S. Wright, Jr. The code is freely available from his site at, and feel free to use my Perl conversion of his code.
Read the rest of this entry »

HOWTO: Call Matlab from Java {Kinda}

July 12, 2007

Looking over some of the reports on my blog reveal that pretty much everyone to this point looking at this blog look at the Java / Matlab post and not much else. Therefore, here’s everything I’ve learned concretely on how to call Matlab from Java and what NOT to do to save you some grief:

What I did:
Make a file that contains all the commands you want to run when MATLAB starts. My script file looks like this (named scriptName):

cd /directoryWithMATLABScript/

The Java code I have used is a modified version of the code here. Now, use the following Java code to call MATLAB with the commands from your script:
Read the rest of this entry »