This challenge involves creating pictures using text characters as the paint. Typically this uses only 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963.

learn more… | top users | synonyms

9
votes
4answers
312 views

Print an ascii spiral in O(log n) memory

You may write a program or function that receives an odd, positive integer n, where n >= 3, as either a function argument, command line arguments, or on STDIN (or equivalent for your system), and ...
23
votes
24answers
3k views

Simple ASCII Gantt

This is a simple one: print an ASCII Gantt chart. Given tasks' ranges (start-time - end-time Tuples), print a Gantt timeline in the form of - characters for each task duration - each task in a new ...
30
votes
2answers
529 views

Poor man's LaTeX

You are transported in a parallel universe where people write mathematical equations on computers as ASCII art by hand. As a LaTeX addict, this is totally unacceptable, and you ought to automate this ...
4
votes
0answers
134 views

Display a MIDI Track

Background MIDI files are quite different from WAV or MP3 audio files. MP3 and WAV files contain bytes representing a "recording" of the audio, while MIDI files have a series of MIDI messages stored ...
6
votes
0answers
103 views

Rotate a diamond tiling

Any regular hexagon can be tiled with diamonds, for instance like so (stolen from this question): ______ /_/_/\_\ /_/\_\/\_\ /\_\/_/\/_/\ \/_/\_\/_/\/ \_\/_/\_\/ \_\_\/_/ We'll consider ...
14
votes
2answers
261 views

Fill a water balloon

In this challenge, you must display ASCII art of a water balloon given the amount of water that the balloon is filled with: | __||__ | | / # #\ | | |######| | | |######| | | |######| | | |######| ...
39
votes
22answers
4k views

First code golf decathlon

Tasks All competitors try to solve the following list of 10 tasks: math Read a positive integer n from input and return the sum of the cubes of the first n non-negative integers. For input 1, ...
17
votes
9answers
1k views

Draw Growing Stacks of Boxes

The Task In this challenge, your task is to draw an ASCII art representation of several stacks of boxes of increasing height. You are given as input the number of stacks, which is a positive integer. ...
13
votes
1answer
389 views

mtDNA mutation tree

Background: MtDNA is a part of the human DNA that is passed from a mother to a child and it rarely mutates. Since this is true for all humans it is possible to create a huge tree that visualize how ...
16
votes
2answers
1k views

Rotate a Chinese checkerboard

A Chinese checkerboard looks like this (based on this question, but this time it has a fixed size): G . G G G G G G . G B B B B . . Y G . Y . Y Y B B B . . ...
5
votes
5answers
473 views

Print Input Sideways

Your program must take an alpha/numeric input string and print it sideways (rotated 90 degrees clockwise). So for example, HI, would become: ##### # ##### ##### Rules: The shortest code wins. ...
12
votes
7answers
453 views

ASCII Triangle Ripple

Ok, my first golf question. Please be gentle :) I know there's way too many ascii puzzles :P but here we go. The task is simple, use your favorite programming language to print a triangle ripple. The ...
19
votes
34answers
3k views

Generate boxes!

Your task is to generate boxes using any one ASCII character with respect to the inputs given. Test Cases 1 1 --> ===== = = ===== 1 2 --> ========= = = ...
72
votes
12answers
4k views

Seven Slash Display

Write a program that takes in a non-empty string of the digits 0 through 9 and prints how they would be shown on a seven-segment display using slashes (/, \). These are the precise digit shapes: /\ ...
7
votes
8answers
415 views

Print all colorings of a 3x3 grid

You have a 3x3 grid. Each cell can be colored black or white. Display all 512 of these colorings. Fewest bytes wins. You can display the grids in any formation as long as they are visually separated ...
35
votes
7answers
4k views

The hourglass challenge

The Hourglass This hourglass has 60 "sands of time", and it completely fills each chamber. The clock is 19 characters wide and 13 characters in height. Each chamber has 5 rows of sand and there is a ...
20
votes
7answers
585 views

Visual Long Multiplication

There is a nice way to perform long multiplication for two integers without having to do anything but counting, which occasional gets shared around the internet. You write the digits of each number as ...
10
votes
0answers
160 views

