Post History
#15: Post edited
Circle of text characters
- Circle of text characters [FINALIZED]
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R (strictly greater than zero)
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- ## Validator
- You can validate specific outputs with this [text circle validator], which will give an explanation for any failed validations.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [text circle validator]: https://trichoplax.github.io/text-circle-validator/ "Online validator for outputs from this challenge"
- # Now posted: [Circle of text characters](https://codegolf.codidact.com/posts/287319)
- ---
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R (strictly greater than zero)
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- ## Validator
- You can validate specific outputs with this [text circle validator], which will give an explanation for any failed validations.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [text circle validator]: https://trichoplax.github.io/text-circle-validator/ "Online validator for outputs from this challenge"
#14: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R (strictly greater than zero)
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R (strictly greater than zero)
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- ## Validator
- You can validate specific outputs with this [text circle validator], which will give an explanation for any failed validations.
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- [text circle validator]: https://trichoplax.github.io/text-circle-validator/ "Online validator for outputs from this challenge"
#13: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- A positive integer R- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R (strictly greater than zero)
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#12: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some foreground characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#11: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- A square of characters of side length 2R + 1- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
These examples use the following characters to indicate the distance from the centre:- `#` means the character is a distance of exactly R from the centre- `.` means the distance is less than or equal to R-1 or greater than or equal to R+1- `f` or `F` means the floor of the distance is R- `c` or `C` means the ceiling of the distance is R- upper case (`F` or `C`) means the distance rounded to the nearest integer is R- Using these characters, the rules are equivalent to:
- Every `#` must be included in the foreground- - Every `.` must be included in the background
- All other characters can be either foreground or background, provided there are no gaps between the foreground characters- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
Examples of valid circles include:- Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)- Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)- Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)- Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)- The potential character placements for radius 1 to 10:
- ```text
R=1:F#F- #.#
F#FR=2:fF#FfFc.cF- #...#
Fc.cFfF#FfR=3:.fF#Ff.fCc.cCfFc...cF- #.....#
Fc...cFfCc.cCf.fF#Ff.R=4:..FF#FF...FCc.cCF.FC.....CFFc.....cF- #.......#
Fc.....cFFC.....CF.FCc.cCF...FF#FF..R=5:..fFF#FFf...f#cc.cc#f.f#c.....c#fFc.......cFFc.......cF- #.........#
Fc.......cFFc.......cFf#c.....c#f.f#cc.cc#f...fFF#FFf..R=6:...fFF#FFf.....FCcc.ccCF...FC.......CF.fC.........CfFc.........cFFc.........cF- #...........#
Fc.........cFFc.........cFfC.........Cf.FC.......CF...FCcc.ccCF.....fFF#FFf...R=7:....fFF#FFf......fFCcc.ccCFf...fFc.......cFf..Fc.........cF.fC...........CfFc...........cFFc...........cF- #.............#
Fc...........cFFc...........cFfC...........Cf.Fc.........cF..fFc.......cFf...fFCcc.ccCFf......fFF#FFf....R=8:....ffFF#FFff.......fFCcc.ccCFf.....FCc.......cCF...fCc.........cCf.fFc...........cFffC.............CfFc.............cFFc.............cF- #...............#
Fc.............cFFc.............cFfC.............CffFc...........cFf.fCc.........cCf...FCc.......cCF.....fFCcc.ccCFf.......ffFF#FFff....R=9:.....fFFF#FFFf.........FCCcc.ccCCF......fFCc.......cCFf....Fc...........cF...FC.............CF.fCc.............cCfFC...............CFFc...............cFFc...............cF- #.................#
Fc...............cFFc...............cFFC...............CFfCc.............cCf.FC.............CF...Fc...........cF....fFCc.......cCFf......FCCcc.ccCCF.........fFFF#FFFf.....R=10:......fFFF#FFFf..........fFCccc.cccCFf.......f#c.........c#f.....fCc...........cCf...f#c.............c#f..Fc...............cF.fC.................CfFc.................cFFc.................cFFc.................cF- #...................#
Fc.................cFFc.................cFFc.................cFfC.................Cf.Fc...............cF..f#c.............c#f...fCc...........cCf.....f#c.........c#f.......fFCccc.cccCFf..........fFFF#FFFf......- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square grid of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- Here `.` represents the background and `#` represents the foreground.
- Using these characters, the rules are equivalent to:
- - Every `.` must be included in the background
- - Any `#` may be included in the foreground, but not all of them need to be - some may be left as background provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- The potential character placements for radius 1 to 10:
- ```text
- R = 1
- ###
- #.#
- ###
- R = 2
- #####
- ##.##
- #...#
- ##.##
- #####
- R = 3
- .#####.
- ###.###
- ##...##
- #.....#
- ##...##
- ###.###
- .#####.
- R = 4
- ..#####..
- .###.###.
- ##.....##
- ##.....##
- #.......#
- ##.....##
- ##.....##
- .###.###.
- ..#####..
- R = 5
- ..#######..
- .####.####.
- ###.....###
- ##.......##
- ##.......##
- #.........#
- ##.......##
- ##.......##
- ###.....###
- .####.####.
- ..#######..
- R = 6
- ...#######...
- ..####.####..
- .##.......##.
- ##.........##
- ##.........##
- ##.........##
- #...........#
- ##.........##
- ##.........##
- ##.........##
- .##.......##.
- ..####.####..
- ...#######...
- R = 7
- ....#######....
- ..#####.#####..
- .###.......###.
- .##.........##.
- ##...........##
- ##...........##
- ##...........##
- #.............#
- ##...........##
- ##...........##
- ##...........##
- .##.........##.
- .###.......###.
- ..#####.#####..
- ....#######....
- R = 8
- ....#########....
- ...#####.#####...
- ..###.......###..
- .###.........###.
- ###...........###
- ##.............##
- ##.............##
- ##.............##
- #...............#
- ##.............##
- ##.............##
- ##.............##
- ###...........###
- .###.........###.
- ..###.......###..
- ...#####.#####...
- ....#########....
- R = 9
- .....#########.....
- ....#####.#####....
- ..####.......####..
- ..##...........##..
- .##.............##.
- ###.............###
- ##...............##
- ##...............##
- ##...............##
- #.................#
- ##...............##
- ##...............##
- ##...............##
- ###.............###
- .##.............##.
- ..##...........##..
- ..####.......####..
- ....#####.#####....
- .....#########.....
- R = 10
- ......#########......
- ....######.######....
- ...###.........###...
- ..###...........###..
- .###.............###.
- .##...............##.
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- #...................#
- ##.................##
- ##.................##
- ##.................##
- ##.................##
- .##...............##.
- .###.............###.
- ..###...........###..
- ...###.........###...
- ....######.######....
- ......#########......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#10: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. You may use some of each- The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the corners- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. Within a single output, some characters may have a floor of R and some may have a ceiling of R - you do not need to choose one or other consistently
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the edges
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#9: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1. You may use some of each
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#8: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- The foreground characters that make up the circle must satisfy the following:- each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1- each character that is at a distance from the centre of exactly R must be a foreground character- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - Each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#7: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any edge of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#6: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
> Explanations in answers are optional, but I'm more likely to upvote answers that have one.
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- - Every `#`, `f`, `F`, `c`, and `C` is foreground (every character with a floor or ceiling of R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations are optional, but I'm more likely to upvote answers that have one.
#5: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
```
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#4: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- Every `#`, `f`, and `F` is foreground, everything else is background (every character with a floor of R is foreground)- Every `#`, `c`, and `C` is foreground, everything else is background (every character with a ceiling of R is foreground)- Every `#`, `F`, and `C` is foreground, everything else is background (every character that rounds to R is foreground)- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground (every character that rounds to R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
#3: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- You may choose any 2 distinct characters to represent the circle and the background- The centre of the circle is the centre of the square. That is, the location R, R if using zero indexed coordinates- The characters that make up the circle must have a distance from the centre that has either a floor or a ceiling of R (you may choose only floor, or only ceiling, or both, or a mixture where some characters have a floor of R and some have a ceiling of R - you do not need to include all characters that have a floor or ceiling of R)- The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square.- ## Examples
These examples use `#` as the circle character and `.` as the background character.For input 5:- ```text
TODO: Add list of valid circles for radius 5TODO: Consider whether extending the permitted circle character distance to floor-1 to ceiling+1 would be better or worse- ```
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the foreground (depicting the circle) and the background
- - The centre of the circle is the centre of the square. That is, the location (R, R) if using zero indexed coordinates
- - The foreground characters that make up the circle must satisfy the following:
- - each foreground character must have a distance from the centre that has either a floor or a ceiling of R. That is, R-1 < distance < R+1
- - each character that is at a distance from the centre of exactly R must be a foreground character
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. Equivalently, a flood fill from the centre will not reach any of the corners
- ## Examples
- These examples use the following characters to indicate the distance from the centre:
- - `#` means the character is a distance of exactly R from the centre
- - `.` means the distance is less than or equal to R-1 or greater than or equal to R+1
- - `f` or `F` means the floor of the distance is R
- - `c` or `C` means the ceiling of the distance is R
- - upper case (`F` or `C`) means the distance rounded to the nearest integer is R
- Using these characters, the rules are equivalent to:
- - Every `#` must be included in the foreground
- - Every `.` must be included in the background
- - All other characters can be either foreground or background, provided there are no gaps between the foreground characters
- This is intended to give the flexibility to allow various different circle drawing approaches to compete.
- Examples of valid circles include:
- - Every `#`, `f`, and `F` is foreground, everything else is background (every character with a floor of R is foreground)
- - Every `#`, `c`, and `C` is foreground, everything else is background (every character with a ceiling of R is foreground)
- - Every `#`, `F`, and `C` is foreground, everything else is background (every character that rounds to R is foreground)
- The potential character placements for radius 1 to 10:
- ```text
- R=1:
- F#F
- #.#
- F#F
- R=2:
- fF#Ff
- Fc.cF
- #...#
- Fc.cF
- fF#Ff
- R=3:
- .fF#Ff.
- fCc.cCf
- Fc...cF
- #.....#
- Fc...cF
- fCc.cCf
- .fF#Ff.
- R=4:
- ..FF#FF..
- .FCc.cCF.
- FC.....CF
- Fc.....cF
- #.......#
- Fc.....cF
- FC.....CF
- .FCc.cCF.
- ..FF#FF..
- R=5:
- ..fFF#FFf..
- .f#cc.cc#f.
- f#c.....c#f
- Fc.......cF
- Fc.......cF
- #.........#
- Fc.......cF
- Fc.......cF
- f#c.....c#f
- .f#cc.cc#f.
- ..fFF#FFf..
- R=6:
- ...fFF#FFf...
- ..FCcc.ccCF..
- .FC.......CF.
- fC.........Cf
- Fc.........cF
- Fc.........cF
- #...........#
- Fc.........cF
- Fc.........cF
- fC.........Cf
- .FC.......CF.
- ..FCcc.ccCF..
- ...fFF#FFf...
- R=7:
- ....fFF#FFf....
- ..fFCcc.ccCFf..
- .fFc.......cFf.
- .Fc.........cF.
- fC...........Cf
- Fc...........cF
- Fc...........cF
- #.............#
- Fc...........cF
- Fc...........cF
- fC...........Cf
- .Fc.........cF.
- .fFc.......cFf.
- ..fFCcc.ccCFf..
- ....fFF#FFf....
- R=8:
- ....ffFF#FFff....
- ...fFCcc.ccCFf...
- ..FCc.......cCF..
- .fCc.........cCf.
- fFc...........cFf
- fC.............Cf
- Fc.............cF
- Fc.............cF
- #...............#
- Fc.............cF
- Fc.............cF
- fC.............Cf
- fFc...........cFf
- .fCc.........cCf.
- ..FCc.......cCF..
- ...fFCcc.ccCFf...
- ....ffFF#FFff....
- R=9:
- .....fFFF#FFFf.....
- ....FCCcc.ccCCF....
- ..fFCc.......cCFf..
- ..Fc...........cF..
- .FC.............CF.
- fCc.............cCf
- FC...............CF
- Fc...............cF
- Fc...............cF
- #.................#
- Fc...............cF
- Fc...............cF
- FC...............CF
- fCc.............cCf
- .FC.............CF.
- ..Fc...........cF..
- ..fFCc.......cCFf..
- ....FCCcc.ccCCF....
- .....fFFF#FFFf.....
- R=10:
- ......fFFF#FFFf......
- ....fFCccc.cccCFf....
- ...f#c.........c#f...
- ..fCc...........cCf..
- .f#c.............c#f.
- .Fc...............cF.
- fC.................Cf
- Fc.................cF
- Fc.................cF
- Fc.................cF
- #...................#
- Fc.................cF
- Fc.................cF
- Fc.................cF
- fC.................Cf
- .Fc...............cF.
- .f#c.............c#f.
- ..fCc...........cCf..
- ...f#c.........c#f...
- ....fFCccc.cccCFf....
- ......fFFF#FFFf......
- ```
#2: Post edited
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the circle and the background
- - The centre of the circle is the centre of the square. That is, the location R, R if using zero indexed coordinates
- - The characters that make up the circle must have a distance from the centre that has either a floor or a ceiling of R (you may choose only floor, or only ceiling, or both, or a mixture where some characters have a floor of R and some have a ceiling of R - you do not need to include all characters that have a floor or ceiling of R)
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square.
- ## Examples
- These examples use `#` as the circle character and `.` as the background character.
- For input 5:
- ```text
- TODO: Add list of valid circles for radius 5
- ```
- Given a radius R, output a text representation of a circle.
- ## Input
- - A positive integer R
- - You do not need to handle values of R greater than 32
- ## Output
- - A square of characters of side length 2R + 1
- - You may choose any 2 distinct characters to represent the circle and the background
- - The centre of the circle is the centre of the square. That is, the location R, R if using zero indexed coordinates
- - The characters that make up the circle must have a distance from the centre that has either a floor or a ceiling of R (you may choose only floor, or only ceiling, or both, or a mixture where some characters have a floor of R and some have a ceiling of R - you do not need to include all characters that have a floor or ceiling of R)
- - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square.
- ## Examples
- These examples use `#` as the circle character and `.` as the background character.
- For input 5:
- ```text
- TODO: Add list of valid circles for radius 5
- TODO: Consider whether extending the permitted circle character distance to floor-1 to ceiling+1 would be better or worse
- ```
#1: Initial revision
Circle of text characters
Given a radius R, output a text representation of a circle. ## Input - A positive integer R - You do not need to handle values of R greater than 32 ## Output - A square of characters of side length 2R + 1 - You may choose any 2 distinct characters to represent the circle and the background - The centre of the circle is the centre of the square. That is, the location R, R if using zero indexed coordinates - The characters that make up the circle must have a distance from the centre that has either a floor or a ceiling of R (you may choose only floor, or only ceiling, or both, or a mixture where some characters have a floor of R and some have a ceiling of R - you do not need to include all characters that have a floor or ceiling of R) - The circle must not have gaps. Specifically, there must be no connected path of horizontally or vertically adjacent background characters joining the centre to any corner of the square. ## Examples These examples use `#` as the circle character and `.` as the background character. For input 5: ```text TODO: Add list of valid circles for radius 5 ```