This challenge involves drawing pictures on a screen or generating image files. For pure ASCII art contests, use [tag:ascii-art] instead. If participants can choose between graphics and ASCII art, use both tags. For images as input, use [tag:image-processing].

learn more… | top users | synonyms (1)

39
votes
8answers
7k views

Draw the South Korean flag

When I stumbled upon this question I remembered that I had also once seen precise rules for the construction of the South Korean flag. And this is quite a different construction. Source: Wikipedia ...
6
votes
1answer
364 views

Animating the Separation of Fluids by Density

Let the characters 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ represent the particles of 36 immiscible fluids, each more dense than the last. So the 0 fluid is the least dense and floats on all the others, ...
13
votes
5answers
1k views

Pixel art, episode 2: Display the map 1-1 of Super Mario Bros

Last challenge (Pixel-art, episode 1: display Super Mario) was just a training... (and you completed it in amazing ways, thanks!) This time, you have to work a little bit more. You have to display ...
5
votes
2answers
498 views

Draw a Golden Spiral!

Given a number n, you must output a golden spiral with the number of quarter turns being n. The spiral must be completely black and the background must be completely white. This must be output as a ...
23
votes
20answers
5k views

Pixel-art, episode 1: display Super Mario

it's a-me! Today's task is simple: write a program, or a function that displays the idle small Mario sprite, from Super Mario Bros, on NES, over a blue background. Any kind of entry is valid as long ...
1
vote
1answer
318 views

Draw a Fractal in Under 200 Characters [closed]

After noticing all the fractal submissions/questions, I thought it would be fun to start a contest where everyone submits their favourite fractal. The Contest Generate a fractal in under 200 ...
19
votes
2answers
798 views

Generate Realistic Maps

I drew this map of the regions of an imaginary word in a few minutes in MS Paint: I think that being able to generate maps like this programmatically would be really cool. Challenge Write a ...
11
votes
2answers
697 views

9 Holes of Code Golf - Kickoff

There has already been a 9 Hole Challenge (and another one here), but that was soooo last year. And besides, I have only been around for 2 months (although it seems like forever). And it is ...
29
votes
2answers
905 views

Create xkcd-Style Narrative Charts

In one of the more iconic xkcd strips, Randall Munroe visualised the timelines of several films in narrative charts: (Click for larger version.) Source: xkcd No. 657. Given a specification of the ...
15
votes
2answers
467 views

Construct n-gons with a ruler and compass

The task is to draw a regular polygon of n sides using only a compass and an unmarked ruler. Input (n) is one of the following 10 numbers: 3, 4, 5, 6, 8, 10, 12, 15, 16, 17. Method: Because you only ...
9
votes
1answer
229 views

Shubbles and Smoles - Part I

The Setup Consider an oddly-shaped box containing 29 numbered cells as shown in Fig. 1 below. Inside this 2D box are two species of square-shaped animals: shubbles and smoles. Fig. 1 (a) shows ...
11
votes
2answers
622 views

Ray-trace a shiny sphere

I downloaded POV-ray and rendered this shiny metal sphere 90s style: Your task is to do the same thing, but to do it by implementing the rendering engine yourself in as few bytes as possible. You ...
10
votes
2answers
320 views

Tension on a Graph, Part II: A Rubber Band

This is the second of two challenges about "pulling functions taut". Here is the slightly simpler Part I. Let's drive m nails into a board at positions (x1, y1) to (xm, ym). Tie a rubber band to the ...
21
votes
1answer
545 views

Paint a still life (or a moving one) - draw an image in the Game of Life

You are given as input a greyscale image. Your task is to find a static or looping pattern in Conway's Game of Life that resembles the input image as closely as possible. Your output can be either a ...
15
votes
0answers
405 views

Stitch a picture

I have a large collection of fine art. My toddler is learning to use scissors and glue; lately she has started playing with my art collection. Fortunately she is really quite good with the scissors ...
22
votes
4answers
890 views

Draw an Apollonian Gasket

