Code sample for Spinning Coin


Does anyone know of a code sample which shows how to do a spinning coin?

Thanks :slight_smile:

All My Best,

You could create a really short cylinder and rotate it over time. Look at the primitves like GL_QUADS or GL_TRIANGLES (with optional _STRIP) for the sides and GL_TRIANGLE_FAN for the caps, and look at glRotatef to spin your coins with a time variable or frame counter for starters. Then you could add textures and lighting to it.

The red/blue books are a must have. I still have my version 1.2 redbook, though it’s in complete tatters now :slight_smile:

You can also buy these online (updated versions).