Skip to content

Corg-Labs/globe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

ASCII Globe

Rotating ASCII globe with simple lighting, in C.

A small, self-contained demo written in pure C — no external libraries, just the standard library and POSIX. Part of the Corg-Labs collection of single-file C programs.


How It Works

  1. Sphere surface points are generated from spherical coordinates
  2. Each point is rotated around the vertical axis per frame
  3. A z-buffer keeps only the nearest point per cell
  4. A dot product with a light direction picks the shade character

Build

gcc globe.c -o globe -lm

Run

./globe

Controls

Press Ctrl-C to quit.

About

► Rotating ASCII globe with simple lighting, in C.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages