Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [graphical-output]

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].

Filter by
Sorted by
Tagged with
-2 votes
3 answers
140 views

Graphical Hello World [closed]

In this challenge, you will create the shortest graphical program that displays exactly "Hello, world!" You will need no input. You might be asking yourself, "what does he mean by ...
user avatar
10 votes
13 answers
1k views

Draw the Archimedean Spiral

Overview I was playing with Desmos and discovered a really cool spiral: Doing some research, I discovered that this spiral was the Archimedian spiral. Every point on the spiral is exactly \$\theta\$ ...
user avatar
  • 2,597
8 votes
6 answers
233 views

Random Pixels Image Compression

Challenge: Given an integer \$n\$, guaranteed to be \$\geq2\$ and a power of 2, we are going to draw multiply boards either side-by-side or below one another, where the first has dimensions of \$n\$ ...
user avatar
2 votes
2 answers
268 views

Draw New Posts' Profile!

New Posts and New Sandbox Posts are chatbots that occupy CGSE's main chatroom, The Nineteenth Byte. They've been doing their jobs for almost one full year now, so I thought I'd make a challenge to ...
user avatar
  • 3,224
16 votes
7 answers
547 views

Translate Text into Matoran

The Matoran Alphabet is the alphabet used by many of the characters in the Bionicle universe. Your challenge is to create a program or function that takes a string as input and creates an image of ...
user avatar
73 votes
53 answers
11k views

Draw the Ukrainian Flag

As you will probably know, there is a war going on in Ukraine. I noticed that it seems nobody has posted a Ukrainian flag challenge yet, so I thought I'd do it myself in support of Ukraine. The ...
user avatar
  • 3,224
8 votes
6 answers
552 views

Diagram of the Utmost Extremes

The Mathematica SE question Creating the Yin Yang symbol with minimal code seems to be an out-of-the-box ready-to-go Code Golf SE question! The following code creates the Yin Yang symbol ...
user avatar
  • 511
-1 votes
1 answer
254 views

Draw Lines in ASCII [closed]

Challenge Draw lines in ASCII corresponding to given inputs: in the first line there are given size of rows and columns of the view and number of separators between each point in the second line is ...
user avatar
  • 179
6 votes
2 answers
250 views

Temporally Dither an Image (Image to PWM Image)

Background I want to display rich, vibrant images on my theoretical fancy custom display, but due to budget constraints, it displays everything in 3-bit colour! Whilst Regular Dithering would work, I ...
user avatar
  • 8,394
14 votes
2 answers
489 views

Draw me a shape

The game shapez.io has a lot of shapes. In my previous challenge, the object was to generate a random code for a shape. Now, your challenge is to render a shape. Specs Shapes Each shape has a unique ...
user avatar
  • 27.6k
-6 votes
3 answers
405 views

Make a GUI window in any language using minimum "different characters" [closed]

I want you to make a gui window like this: * if you're thinking, the [quit] button closes the window in any language using minimum "different" characters.. AND remember that the gui window ...
user avatar
19 votes
10 answers
1k views

Ploughed fields via moduli

Let \$R, C\$ be positive integers and let \$0 < s \leq 1\$. Consider the \$R \times C\$ matrix \$\mathbf M\$ defined as \begin{equation} M(i,j) = \frac{\mathrm{mod}\,(j, i^s)}{R^s}, \quad i = 1, \...
user avatar
  • 99.4k
24 votes
29 answers
1k views

Create a Pride Flag

Challenge Create the image of a pride flag (rainbow flag), i.e. a six coloured striped flag (from top to bottom): red, orange, yellow, green, blue, and violet. Output Example (R) ...
user avatar
  • 341
25 votes
12 answers
2k views

Collatz's ice cream cone factory

The Collatz sequence Given a positive integer \$a_1\$, the Collatz sequence with starting value \$a_1\$ is defined as \begin{equation} a_{n+1} = \begin{cases} a_n/2 & \mathrm{if}\ a_n\ \mathrm{is}\...
user avatar
  • 99.4k
11 votes
8 answers
982 views

Recreate the Stack Overflow logo

In response to here. Unlike the previous one, this focuses on code-golf and a new logo, no longer consisting of 6 sticks and the graying-effect as the position of the sticks go deeper. Make the Stack ...
user avatar
36 votes
32 answers
6k views

Draw the flag of Bangladesh

The flag of Bangladesh is very simple. It looks like below: The flag will be in bottle green (#006a4e) and rectangular in size in the proportion of length to width of 10:6, with a red circle in near ...
user avatar
  • 11.9k
-3 votes
1 answer
203 views

Fill the screen in 6502asm.com [closed]

Introduction I've always liked the idea of finding the most possible bang-for-your-buck squeezed out of a tiny chip, like the 6502. Of course, I'll need to start small. Filling the screen on 6502asm....
user avatar
  • 61
2 votes
0 answers
384 views

Make a QR quine [closed]

A "qruine" if you will :) Design a QR code that legibly spells with its pixels (or the space between them) the text that it scans to. For example, this QR code scans to the letter A, and ...
user avatar
  • 1,447
16 votes
32 answers
2k views

Plot a centered circle

Intro Given radius \$r\$, draw a circle in the center of the screen. Sandbox. The Challenge Here is a simple challenge. Plot a circle using the formula \$x^2+y^2=r^2\$, or any other formula that will ...
user avatar
  • 25.2k
15 votes
7 answers
988 views

Draw the "{🏅} CODE GOLF & coding challenges" logo!

Wow, time really flies! It's already been one year since the debut of the Code Golf Stack Exchange site design. Let's celebrate this milestone with a code golf challenge... to imitate the site logo! ...
user avatar
  • 7,781
17 votes
6 answers
3k views

Draw the NASA worm logo

Introduction On 30 May 2020, NASA and SpaceX launched a manned rocket to the international space station on the SpaceX Demo 2 mission. This is the first time humans have been launched into orbit from ...
user avatar
5 votes
3 answers
636 views

Solve the Rook's Round Trip

The riddle In yesterday's newspaper, I found a puzzle in which a Rook should start in the lower-left corner of a 12x12 checkerboard and then, during a round trip, visit each field exactly once except ...
user avatar
  • 147
25 votes
6 answers
3k views

Tile the plane with squashed hexagons

I came across an interesting tiling of the plane using squashed hexagons in a popular math book. All the six edges of the squashed hexagon are the same length. Two opposite corners are right angles ...
user avatar
  • 20.5k
15 votes
11 answers
3k views

Create pixel art!

