Skip to content

Babar-mir/Donut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

EXPLANATION

Major Concepts and Tools used

  • C programming

    • Libraries
  • Mathematics

    • Parametric(torus)
    • 3-D Geometry
    • rotational matrices
  • Terminal & display tools

    • ANSI escape codes(\x1b[2j,\x1b[h) : clear screen and move cursor to top-left to render new frames in-place.
    • Terminal emulator — the characters, width/height and font affect perceived aspect ratio
    • memset : for fast clearing
  • Rendring technique & algorithms

    • Z-buffer(depth buffer) ->z[0] prevents farther points from overwriting nearer ones.
    • ASCII shading(.,-~:;=!*#$@)

Short concept (overview)

  • Parametric torus → two angles (θ, φ).

  • Rotate → apply rotation matrices (or algebraic equivalent).

  • Project → divide x,y by depth to produce perspective.

  • Shade → dot(normal, light_dir) → char ramp.

  • Z-buffer → keep closest D per cell.

  • Performance → precompute, small memory, optimize compiler flags.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages