This challenge involves drawing pictures on a screen or generating image files. For pure ASCII art contests, use [ascii-art] instead. If participants can choose between graphics and ASCII art, use both tags. For images as input, use [image-processing].
16
votes
2answers
421 views
Draw a random hexa-glyph
The above image is called a hexa-glyph. Hexa-glyphs are some cool patterns I made up while doodling during my DiffEq class. Here's how you make one:
Consider the following set of points, shaped ...
11
votes
9answers
2k views
Invert png image
Create program or function that takes file name as an argument or reads it from standard input, and completes the following task:
Read image from a png file (name given as argument).
Reverse colors ...
-6
votes
4answers
164 views
Graph an equation!
Please note that this question is different from this question. This one asks for graphical output, while the other one asks for ascii art.
Objective
Help! Timmy's graphing calculator broke! His ...
22
votes
27answers
3k views
Draw the rainbow
The challenge is simple: Draw a rainbow in as few bytes as possible
The specs for the rainbow are as follows:
The figure must be exactly 400 pixels wide and 200 pixels high (optionally 401x201 if ...
3
votes
1answer
239 views
What time is it again? [closed]
The Inspiration
The Challenge
I'm tired of seeing the same old-same old clock in my top-right-hand corner of my screen. It's time for a new clock. While the clock clock sated my lack of interesting ...
12
votes
3answers
526 views
Fill the holes in letters
Sometimes when I'm bored, I take some text and fill the "holes" in the letters. But isn't filling the holes the most boring thing you can do? I think we should automate it, so we could use our time ...
29
votes
3answers
3k views
Dank Meme Generator
I like making dank memes out of my own images. But all those so called "quick meme" sites just have too much code. I realized that the only way to make the dankest meme generator is to ask you guys at ...
19
votes
26answers
3k views
Build a chessboard
Saw this in a PHP challenge. The objective is to make a chessboard with 64 squares (8*8) with the minimum amount of code.
Simple enough, I made mine in PHP in 356 bytes (not impressive, I know) and I ...
72
votes
8answers
3k views
Patch the Image
In a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information ...
177
votes
32answers
26k views
Paint Starry Night, objectively, in 1kB of code
Below is a 386x320 png representation of van Gogh's Starry Night.
Your goal is to reproduce this image as closely as possible, in no more than 1024 bytes of code. For the purposes of this ...
19
votes
6answers
958 views
Triangular Ulam spiral
We've had a couple of challenges about the Ulam spiral. But that's not enough.
In this challenge we will plot a triangular Ulam spiral (as opposed to the usual, square Ulam spiral). Here's a sketch ...
23
votes
6answers
2k views
Flip It, Flop It, Mean It
Overview
Given an image in plain PPM (P3) format as input, for each pixel p in the image, replace each of the following 4 pixels' red, green, and blue with the floored average value of the respective ...
48
votes
7answers
1k views
Paint by Numbers (using programming, not numbers)
Your task is to create a program which takes a black-and-white outlined image (example images are below) and fills it in with colour. It is up to you how you section off each region and which colour ...
7
votes
1answer
195 views
Make the pattern from composition notebooks [closed]
This challenge was xnor's idea, taken from Digital Trauma's challenge donation thread.
Your challenge is to write a program that, as xnor put it, "procedurally generate[s] the splotchy ...
25
votes
6answers
527 views
Draw the Pentaflake
First of all ... I would like to wish everyone a Merry Christmas (sorry if I am a day late for your timezone).
To celebrate the occasion, we are going to draw a snowflake. Because the year is 2015 ...
8
votes
0answers
303 views
…And Mexico will Pay for It!
Donald Trump is very impressed with the work of the people on this site. He saw how amazing of a job you did helping Ben Carson, so he even hired you to build his wall. He thinks you're terrific. Now ...
9
votes
3answers
410 views
Draw a Christmas Star / Stellated Dodecahedron
Paper stars are a big thing in my family at christmas, so I thought a virtual one would be cool.
Below is an image of a regular dodecahedron (from https://en.wikipedia.org/wiki/Dodecahedron, ...
-2
votes
1answer
124 views
Creating a colour chart in PHP will all colours [duplicate]
Now, before we begin, this has already been done here. But!, there are no PHP answers.
With that in mind, my CodeGolf is thus: create a program to show all the colours in the html CSS spectrum using ...
58
votes
2answers
788 views
Sprocket Science: Animating a Chain Drive System
The goal of this challenge is to produce an animation of a chain drive system, comprised of a set of sprocket gears connected together by a chain.
General Requirements
Your program will be given a ...
13
votes
18answers
1k views
Make the PPCG Logo
Come November 1, Programming Puzzles and Code Golf will graduate, so in the next 11 months, we'll want to save some memories from when we were ungraduated.
Write a program that produces the PPCG ...
19
votes
1answer
425 views
Packing Circles
Take a look at this image. Specifically, at how the holes on the ends are arranged.
(Image source)
Notice how the pipes in this image are packed in a hexagonal pattern. It is known that in 2D, a ...
48
votes
3answers
2k views
Black and White Rainbows
Given an image that has only black and white pixels and an (x,y) location that's a white pixel, color the white pixels based on their minimal Manhattan distance from (x,y) in a path that only involves ...
14
votes
4answers
517 views
Make America(n Maps) Great Again
New Bonus! (See below)
The cartography team of U.S. Republican presidential hopeful Ben Carson is having some trouble with their maps (image via Washington Post):
The problem is they don't have ...
91
votes
70answers
14k views
Draw the national flag of France
There have been many other flag challenges posted but not one for the national flag of France. This week seems like an appropriate time.
Produce this flag in the fewest bytes possible:
The image ...
20
votes
1answer
544 views
The Death Of Low-Resolution Pixel Art (Or, Draw That Death)
This is an Irregular Webcomic! themed task.*
Death is a rather extensive orginization, and, although Head Death has had no trouble telling his employees apart, certain other entities connected to ...
6
votes
1answer
315 views
Sobel edge detector
Your task is to write a program that takes an input image and run it through edge-detection to become an output image.
The edge-detection works as follows (if unclear, see sobel edge detection):
...
21
votes
1answer
319 views
Plumbing Random Paths
Write a program or function that takes in three integers, a width w, a height h, and a step count s. You will be drawing a non-self-intersecting random walk s steps long on a 5*w by 5*h pixel image ...
33
votes
12answers
3k views
Sort the pixels
Your task is to create a program that will, given an input image, create an output image of the same size, where all pixels are ordered by hex value.
Your program may:
Sort the pixels from left to ...
15
votes
9answers
806 views
Proto space invaders (can you blit it?)
Proto space invaders
This is a graphical output challenge where the task is to give the shortest code per language.
Task
Your code should allow the user to move the following alien around the ...
36
votes
40answers
6k views
A single pixel moving in a circular path
This is a graphical output challenge where the task is to give the shortest code per language.
Task
Your code should plot a single purple pixel (hex value #800080 or
rgb(128, 0, 128)), moving ...
20
votes
8answers
814 views
Circular Blues
Write a program or function that takes in a positive integer N and recreates this pattern of circles scaled to fit an N×N pixel image:
This image is a valid output example for N = 946.
In ...
23
votes
5answers
1k views
Seamless conversion from square to hexagon
For many games played on a grid, hexagons are the Clearly Superior Choice™. Unfortunately, many free game art sites only have seamless tile sets for square maps. On a past project, I used some of ...
15
votes
3answers
396 views
Regular Polygrams
Given the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2 (indicating the distance between two connected vertices), output a graphical representation of the corresponding regular ...
26
votes
11answers
2k views
Graph Florets of a Flower
Take a look at this chamomile flower:
Pretty, isn't it? Well, what if I told you that this wasn't actually one flower?
A lot of flowers (including sunflowers, chamomiles, daisies and others) ...
16
votes
0answers
359 views
Generating Picture Mazes
Challenge
Write a program/function that accepts an "image" and outputs a picture maze formed from that image.
Input
Your program should accept two arguments:
I, the image to form the maze from
S, ...
5
votes
2answers
332 views
3-D Antiferromagnetism
A while ago, we had a challenge related to antiferromagnetism (AF) in two dimensions. Now, on a 2-d square lattice, antiferromagnetic is antiferromagnetic, and that is all there is to it. Moving to ...
8
votes
1answer
294 views
Animations with all colours
Last year, there was a very popular challenge to create an image containing every 24-bit RGB colour.
My challenge is to create a smooth animation (24 frames/s say), where the colour of every pixel of ...
12
votes
15answers
2k views
Randomize points on a disc
I read about circles somewhere, and just now learned about discs (it's actually a pretty common concept) and thought about codegolf.
Your task is to randomize a point/several points on a disc with ...
10
votes
1answer
289 views
Plot a hyperbolic plane tessellation
Make a plot (Poincare disk) of a tessellation on a hyperbolic plane, such as:
The program takes four inputs:
1) How many edges/polygon (three in this example).
2) How many intersect at each ...
10
votes
8answers
662 views
Barcodegolf: Generate a number's UPC
Just about every store nowadays uses Universal Product Code (UPC) barcodes to simplify the checking out process. If the name doesn't mean anything to you, you will surely recognize what they look ...
8
votes
1answer
377 views
Golf Wars Episode I: The Phantom Lightsabers
Background theme
Introduction
Obi-Wan Kenobi, Qui-Gon Jinn and Darth Maul are about to fight! However, they've all forgotten to bring their respective lightsabers. Write a program or function ...
19
votes
4answers
1k views
Force an Average on an Image
Write a program that takes in a standard truecolor image and a single 24-bit RGB color (three numbers from 0 to 255). Modify the input image (or output a new image with the same dimensions) such that ...
0
votes
1answer
248 views
ASCII art compression
The following challenge is basically a simpler version of the one proposed by Dennis (Lossy ASCII art compression). I found the idea super interesting but a bit too convulted, and seeing as it didn't ...
79
votes
14answers
5k views
The Colors in Our Stars
Write a program that takes in a string or text file whose first line has the form
width height
and each subsequent line has the form
x y intensity red green blue
where:
width and height may be ...
35
votes
5answers
2k views
MS Paint is underrated
MS Paint was always a great time waster, but it was shunned by most graphic designers. Perhaps people lost interest because of the jarring color palette, or because of limited undo levels. Regardless, ...
15
votes
30answers
2k views
Antiferromagnetic ordering
Antiferromagnetism is what IBM researchers used to jump from a 1 terabyte disk to a 100 terabyte disk in the same amount of atoms.
In materials that exhibit antiferromagnetism, the magnetic moments ...
18
votes
4answers
745 views
Golf Your Favorite Minecraft Tool
In Minecraft, the default item textures are all reasonably simple 16×16 pixel images, which makes them seem ideal for golfing.
Below are simplified textures of the five "core" diamond tools in ...
12
votes
16answers
990 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 ...
17
votes
1answer
388 views
Chute-A-Pearing
Here are five images of pears and a steel chute:
A: B: C: D: E:
These are only thumbnails, click them for full size!
(I made these with Algodoo.)
This class of images always has the ...
6
votes
5answers
897 views
Approximate a given image using only colors from a given list
The Specs
Your program must read the image from one file and write the results to another file, the name of at least the first of which should be taken from the input
You may accept and return any ...