Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :circle x y r
- set /a "___rr=%~3"
- for /l %%y in (-%___rr%,1,%___rr%) do for /l %%x in (-%___rr%,1,%___rr%) do (
- set /a "t=-___rr - 1", "S=(%%x * %%x) + (%%y * %%y) - (___rr * ___rr) - t - 1"
- if "%~5" equ "/f" (
- if !S! leq 1 (
- set /a "_x=%%x + %~1", "_y=%%y + %~2"
- set /a "_x2=_x + 1"
- call set "_[!_y!]=%%_[!_y!]:~0,!_x!%%%~4%%_[!_y!]:~!_x2!%%"
- )
- ) else if "%~5" equ "/n" (
- if !S! geq !t! (
- set /a "_x=%%x + %~1", "_y=%%y + %~2"
- set /a "_x2=_x + 1"
- call set "_[!_y!]=%%_[!_y!]:~0,!_x!%%%~4%%_[!_y!]:~!_x2!%%"
- )
- ) else if !S! geq !t! if !S! leq 1 (
- set /a "_x=%%x + %~1", "_y=%%y + %~2"
- set /a "_x2=_x + 1"
- call set "_[!_y!]=%%_[!_y!]:~0,!_x!%%%~4%%_[!_y!]:~!_x2!%%"
- )
- )
- for %%a in (t S _x _y _x2 ___rr) do set "%%a="
- goto :eof
Add Comment
Please, Sign In to add comment