Wiki › Project
donut.go
Article
ReadAll pages
From Chaipat's knowledge graph
donut.go is a version, in Go, of the famous spinning ASCII donut, first written in C by Andy Sloane as donut.c. A torus is rotated in 3D. Each frame projects its surface points onto the terminal, keeps the nearest point per character cell, and picks a character from .,-~:;=!*#$@ according to how much light that point catches. The whole program is a single file, run with go run donut.go.