
The goal of this project was to write a program in C that would write graphical representations of brick walls to vrml files for viewing in vrweb.
This entailed first defining all the variables that define a brick wall:
The second part was writing functions that sequentially broke the task down into
managable tasks: DrawBrickWall(draws a brick wall) ->
DrawBrickRow (draws a row of bricks) -> DrawBrick
(draws a brick).
DrawBrickWall -simply calls DrawBrickRow
until all the rows are drawn.DrawBrickRow -calls DrawBrick until
the row is drawn.DrawBrick -writes a cube primitive into a vrml file.I used a random number generator to randomly color the bricks so that the individual bricks could be seen. Otherwise they would have appeared as one object when shaded, and been revealed when manipulated in wire-frame.
I encountered a number of problems throughout this project.
DrawBrickRow caused the mostI initially intended to make this program interactive. Consequently I planned a two stage program development project:
Write a program to draw a brick wall using hardwired variables.
Test and debug the program by changing variables.
Modify program to run interactively by calling function that queries the user for the variable values for various dimensions and options such as:
I was not able to start the second part due to time constraints, but I consider the first to be successful and the code to be fairly robust.
DrawBrickWallp1.c




