Skip to content

ShrirajHegde/ASCII-Donut-Fortran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII-Donut-Fortran

The classic ASCII spinning donut, written Fortran

How it looks:

Scale = 1:

Scale 1

Scale = 3:

Scale 3

Compilation:

  • make to compile (output binary is donut.out)
  • make run to compile and run

Playing around

  • Change the scale parameter to increase the size (You might have to decrease terminal font size accordingly) for "higher resolution"
  • Change the speed parameter to change the speed of the spinning
  • Anything else

Suggestions and improvements highly welcome :)


Note:

The performance difference between ifort and gfrotran is due to gfortran's lack of output buffering for non regular files. Program compiled with gfortran calls write for every character, which significantly decreases the performance.

Intel fortran compiler doesn't flush the output buffer until it enounters LF (\n) character. Line 65 is added for this purpose


References:

https://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html

https://www.a1k0n.net/2011/07/20/donut-math.html

https://gist.github.com/gcr/1075131

https://github.com/RandomThings23/donut/blob/main/donut.c


About

The classic ASCII spinning donut, written in Fortran

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published