Given three mutually tangent circles, we can always find two more circles which are tangent to all three of those. These two are called Apollonian circles. Note that one of the Apollonian circles ...
3
votes
1answer
231 views

Spiral Polygons

Draw a series of connected polygons like the one shown above. However, what the above picture does not show is the spiral formed by consecutive vertexes: The limitation of these is that there is ...
11
votes
5answers
457 views

Tangent Polygon Extensions

Draw something that looks like this: In more precise terms, draw a circle of radius r, with n evenly-spaces tangent lines of length l. Connect the ends of these lines to form a new n-sided regular ...
21
votes
4answers
2k views

Enclose 1009 pixels

Output is a shape that encloses 1009 pixels. The shape must take the form of a single, closed, non-intersecting loop. Input is a positive non-zero integer. Each input must yield output that is ...
19
votes
2answers
476 views

Tension on a Graph, Part I: A Wavy String

Let's plot a function f(x) = sin(πx) + 0.5 sin(3πx) over the domain [-3,3]. We can interpret this as a loose string lying on a board. Now let's drive n nails into the board at positions (x1, y1) to ...
1
vote
0answers
102 views

Create a Flowchart Quine [closed]

A flowchart algorithm is a type of pseudocode designed for human readability and makes it easy to see the program flow. For this program, you need to output your own program as a flowchart. You may ...
19
votes
11answers
3k views

Play the Chaos Game

The Chaos Game is a simple method to generate fractals. Given a starting point, a length ratio r and a set of 2D points, repeatedly do the following: From your set of points, pick one at random ...
11
votes
4answers
2k views

Fake the forecast

The new weather predicting supercomputer has arrived, and it doesn't work. In the meantime your boss wants you to buy the technicians some time by faking the daily wind maps. Your task is to draw a ...
44
votes
10answers
8k views

Little Chandler is sad. Draw him a cloud to cheer him up

Little Chandler is sad. Draw him a cloud to cheer him up. Note: Drawing a cloud won't actually cheer him up. A circle can be defined as a 3-tuple (x,y,r) where x is the x position of the circle on a ...
2
votes
0answers
310 views

The World in the Future [closed]

In the future, the world will change, there's no doubt about it. For that reason, you have to produce a realistic map of the world n years in the future. The number n should be the number of years in ...
27
votes
1answer
1k views

Animation of Code Golf

When I see code-golf entries that knock a few characters off, whittling down the code, I go look at the edit history for a side-by-side diff. See and learn :) This challenge is to make a program ...
7
votes
6answers
705 views

Curve Stitching

Curve stitching is the process of "stitching" together multiple straight lines in order to create a curve, like so: For an explanation of curve stitching, visit this website. We will be drawing ...
6
votes
3answers
331 views

Catenary Between Two Points (Hanging Chain)

This is one of several challenges left for the community by Calvin's Hobbies. The curve that an idealised hanging rope or chain makes is a catenary. Image by Bin im Garten, via Wikimedia Commons. ...
8
votes
2answers
397 views

Generate the outline of an island from a seed [closed]

The challenge is to draw the outline of an 'island', generated using a seed as input. Input (seed): string of 6 characters (exactly) allowing only lowercase letters (i.e. abcdefghijklmnopqrstuvwxyz) ...
5
votes
1answer
282 views

Produce a Simple Station Model

A station model is a diagram for recording the weather at a certain place and time. Challenge You must write the shortest code possible to graphically output a simplified (explained later) station ...
5
votes
5answers
350 views

Draw centered polygonal numbers

A centered polygonal number is able to be put into an arrangement of multiple concentric polygons, each with a side length of one more than the inner one. For example (image from linked page), the ...
18
votes
3answers
721 views

Life can be colorful!

Each cell in a life-like cellular automaton only needs one bit to represent it since it can only be alive or dead. That means there are only two colors; pretty boring. Normal images have 24 bits per ...
20
votes
3answers
1k views

Drawing Epicyclogons

An epicycloid is the curve a point on a circle makes as it rolls around another circle. A cyclogon is the shape a point on a regular polygon makes as it rolls across a plane. An epicyclogon is the ...
3
votes
1answer
413 views

