Modeling an Engine


Alan Jaynes
17.Mar.2004
California Polytechnic State University
CSC 471 - Winter 2004

 

 



 

 

 

 

| Introduction |

| Description |

| User's Manual | | Sample Output |

In a nutshell, my final project allows you to create an engine of almost any size and view the resulting machine in motion.

The engine is fully customizable - an Engine object can be instatiated with any number of cylinder pairs, bore, stroke, and bank angle. If you are really into car engines, try entering a few data values for a real engine. The only limits on size and shape are your imagination. Oh, and the inline engine. It's quite difficult to put two cylinders partially insideeach other and have their pistons move freely in that space. Go figure. The sample output page has an illustration of the available variability.

Technique

While the overall product may look somewhat simplistic, 35 hours of my life says otherwise. Granted, a good portion of the time was spent playing guess and check with advanced addition and subtraction equations.

The engine is modeled in slices, with each slice containing one pair of cylinders. The cylinders are offset from one another, just like real cars, and so the cylinders are not centered nor aligned with one another. Each slice draws its own section of the crankshaft, inlcuding rods and piston heads. The block is also drawn in slices, but handled by a separate class.

Each face and shape of the engine is drawn by a process known as Hierarchical Modeling. In a hierarchical model, each shape's location is dependent on the location of a parent shape; the movements are relative to each other. The shapes are mostly openGL, GLU, and GLUT primitives except where I needed to create my own shapes. If you are curious about how long they take, they can take a very long time.

There are numerous keyboard commands within the program to change the environment. Highlights include changing between solid and wireframe drawing, increasing / decreasing the engine's rotations per minute, and zooming the camera.

Work Products

1 ) Shape drawing routines
- Partial Cylinders, with slices and stacks
- Square Disks with Offset Round Center Holes
- Rectangular Boxes

2) A hierarchical modeling of the engine parts

3) Engine slice and block segment graphics

3) Mobile / zoomable camera functionailty

Wait, what happened again?

Teach me the way of the Engine

Ooooh, Purdy!