Draw a Spinning Pinwheel

Remember those fun pinwheels that you blow on and they spin round and round? Let's code one! A pinwheel will have the set of characters \ | / _ drawing its center and arms. One possible pinwheel ...
25
votes
26answers
4k views

Draw an ASCII Lightning Bolt

Introduction Partly inspired by this StackOverflow question, let's draw an ASCII Lightning Bolt. Write a program that takes a positive Integer n via STDIN or command line and outputs the ASCII ...
16
votes
5answers
318 views

Heightmap of Boxes

Have a look at this ascii art diagram of various boxes: +--------------------------------------------------------------+ | | | ...
14
votes
2answers
580 views

Translate RoboCritters into Brainf***

RoboCritters (etymology) is a brand new esoteric programming language (don't bother searching for it, I just invented it). It's a variant of Brainfuck (BF), slightly more complex than the usual ...
14
votes
4answers
513 views

Random ASCII Art of the Day #5: Diamond Tilings

Mash Up Time! This is instalment #5 of both my Random Golf of the Day and Optimizer's ASCII Art of the Day series. Your submission(s) in this challenge will count towards both leaderboards (which you ...
10
votes
5answers
417 views

ASCII Art of the Day #4 - Zodiac Signs

We all love horoscopes, don't we? But I have a serious problem in this Horoscope App installed on my Smart Phone that it only displays the icon of the Zodiac Sign for each day's horoscope. Now, I do ...
18
votes
4answers
454 views

Chinese checkerboard

The game of Chinese checkers is played on a board with spaces in the shape of a six-pointed star: Image from Wikipedia We can create an ASCII-art representation of this board, using . for empty ...
14
votes
5answers
462 views

Determine the Dimensions of a Rotated Rectangle

This Stack Snippet draws an aliased white rectangle on a black background given parameters for its dimensions, position, angle, and the grid dimensions: <style>html ...
20
votes
1answer
345 views

Let's build a race car track!

Introduction My niece wants to make a race car track. She has wooden parts that fit together to form the track. Each part is square shaped and contains a different shape. I'll use the pipe drawing ...
17
votes
6answers
635 views

ASCII Art of the Day #3 - Chinese Shrines

In today's episode of AAOD, we are going to construct a Chinese Shrine of varying heights. Consider the following examples for height (N) 1 to 6 N = 1: . | . ]#[ . \_______/ ...
12
votes
1answer
182 views

Find the Fenceposts

Background An atomic bomb has exploded near the fencepost factory! Since fenceposts are essential for the survival of our civilization, we must rescue as many as possible. We are sending ...
22
votes
7answers
842 views

Scale up a Diamond Tiling

Any regular hexagon can be tiled with diamonds, for instance like so: ______ /_/_/\_\ /_/\_\/\_\ /\_\/_/\/_/\ \/_/\_\/_/\/ \_\/_/\_\/ \_\_\/_/ We'll consider the above a tiling of size 1 ...
30
votes
9answers
3k views

ASCII Art of the Day #2 - Flow Snakes

I came across this really nice snow-flake like ASCII fractal by Michael Naylor [citation needed but not found]. Just like a fractal, it grows exponentially in size with each order/iteration. Below are ...
37
votes
13answers
4k views

ASCII Art of the Day #1 - Double Knot

Write a full program or a function that takes a positive integer N as input via STDIN/command line/ARGV or function arguments and prints an ASCII double knot corresponding to the N to STDOUT. The ...
6
votes
0answers
193 views

HappyCube Puzzle Solver

This challenge is inspired by a puzzle I played, consisting of foam pieces like these: which have to be assembled into 3D cubes, like these: The puzzle pieces can be viewed as grids of 5 * 5 ...
8
votes
1answer
323 views

ASCII art square affine fractals

Write the smallest program you can to create affine fractals. You may use any method you feel like that generates the same results as the rules below. You don't have to use any ideas from the ...
35
votes
13answers
4k views

Me Want Honeycomb

Write the shortest program that prints this ASCII art section of a hexagonal tiling or honeycomb: __ __/ \__ __/ \__/ \__ / \__/ \__/ \ \__/ \__/ \__/ / \__/ \__/ \ \__/ \__/ ...
19
votes
3answers
402 views

Is This a Real Tree?

You should write a program or function which receives a string as input and outputs or returns if the input is an ASCII tree. _ \/ / \_/ | | ASCII trees consist of characters / \ | _ spaces ...
48
votes
25answers
4k views

Draw An ASCII Double Helix

Write a program that takes in an integer N via stdin or the command line. If N is 0, the single letter O must be printed to stdout. If N is positive, this horizontal ASCII art double helix, drawn ...
0
votes
1answer
135 views

METAscii Code Golf

Introduction Here at code colf SE, we appear to love meta-problems. Here, I've tried to compose a meta-problem that's an interesting, not-straightforward challenge. Challenge Using no inputs, your ...
13
votes
4answers
1k views

Build an ASCII Fibonacci Clock

Someone built a really fancy clock using Fibonacci numbers, which looks really nice but is fairly unusable. Just the way we like it! Let's recreate this. The clock is made up of 5 sections ...
31
votes
30answers
3k views

Extendify the ASCII Sun

Write a program that takes in (via STDIN/command line) a non-negative integer N. When N is 0, your program should print O (that's capital Oh, not zero). When N is 1, your program should print \|/ ...
19
votes
9answers
2k views

Identify halves of Poker cards

A casino uses the following deck of cards. (* is one of the card suits D, S, C or H.) _________ _________ _________ _________ _________ | | | | | | | | ...
123
votes
19answers
12k views

Do you want to code a snowman?

Here is a simple ASCII art snowman: _===_ (.,.) ( : ) ( : ) Let's make him some friends. This will be the general pattern for our ASCII art snowpeople: HHHHH HHHHH X(LNR)Y X(TTT)Y (BBB) The ...
17
votes
2answers
334 views

Can you fold a hexomino into a cube?

One of my kid's favorite toys is a set like this. Actually its one of my favorite toys - I've been playing with it and its been giving me some PPCG challenge ideas. Here's one: Write a program or ...
13
votes
2answers
520 views

ASCII Art Generation

Task Write a program or function that takes an image of width w and height h, and two integers a <= w/2 and b <= h/2, and outputs an ascii art representation of the image, with the dimensions a ...
47
votes
24answers
5k views

Golf Your Language's Identicon

Identicons are small images of geometric patterns that represent the hash value of a string. Stack Exchange uses the identicons from Gravatar as each user's default avatar image. In this challenge, ...
32
votes
8answers
2k views

Build a steady brick wall

A brick wall is a rectangle made of horizontal 1-by-n bricks stacked into rows. Here's a wall of height 4 and width 8, with brick sizes shown on the right. [______][______] 4 4 [__][____][__][] ...
29
votes
7answers
2k views

Area of an ASCII polygon

You should write a program or function which receives a string representing an ascii-art polygon as input and outputs ot returns the area of the polygon. The input is a string consisting of the ...
19
votes
12answers
513 views

Road-Length Encoding

In the United States, the two opposing directions of traffic on a road are separated by a dashed yellow line if passing is allowed and two solid yellow lines if passing is not allowed. (Just one ...
13
votes
6answers
497 views

Tiling a 2^N by 2^N Grid with L-Shaped Trominoes

When students are first taught about the proof technique of mathematical induction, a common example is the problem of tiling a 2N×2N grid with L-shaped trominoes, leaving one predetermined grid ...
53
votes
33answers
5k views

Telescopic Parentheses

Consider a non-empty string of correctly balanced parentheses: (()(()())()((())))(()) We can imagine that each pair of parentheses represents a ring in a collapsed telescopic construction. So let's ...
29
votes
13answers
3k views

Draw a Random ASCII Art Quilt

For this challenge, an ASCII art quilt will be a block of text 24 characters wide and 18 lines tall, containing the characters =-<>/\ in a quilt-like pattern that is horizontally and vertically ...