Kangas (Cloth)

Description

3D graphics simulation of cloth. This uses equations about gravity and physics... In real time.
You can move and rotate camera and move one corner of the cloth.

SDL library is used for graphics.

Command keys:

Rotation:
arrow keys

Move:
Z - camera z+
X - camera z-
H - camera x-
J - camera x+
Y - camera y+
U - camera y-
C - zoom +
V - zoom -

Q - move one corner x+5
A - move one corner x-5

S - statistics on/off (statistics are written to console)

Render mode:
G - Gouraud shading (default)
L - Constant shading (Lit-flat)
T - Texture mapping
W - wireframe
F - Flat (this is not really usefull)
 

Source code & executables

Linux (gcc)

Windows (Borland C++ 5.5)
engine-win32.zip (204 kb). This win32 version does not have gouraud shading...
 

Screenshots

GIF animation (657 kb)

Constant shading (Lit-flat)
constant shading

Gouraud shading 1
Gouraud shading

Gouraud shading 2 (moving)
Gouraud shading

Gouraud shading 3 (moving)
Gouraud shading

Gouraud shading 4
Gouraud shading

Wireframe
Wireframe

by korma 2002
markku (dot) t (dot) korsumaki (at) mbnet (dot) fi
Back to home (code::web)

Last modify: