Homework 3
Short Description:
Write a utility library to display text in a given format.
This assignment is worth 50 points.
Goals
When you finish this homework, you should
- Become familiar with transforming objects.
Formal Description
Create a library which will allow you to display text in openGL program.
You may accomplish this any way you wish, a text object or a series of routines, but you need to be able to accomplish the following:
- Display text left justified.
- Display text right justified.
- Display text right centered.
- Given a string and a justification, return the lower left and upper right coordinates of a bounding box for this text.
Some discussion points:
- Multiple lines will be marked with a '\n'.
- All text should begin at 0,0 and be written along the positive x axis
- Additional lines should be displayed along the negative y axis.
- All text should have proportionality preserved, but be one unit high.
- Your library should be in separate files (so it can be used in multiple projects). It should include a header and an implementation file.
Using your new library, write a program which will display the following
- "Computer Graphs\nCSCI360" in the first quadrant, spinning along the center line of the text parallel to the y axis. as a unit. This text should be centered. Letters in this section should be one unit tall.
- "Text In OpenGL" in the second quadrant, each word spinning independently at different rates. The first word should spin around a line parallel to they axis. The second should spin around a line parallel to the x axis and the third in a line parallel to the z axis. Letters in this phrase should be 2 units tall.
- In the third quadrant you should simulate the opening credits from Star Wars, but using your own multi line message. This should be left justified (or better yest, fully justified).
- In the fourth quadrant, display a two line phrase which is right justified and follows some form of circular path. The text should be 1/2 unit high. The path can be a circle, ellipse, lemniscate. ...
You should create a Makefile which will compile this program. This file should be called Makefile and contain the following lines:
Submission
You should email tar file as an attachment to a message to danbennett360@gmail.com. This tar file should contain all of the source code required to generate your project, a Makefile, and the README file.