Installing Firefox 4 in Ubuntu the easy way

By default (at least at the moment) you can’t install Firefox 4 through the official repositories. It’s still at version 3.6.16. But you can install it in 2 simple steps as follows. Fire up the terminal and type:

sudo add-apt-repository ppa:mozillateam/firefox-stable

This will allow you to find Firefox 4 with apt-get. Install by typing:

sudo apt-get install firefox
Advertisements

Compiling GLUT in Linux

This is just a quick supplement to my post on OpenGL on OSX.

To get the same code running under Linux, I simply changed the includes to the following:

#include <GL/glut.h>
#include <GL/gl.h>

…and compiled the code using the following line in the terminal:

gcc glutTest.c -lGL -lGLU -lglut

(Note that I’m using gcc because I’m now compiling a .c file. If it were a .cpp file, I would use g++ instead)

UPDATE:
If you’re getting errors such as ” has incomplete type” or “invalid use of GLvoid”, simply replace all instances of GLvoid with just void, and it should work.

Java 2D Physics Engine Source Code

Check out the source code for the Java 2D Physics Engine on SourceForge.net:

http://sourceforge.net/projects/java2dphysicsen/

Background

I initially started writing code for the purpose of tying together my knowledge on topics I learned throughout this semester in my Computer Science class. As I programmed, I continued to add more and more functionality until I just decided to thumb through my Physics textbook and just make a simple 2D physics simulation.

Continue reading

OpenGL on OSX with GLUT and G++

There’s no doubt that programming with an IDE saves you loads of time with convenience, and ease-of-use. As programmers, we don’t always have the luxury of having a program do all the nasty bits for us, so it’s always good to learn how to program in a text editor (Emacs is a great choice) and how to compile from the command line.

Personally, I like programming in an environment that doesn’t require a lot of overhead, gives me a large amount of control, and lets me see all the little details. I’m going to give a startup tutorial for programming OpenGL with GLUT on OSX (Version 10.5.7), and I’ll be using nothing but GNU Emacs, and g++ (which is an optional install on your OSX Install DVD). More after the jump.

Continue reading

Java 2D Physics Engine (9 hrs)

Yesterday, I started coding a small project in Java, with the intent of practicing some of the techniques I’ve learned in my CS class this semester (swing, threads, etc). It started out small, but every step of the way, I wanted to add something more. Before long, I had kinematic equations and gravity. Now, object collision detection. Granted, all of it needs improvement and polishing, but for a day’s work, I’m pretty happy. Video after the jump.

Continue reading

Why can't more math professors be like this?

I came across this extremely well done video series on the topic of Differential Equations on YouTube today. I don’t understand why more math professors can’t be easy to understand, easy to listen to, and straight to the point like this guy. No wasted time, no boring droning on and on. The best part is, even though he isn’t wasting time, he still makes sure to explain every step he’s doing. No surprises. Video after the jump.

Continue reading