Created
April 1, 2013 10:44
-
-
Save emasaka/5284238 to your computer and use it in GitHub Desktop.
draw circle by shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
R=36 | |
RATIO=2 | |
for ((y = -R; y <= R; y += RATIO)); do | |
x=$(dc -e "$R 2^${y/-/_} 2^-vp") | |
printf '%*s%*s%*s\n' $((R - x)) x $x '' $x x | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment