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].
361 questions
21
votes
13
answers
2k
views
Draw the Gauss Star (Heptadecagram)
Background
In 1796, 18-year-old Carl Friedrich Gauss proved that a regular heptadecagon can be constructed with compass and straightedge — the first such discovery in over 2,000 years. The stonemason ...
19
votes
12
answers
2k
views
Make an animated winking smiley 😉
Recently, I've been looking more and more into retrogaming programming, and I saw this nice example from an old GBDK wiki (A tool to make Gameboy games with C, replaced by GBDK-2020):
This example ...
9
votes
6
answers
963
views
Draw a diagram of a bowline
A bowline is a knot commonly used to tie the end of a rope around something.
Your task is to draw one.
The image you generate must contain a topologically correct bowline knot. It must be drawn in ...
14
votes
3
answers
401
views
Draw the caustics in a cup
If you have ever consumed liquid from a shallow cup in sunlight, you may have noticed a shape like the following at the bottom:
You might notice a nephroid shaped bright outline, a brighter area on ...
27
votes
24
answers
5k
views
Draw the Flag of Greenland
The flag of Greenland consists of two red sections and two white sections. I'll provide a diagram below, but also give a textual description. The background of the flag is a rectangle that is 18 units ...
20
votes
12
answers
3k
views
Mexican Hat Challenge, #メキシカンハットチャレンジ
The hashtag #メキシカンハットチャレンジ* appeared on my X/twitter feed today. Japanese hackers have been drawing the "Mexican Hat Potential" 3D curve on all sorts of ...
21
votes
22
answers
2k
views
Randomly color the words
Inspired by this X post.
Write a program or function that takes a string as input and prints or otherwise renders the text with each word in a random color, e.g.:
The input will be a string of ...
8
votes
7
answers
3k
views
Waiting girl's face
In June 2023, at Xenium Party 2023, a 4KB intro created by Wacek, Luke, and Jammer for the Commodore 64 was presented, featuring the face of a waiting girl.
The task is to write the shortest possible ...
16
votes
10
answers
1k
views
Draw a Regular Reuleaux Polygon
Related: Draw A Reuleaux Triangle!, Draw a regular polygon
A Reuleaux polygon is a curve of constant width made up of circular arcs of constant radius. The most well-known Reuleaux polygon is the ...
12
votes
1
answer
488
views
Plot the ground path of a satellite
If you model a satellite as a free point orbiting a body, you can pretty easily see it has 6 degrees of freedom: three for the X, Y, and Z position, and three for the X, Y, and Z velocity. However, ...
14
votes
4
answers
1k
views
Visually arrange multi-day events on a calendar
The arrangement algorithm
I think I've determined the algorithm that Google Calendar uses to visually arrange day-long and longer events at the top of the "Week" view (you may have an ...
19
votes
5
answers
3k
views
Draw a Fibonacci Swoosh
Title courtesy of Greg Martin
For this challenge, I'll define an arc of size \$k\$ as a single piece of a sine wave with a length of \$k\$ units and an height of \$\frac{k}{4}\$ units:
And I'll ...
6
votes
7
answers
868
views
Displaying Inky the ghost from Pac-Man using ANSI escape codes
Challenge
Display Inky the ghost from Pac-Man using only ANSI escape codes.
Here's a text representation of the image
...
7
votes
3
answers
313
views
Inscribe a maximal regular polygon into a square image
You want to draw a regular polygon but you have limited space! In this challenge, you should draw a polygon with n sides which is as big as possible for a given square container image.
I found ...
15
votes
21
answers
3k
views
Output an image
Interestingly, although there are challenges that work with images, there is no challenge to simply output an image. This is that challenge
Goal: output an image in the shortest possible code.
Output: ...
16
votes
3
answers
568
views
Convert numbers to dice patterns
The way points are assigned on a dice follows a regular pattern, the center dot is present if and only if the number is odd. To represent the even numbers, pairs of dots on opposite sides of the ...
6
votes
2
answers
528
views
My eight braille pattern progressive snake spinner
Introduction
I would like to drawn a nice spinner by using eight braille patterns on two lines, drawing a square of 8x8 pixel, for showing a kind of snake growing and reducing:
...
19
votes
7
answers
2k
views
Draw the GKMS aperiodic tile
Chaim Goodman-Strauss, Craig Kaplan, Joseph Myers and David Smith found the following simple (both objectively and subjectively) polygon that tiles the plane, but only aperiodically:
Indeed they ...
9
votes
6
answers
2k
views
Draw Parcly Taxel's cutie mark
I've been a fan of My Little Pony: Friendship Is Magic for a long time, and very early on I created a pony version of myself also called Parcly Taxel (warning: may be too cute to look at). The symbol ...
27
votes
25
answers
4k
views
Draw a Gameboy Tile
Description
The Gameboy stores tiles as 2 bit-per-pixel 8x8 images, thus 16 bytes. Every two bytes is a complete row with all of the Low-bits of each pixel in the first byte, and all of the High-bits ...
16
votes
4
answers
1k
views
Create a triangle whose colors are determined by the bitsums of coordinates
Write a program that, for any \$n\$, generates a triangle made of hexagons as shown, \$2^n\$ to a side. The colors are to be determined as follows.
We may give the triangle barycentric coordinates so ...
21
votes
11
answers
2k
views
Create a nibble shorthand
I recently stumbled across this image on wikimedia commons. It's a little bit of an information overload at first, but after examining it a bit it shows an interesting number system for writing ...
-6
votes
6
answers
721
views
I'm Blue, Da ba dee da ba die
Write a program, which outputs I'm Blue, and then Da, Ba, Dee, Da, Ba, Die, forever, the words must be space-seperated in one ...
17
votes
11
answers
3k
views
Fibonacci word fractal
The Fibonacci word is a sequence of binary strings defined as:
\$F_0 = \$ 0
\$F_1 = \$ 01
\$F_n = F_{n-1} F_{n-2}\$
The first ...
3
votes
9
answers
2k
views
PUT-PIXEL in every language
During work on some project I needed to draw pixels on screen. I found some put-pixel function in JS, but code was quite big and clumsy - so I wonder, how small put-pixel function can be...
Challenge
...
31
votes
10
answers
6k
views
Draw the USA flag
I noticed that it seems nobody has posted a non-ASCII (related) USA flag challenge yet, so what better time than the 4th of July?
The Challenge
Draw the current (as of 2022) flag of the United States ...
20
votes
6
answers
1k
views
Draw this fractal generated by applying Newton's method to cosh(x) - 1
I came across this picture the other day: (Credit to Josep M Batlle I Ferrer)
Your job is to generate this picture. This graph is generated by repeatedly applying newton's method to the graph of:
$$f(...
13
votes
7
answers
2k
views
Draw the Progress Pride flag
Challenge
Create the image of a progress pride flag.
Output
Dimensions
Rules
Your program must create the image and not just load it from a website
The colours can be just your language's default ...
-3
votes
3
answers
289
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 ...
15
votes
18
answers
3k
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\$ ...
10
votes
7
answers
539
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\$ ...
4
votes
4
answers
447
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 ...
17
votes
7
answers
1k
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 ...
96
votes
90
answers
18k
views
Draw the Ukrainian Flag
As you 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 Challenge
...
9
votes
6
answers
752
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
...
-2
votes
1
answer
967
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 ...
7
votes
2
answers
387
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 ...
15
votes
2
answers
636
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 ...
-6
votes
3
answers
511
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 ...
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, \...
32
votes
61
answers
5k
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)
...
28
votes
13
answers
3k
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}\...
12
votes
8
answers
1k
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 ...
38
votes
33
answers
8k
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 ...
-3
votes
1
answer
382
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....
2
votes
0
answers
597
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 ...
16
votes
32
answers
3k
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 ...
17
votes
7
answers
1k
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!
...
18
votes
6
answers
4k
views
Draw the NASA worm logo
Introduction
On 30 May 2020, NASA and SpaceX launched a crewed rocket to the international space station on the SpaceX Demo 2 mission. This is the first time humans have been launched into orbit from ...
5
votes
3
answers
719
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 ...