Output an Animated Trigonometry Circle

I want you to write a program that outputs a trigonometry circle like the one below. I also want you to animate this circle, having the sine line move along the circumference with the other lines move ...
42
votes
6answers
3k views

Redraw an image with just one closed curve

Inspired by vi.sualize.us Goal The input is a grayscale image and the output is a black and white image. The output image consists of just one closed curve (loop) that is not allowed to intersect ...
2
votes
1answer
651 views

Create a program that output's itself as a series of punch cards

Create a program that output's itself as a series of punch cards: Rules: You can use any programming language. The output (i.e. punch cards) can be ASCII art. Each line of code must be able to be ...
26
votes
3answers
1k views

Reproduce an image using lines

Write a program that takes in a true-color RGB image I, the maximum number of lines to draw L, and the minimum m and maximum M length of each line. Output an image O that looks as much as possible ...
45
votes
8answers
4k views

Draw random black-and-white forest

Your task is to write program which will draw 800x600 black-and-white image with something resembling a forest. Like this (it is dithered photo): Rules You are disallowed to use any existing ...
8
votes
0answers
334 views

Create a popular penrose tiling [closed]

The recent question about Wang tiles has led me to think that creating Penrose tilings might be an interesting popularity contest. Background Wang tiles are tiles that can tile the plane, but only ...
1
vote
10answers
976 views

Crop an image to a square

In this challenge, you will take an input image and crop it to make a square, leaving only the central part of the input image. The answers must work with landscape, portrait, or square input images. ...
25
votes
10answers
4k views

Golf a Venn Diagram generator

Golf a Venn Diagram generator In order to properly celebrate John Venn's 180th birthday, today your task will be creating a program that outputs a Venn Diagram! Input: A positive integer N that ...
18
votes
2answers
2k views

Fill the Screen with Wang Tiles

It has been proven that the following 13 square Wang tiles always tile the plane aperiodically. This means that when the squares are arranged in a grid with all neighboring sides the same color, a ...
277
votes
56answers
70k views

Tweetable Mathematical Art

Integer math can generate amazing patterns when laid out over a grid. Even the most basic functions can yield stunningly elaborate designs! Your challenge Write 3 Tweetable (meaning 140 characters ...
1
vote
2answers
215 views

Collatz Graph Plotting

Write a program that outputs a graph of the collatz sequence any way you want (ASCII Image Video etc). You have to implement it that way that you can adjust the size of the graph by either the maximum ...
7
votes
1answer
340 views

The Mouse's Tale

Write a program that outputs Lewis Carroll's poem The Mouse's Tale from Alice in Wonderland, drawn in its distinctive tail-like shape. Plain text of the poem: Fury said to a mouse, That he met ...
21
votes
5answers
1k views

Draw an Image with a Snake

Imagine a continuous 2-dimensional path that can only turn left, right, or go straight, cannot intersect itself, and must fill a rectangular grid such as the grid of pixels in an image. We'll call ...
64
votes
11answers
7k views

Make a circle illusion animation

Your job is to animate this circle illusion. It looks like the points rotating inside of the circle, but they are actually just moving in straight lines. Criterias The result has to be animated. ...
5
votes
2answers
361 views

Courier Ception

Courier Ception The program must accept any string as input and output an pixel image that shows the input string in Courier. All the letters that contain a 'hole' (like abdegopqABDPQR etc) that is ...
25
votes
6answers
2k views

Photomosaics or: How Many Programmers Does it Take to Replace a Light Bulb?

I've compiled a mosaic of 2025 headshots from the avatars of the top Stack Overflow users. (Click the image to view it full-size.) Your task is to write an algorithm that will create an accurate ...
0
votes
1answer
394 views

Babylon.js - loop through a scene and apply a simple fragment shader to all of the objects

You have a library - a fully loaded 2014 Babylon.js. You have a fragment shader - let's call it sample.fragment.fx. You have a scene - loaded ahead of time, possibly from a .babylon JSON file. Your ...