This was a project from my Computer Graphics course at Marshall University. The mountains are randomly generated from a normalized pseudo-random number generator and a fractal function. Every time you resize the windows or launch the program, they are drawn differently.
Category: C / C++
This program was an assignment for my Programming Languages course. The idea is to implement a simple pseudocode interpreter which has very basic functionality as well as a contiguous memory store. Here is how it works:
- You feed the program a CRLF seperated list of valid syntax. In this case, the file “pseudocode.txt” which should be in the same directory as the program (no file picker implemented).
- The program reads, parses, and executes the given instructions
- Any errors that are found are reported, else the program runs until STOP instruction or EOF.
This is esentially the same thing as the code from 3D wireframe except now it has textures. Instead of GL_LINE_LOOP as in the last example, the solid was rendered using GL_POLYGON and colored accordingly.
This is a simple program to show dynamic lighting. The heavy lifting is done in the shadePolygons() function which determines the luminosity of the surface of the cube according to the angle.
The textures in this small program were generated procedurally and added to 3 sides of a cube. If you look at the sourcem the createTexture functions actually create the three textures. After created, the textures are then added onto a GL_POLYGON. Finally, simple lighting and rotation is added.
This is a walkthrough with a bunch of random items. Included are: a giant pyramid (hide it by pressing the p key!), a snowman, a bird, a torus, a rotating texture, and a golden spiral of teapots in the background.
Look at the myKeyboard() function to see what keys move. This program also relies upon texture.bmp as well as grass.bmp and BitmapLoader.h in order to run.