Modeling Seashells in OpenGL

Ngai-Ming Wang
nwang@cs.cornell.edu

Master of Engineering Project Spring 1997
Cornell University

Project Advisor
Bruce Land

Project Leader of Visualization Group
Cornell Theory Center


Introduction:

Seashells are geometrically interesting objects that can be modelled by simple geometric equations. We can model a seashells by sweeping a curve along a helico spiral. My project attempts to model the various kinds of seashell and visualize realistically using OpenGL running Windows 95 and Windows NT.

Modeling shell geometry

Fowler et al describes a method to model the surface of seashells as under: the surface of any shell may be generated by the revolution about a fixed axis of a closed curve, which, remaining always geometrically similar to itself, increases its dimensions continually. Let us imagine some characteristic point within this closed curve, such as the center of gravity. Starting from a fixed origin, this characteristic point describes an equiangular spiral in space about a fixed axis (or the axis of the shell), with or without a simultaneous movement of translation along the axis. The scale of the figure increases in geometrical progression while the angle of rotation increases in arithmetical, and the center of similitude remains fixed. The form of the generating curve is seldom open to easy mathematical expressions.

Helico spiral

We start our modeling with the construction of a logorithmic (equiangular) helico-spiral. The helico-spiral can be described using a parametric equation in a cylindrical coordinate system.


The first two equations represent a logorithmic spiral lying in the plan z=0, the third equation streches the spiral along the z-axis. r and z are exponential functions of the paramter t, and usually have the same base. As a result, the generating helico-spiral is self-similar, with the center of similitude located at the origin of the coordinate system xyz. Given the initial values Theta0, r0, z0, a sequence of points on the spiral can be computed incrementally using the following formulas. The angle of rotation increases in arithmetic progression with the step d(Theta), the radium r forms a geometric progression with the scaling factor LamdaR, the vertical displacement z forms a geometric progression with the scaling factor LamdaZ.

The generating curve

The surface of the shell is determined by a generating curve C, sweeping along the above helico-spiral. The size of the curve C increases as it revolves around the shell axis. The shape of C determines the profile of the whorls and of the shell opening. We construct C1 using a Bezier curve. In order to form a closed curve, we construct another Bezier curve C2 sharing two endpoints with C1.

Usage:

System requirement:

Main window

The main window is split into two frames. The left frame is the OpenGL output window and the right frame is the window for controlling the Bezier curve that determines the shape of the whorl and the opening of the seashell. There are a total of six control points for two Bezier curves that share common endpoints. You can drag on any one of the the control points to change the shape of the curve. Since two control points are shared among two curves as endpoints, changing the endpoints will involve changing both curves.

Control window

The seashell is positioned at (0,0,0). The camera paramters are used to change the position of the camera looking towards (0,0,0). So in order to zoom in, you can decrease the z coordinate magnitude. To zoom out, increase z coordinate magnitude.

Lighting can be toggled on and off by checking the lighting checkbox.

The shell material emission checkbox controls whether to turn on shell material emission or not. The RGB parameters can be altered by changing the edit box. The following parameters correspond to the parameters in the Modeling shell geometry section.


Screen Captures

Future enhancement:

In the current implement, texture mapping is not supported. OpenGL provides built-in texture mapping support with relatively easy high level function calls. By providing texture mapping, even more realistic images can be created.

In the current implementation, rotation along all axes involves recalculation of all polygons. Performance can be enhanced by the use of display list during rotation and camera movement. Display list is OpenGL's retained mode of display. Commands are compiled but not executed. We expect to get very smooth rotation and zooming for relatively complex shells.

Reference: