Undergrad Class Assignments

Old fun stuff, mostly in Portuguese

Undergrad Class Assignments

These are some class assignments I did when I was an undergraduate Computer Science student. If nobody find them useful, they’ll at least help me to remember some of the assignments I enjoyed most.

The majority of the stuff here (specially the older ones) are in Portuguese.

All the software available here is licensed under the Cursing License (which I haven’t written yet — but I will write it someday).

LMB Edit

A little text editor, written in Pascal, sometime around the year 2000. There are two versions of it:

  • The first one is simpler and pretty stable. [ZIP (27kB) with the sources and an executable (DOS)]

  • The second one has basic syntax highlighting (shows keywords in a different color), but also has a bug which causes crashes from time to time. [ZIP (32kB) with the sources and an executable (DOS)]

LMB Raízes

A program to create family trees, written in Pascal. This is, I think, from the year 2000. By the way, “raízes” means “roots” in Portuguese. [ZIP (13kB) with the source code]

Support for Generic Programming in Languages

A short introduction to generic programming and how it is supported by different programming languages. Written in 2001 or 2002, when I felt particularly attracted by “creative” applications of C++ templates. In Portuguese. [PDF (224kB)]

A Formal Definition of the LM Programming Language

LM is a functional programming language. LM is not ML. LM means “Leandro Motta”, after its creator. Or “Lingua Morta”1, since all its reserved words come from Latin. In Portuguese. [PDF (136kB)]

LMBov-Ray: The Blindness of Vision Raytracer

A reasonably simple raytracer, created in an Advanced Computer Graphics course, in 2002. Written in C++. [tar.gz (18kB) with the sources.]

The images below were created with LMBov-Ray. To create much better images, use POV-Ray.

LMBov-Ray: Spheres, shadow and translucency

LMBov-Ray: Spheres, shadow and translucency.

LMBov-Ray: Constructive Solid Geometry (CSG)

LMBov-Ray: Constructive Solid Geometry (CSG).

LMBelleArts

A non-photorealistic renderer (NPR) written in C++ in 2002. Renders 3D models (in the OBJ format) in a way that they vaguely remember a pencil drawing. [tar.gz (874kB) with the source code and some 3D objects.]

To make it clearer, here is an example. To the left, there is a 3D model as it would be normally rendered (Gouroud Shading), and to the right, its NPR version by LMBelleArts:

Skull (Gouroud e LMBelleArts)

Skull (Gouroud and LMBelleArts).

Here are a few more examples:

Geri

An implementation of the Catmull–Clark algorithm for subdivision surfaces. Created in a course on Special Topics on Computer Graphics, in 2003. [tar.gz (17kB) with the sources.]

In another thousand words:

Example of subdivision surface

A 3D model with low polygon count (left) has its faces successively subdivided, producing a smoother model (right).

By the way, this technique was used to create Geri, the title character on Pixar’s short movie Geri’s Game.

Auto Solo Solver: A Program Without a Polite Acronym

An automatic solver for the peg solitaire game. Does a simple depth-first search, plain and simple brute force. Created for the Artificial Intelligence course, in 2003. [tar.bz2 (5.5kB) with the sources.]


  1. Portuguese for “dead language”. [return]