island of fear

the island

for the final project, we were suppose to combine techniques from all the other homeworks. texture, lighting, animation, etc.

i decided to create a 3d world to walk around in. there are many examples of this kind on the internet but i wanted to try doing it on my own.

first thing was to create a system which would read a flat “height map” file. the data was mapped onto a grid of triangles and then a texture was applied to each triangle. here are the height map and texture:

earth hmap
 
earth texture

the challenge for this project was making the “player” move around the world properly. the idea was to keep the player walking on the surface of the ground (and not through it).

it was pretty cool to walk around a 3d world of my own creation.

homework 4 – part 2 (lipstick towers)

lipstick towers

in the second part of homework 4 we were to explore “pilotview” by creating a little flight simulator. this was a fun assignment — the trickiest part was calculating the position of the craft based on yaw, roll, pitch and velocity.

like all the rest of the homework projects, this was written in ruby. initially i wasn’t sure if ruby would make it this far — but it has and done so quite well.

homework 4 – part 1 (robot arm strikes back)

arm lighting

in homework 4 we explored lighting. here is the latest version of the robot arm, now featuring color and lighting effects.

homework 3 – skellington fingers?

arm in action

here is homework 3 – a robot arm with all kinds of parts in it. the goal of the exercise was to play with tranformations.

robot arm – design

robot arm sketch

getting ready to build a more complex version of the robot arm. here is the preliminary sketch. i wanted long skinny fingers like jack skellington.

lab 2 – robot arm redux

robot arm 2

for the second lab we were suppose to experiment with transformations by working on a robot arm (again). in lab1, i positioned the arm pieces by trial-and-error. in this lab, the robot arm was recreated from scratch and the position of each piece was planned on a sheet of paper.

as expected the order of the transformations are critical. i tried doing various combinations to see what would happen – it was weird but fun.

the screen shot only shows a single claw – didn’t have time to add the other two.

homework 2 – simple paint program

simple paint program

here we go with homework 2, a “simple paint program” written using opengl and glut. like the past couple of efforts, this program was written in the ruby programming language.

the annoying part of doing this program was dealing with the tool panel – which is a viewport. actually the annoying part was getting the coordinates to draw it. it was also interesting to deal with converting the screen coordinates into the “world” coordinates since the world can be panned and scaled.

the fun part was making the program “preview” the shapes as they are being drawn (the screenshot shows a circle in the process of being drawn).

lab 1 – attack of the robot arm

robotarm

here is the “robot arm” that we did in lab last week. there are some strange tricks involved with compound transformations (transform, rotate, scale). the code was simply an expansion of the base code used for homework 2 (ruby). the keyboard is used to operate the arm. the mouse is used to manipulate the “world”.

download the robot arm windows executable

homework 1 – basic opengl primitives

screenshot of hw1
this is homework 1. it’s a ruby program. all images are rendered using opengl (actually very crude opengl). the original image was drawn on a grid and then converted by hand into a series of coordinates. the code essentially uses each one of the opengl primitives to render the coordinates into shapes.

you can’t see it in the screenshot, but there are some smooth color transitions on the background (“the effects wall”). while the program is running pressing the ‘z’ key changes the wall patterns, pressing the ‘a’ key cycles the colors. the shapes in the background are animated and constantly move around (each vertex has a velocity).

download a windows executable version of the code.

ruby ruined me

last semester i took prof. lacambra’s unix class. we had to develop a final project using perl, python or ’something else’. i decided to do ’something else’ and selected the ruby programming language as the tool.

i was interested in ruby as an elegant, object oriented programming language. it isn’t as mature as perl, python, php or the other tools, but several large web development shops recently began using ruby with great results.

although it was frustrating at times, my experience with ruby was very positive. it was elegant and expressive. code is easy to read and easy to write. everything is an object and has associated methods (even basic type like integers and strings).

and so, i was delighted to learn that ruby has opengl, glu and glut built right in. in fact the windows version even installs with a bunch of sample opengl programs. try it, see what you think. but i’ll warn you now — it is hard to go back to other languages after using ruby (why can’t everything be this simple?).

link to ruby for windows installer
link to ruby programming language home page