The task Given an image as input, your task is to do the following: Resize the image so it is At least 2 times smaller, but still has the same width/height ratio by taking every second (if resized ...
user avatar
  • 3,890
19 votes
5 answers
1k views

Generate Green Spray Paint Patterns

This challenge is about creating these neat "green spray paint" patterns: (more pictures below) Loosely explained, they are generated by starting with a black image and a point in the center. ...
user avatar
8 votes
7 answers
669 views

Produce an image based on an elementary cellular automata ruleset

What is elementary cellular automata? Since I'm not sure I'll be able to explain this so that somebody who has never heard of this is able to understand, I'm giving an explanation from https://...
user avatar
  • 3,890
27 votes
11 answers
3k views

Any lips images

Introduction The \$n\$-ellipse is a generalization of the ellipse with possibly more than two foci. Specifically, given \$n\$ points on the plane, called foci, the \$n\$-ellipse is the set of points ...
user avatar
  • 99.4k
45 votes
36 answers
7k views

Draw the Ionising Radiation Hazard Symbol

Draw the ionising-radiation-hazard-symbol in an arbitrary colour on a distinctly coloured background. The specific proportions were published in the June 27th 1974 issue of the Federal Register of the ...
user avatar
  • 43k
9 votes
7 answers
978 views

Draw the flag of Tennessee

The flag of Tennessee is specified by chapter 498 of the Public Acts of 1905. An oblong flag or banner in length one and two thirds times its width, the large or principal field of same to be of ...
user avatar
  • 1,447
5 votes
4 answers
559 views

Codegolf : the HEX [closed]

INTRODUCTION I like Karma Fields : he's a music producer that creates original music tracks. His artwork also matches up really well his style. He has a logo witch I find really interessing : GOAL ...
user avatar
7 votes
6 answers
1k views

Creating a 16x16(NxN) grid [closed]

This is my first question in Code golf I found it in stack-overflow (originally in JavaScript however all languages are acceptable): Render on screen NxN (where N ...
user avatar
73 votes
22 answers
19k views

Draw the ☣ (Biohazard Symbol)

Draw the Biohazard symbol in an arbitrary colour on a distinctly coloured background. The specific proportions were published in the June 27th 1974 issue of the Federal Register of the US Government. ...
user avatar
  • 43k
14 votes
2 answers
964 views

Create the least compressible picture

"A picture is worth a thousand words"—so the old saying goes. The average word is about four characters long, so a picture conveys 4kB of information. But how much entropy, rather than information, ...
user avatar
  • 1,447
12 votes
2 answers
936 views

Tile the chessboard with four-colored triominoes

Task: Consider the problem: "given a chessboard with one square missing, cut it into 21 L-triominoes". There is a well-known constructive proof that this can be done for any square ...
user avatar
  • 9,228
17 votes
3 answers
509 views

Bridge the Gaps

Given a black and white image with a white background and a set of black dots, paint a set of white pixels red, such that there is a path between each pair of black pixels. Details A path is a set ...
user avatar
  • 43k
46 votes
12 answers
3k views

Prime parity peregrination

The purpose of this challenge is to graphically depict a walk on the plane, where the direction of each step \$k\$ is determined by the primality of \$k\$ and the parity of its binary expansion. ...
user avatar
  • 99.4k
11 votes
1 answer
373 views

Self-displaying image [closed]

Background There are self-extracting .ZIP files. Typically they have the extension .EXE (and by executing the file they will be ...
user avatar
8 votes
5 answers
2k views

Using the smallest number of bytes of code, write a program that produces this image

Context: Gynvael Coldwind, a famous security researcher, published a contest in his blog post (that is now complete). The goal was similar to the one described here, but with certain restrictions ...
user avatar
  • 397
13 votes
12 answers
3k views

Draw the Easter Bunny

This happy individual is known in folklore as the Easter Bunny. Colours It is created using 4 colours: Light pink Dark pink White Black (I'm happy for these colours to be approximated in your ...
user avatar
  • 11.1k
50 votes
57 answers
7k views

Generate an RGB colour grid

This! is an RGB colour grid... Basically it's a 2-dimensional matrix in which: The first row, and the first column, are red. The second row, and the second column, are green. The third row, and the ...
user avatar
  • 11.1k
9 votes
6 answers
606 views

Sub-pixel Zooming

Your task is to take a 24 BPP sRGB image and output the same image upscaled 3x into red, green, and blue subpixels. The resulting image will be made entirely of pure black, red, green, and blue pixels....
user avatar
  • 9,791
12 votes
29 answers
6k views

Make a transparent 448*448 image

This is a simple challenge. The task is to write code that outputs a 448*448 square image with 100% transparency. The output should follow the standard image rules.
user avatar
16 votes
9 answers
2k views

Drawing the Peano curve

Introduction In geometry, the Peano curve is the first example of a space-filling curve to be discovered, by Giuseppe Peano in 1890. Peano's curve is a surjective, continuous function from the unit ...
user avatar
  • 287
6 votes
4 answers
1k views

Generate Matlab plot markers

Matlab has a useful command for visualizing data: plot. It draws data points using "markers" in 2-D space, connecting them with lines; however, for this challenge, ...
user avatar
  • 12k
9 votes
14 answers
3k views

Draw a times table (also called modular multiplication circle) of a number \$n\$ with \$k\$ vertices

Not to be confused with this question. You need to draw a times table (also known as Cremona's method for cardioid generation) as shown in this video. The number \$n\$ and \$k\$ will be the inputs. ...
user avatar
33 votes
8 answers
989 views

Can square tree rings be generated from primes?

Apparently yes! In three easy steps. Step 1 Let f(n) denote the prime-counting function (number of primes less than or equal to n). Define the integer sequence s(n) as follows. For each positive ...
user avatar
  • 99.4k
18 votes
2 answers
3k views

Implement the Boids algorithm

Introduction The Boids Algorithm is a relatively simple demonstration of emergent behavior in a group. It has three main rules, as described by its creator, Craig Reynolds: The basic flocking model ...
user avatar
  • 602
20 votes
1 answer
421 views

Foam Bath Letters

If you have a small child in your house, you may have come across foam bath letters. These can be moistened and stuck to flat surfaces such as tiles and the side of the bath to make words and messages....
user avatar
  • 631
39 votes
27 answers
11k views

Happy Birthday, Finland!

Introduction As is known, in 2017, Finland celebrates its 100 years of independence. To mark the occasion, it is your job to produce a Finnish flag for everyone's enjoyment. Challenge Create a ...
user avatar
  • 959
15 votes
6 answers
2k views

How to code colors in hex

Hexagonal tessellations, or tilings of the plane, are three-colorable -- meaning that using only three colors, such as Red, Blue, and Green, every hexagon can be colored without any two hexagons that ...
user avatar
  • 42.8k

1
2 3 4 5
7