New answers tagged graphical-output
0
votes
Random Pixels Image Compression
Yabasic, 196 bytes
Program that takes input \$n\$ from STDIN and outputs to a 'grafic' window.
...
0
votes
Random Pixels Image Compression
Excel VBA, 145 bytes
An anonymous immediate window function that takes input from [A1] and outputs to the active worksheet. Clear input on execution.
...
0
votes
1
vote
Plot a centered circle
Applesoft BASIC, 106 bytes
0INPUTR
1HGR
2HCOLOR=3
3D=0
4HPLOTR*COS(D)+140,R*SIN(D)+96TOR*COS(D+.1)+140,R*SIN(D+.1)+96
5D=D+0.1
6GOTO4
2
votes
Draw the Archimedean Spiral
BQN, 50 bytesSBCS
(•math.Sin•Plot○(⊢×↕∘≠)•math.Cos)-2×π×999⥊99÷˜↕100
Run online!
The JS version of BQN has a plotting builtin, which I used for the same rosetta ...
1
vote
Draw the Archimedean Spiral
Applesoft BASIC, 73 bytes
0GR
1COLOR=7
2INPUTR
3I=0
4PLOTCOS(I)*I*R+20,SIN(I)*I*R+20
5I=I+.1
6GOTO4
2
votes
Draw the Archimedean Spiral
R, 42 bytes*
function(a,x=0:6e3/1e3)plot(a*x*pi*1i^x/2)
Try it at rdrr.io
Calculates the the points of the spiral as the real and imaginary parts of complex ...
2
votes
Random Pixels Image Compression
Wolfram Language (Mathematica), 93 bytes
Image/@NestList[BlockMap[Boole[#~Total~2+r[]>2]&,#,{2,2}]&,r=RandomInteger;1~r~{#,#},Log2@#]&
Try it online!...
2
votes
Random Pixels Image Compression
J, 91 bytes
load'viewmat'
[:viewmat[:,.~/[:>:&>(,:~2 2)0:`(?@2)`1:@.(1+_2*@++/@,);._3&.:>^:a:[:<,~?@$2:
Try it online!
Output from the above is ...
6
votes
Graphical Hello World
Minecraft Command Blocks, 47 bytes
summon cow ~ ~ ~ {CustomName:'"Hello, world!"'}
Spawns a cow with the name ...
0
votes
0
votes
Graphical Hello World
JavaScript (ES6), 22 bytes
alert('Hello, world!')
This is an example for my question.
7
votes
Draw the Archimedean Spiral
Minecraft Command Blocks, 599 bytes
Commands
Left column (bottom block 0, 4, -2)
...
2
votes
Draw the Archimedean Spiral
MATL, 13 bytes
9W:9/tJ*Ze*XG
Try it at MATL online!
Explanation
...
3
votes
3
votes
Draw the Archimedean Spiral
R, 49 bytes
function(a)plot(cos(t<-0:9e3/1e3)*t*a,sin(t)*t*a)
Try it on rdrr.io!
2
votes
5
votes
Draw the Archimedean Spiral
GFA-Basic 3.51 (Atari ST), 68 bytes
A manually edited listing in .LST format. All lines end with CR, including the last one.
...
3
votes
7
votes
2
votes
Draw the Archimedean Spiral
SageMath, 69 68 bytes
lambda a,t=var('t'):parametric_plot((a*t*cos(t),a*t*sin(t)),(t,0,9))
Try it online!
Saved a byte thanks to Seggan!!!
Original graph using ...
2
votes
3
votes
Draw the Archimedean Spiral
Wolfram Language (Mathematica), 22 bytes
PolarPlot[y#,{y,0,7}]&
Try it online!
I picked 7 for the plot range because it's a one-digit number that is close to \$...
2
votes
0
votes
3
votes
Draw the Ukrainian Flag
Perl 5, 36 bytes
$#a=78;print".[${_}m@a
"x13for 44,43
Try it online!
Outputs using ANSI escape sequences.
1
vote
Draw the EU Estimated Sign
PostScript, 280 140 bytes
Now smaller, with binary tokens and less precision!
...
1
vote
Draw the national flag of France
Applesoft BASIC, 122 bytes
1GR
2COLOR=2
3M=13
4X=-1
5X=X+1
6VLIN0,25ATX
7IFX<M GOTO5
8IFM==26GOTO12
9COLOR=15
10M=26
11GOTO5
12COLOR=1
13M=39
14GOTO5
0
votes
Draw the flag of Bangladesh
Perl 5 + -M5.10.0, 82 bytes
say"P6 300 180 255",map$=>((135-$_%300)**2+(90-$_/300)**2)**.5?".*A":".jN",0..54e3
Try it online!...
1
vote
0
votes
Plot a centered circle
Robocompass, 16 bytes
arc(0,0,a,0,360)
Where you have to define a before that as input.
0
votes
Plot a centered circle
Desmos, 3 bytes
r=1
Simply entering r, in my concern, doesn't work, but entering r=0 ...
2
votes
0
votes
Draw the flag of Bangladesh
Desmos, 66 bytes
This:
r=rgb(244,42,65)
g=rgb(0,106,78)
-9≤x≤11\left\{yy≤36\right\}
xx+yy≤16
This is longer than the other one, but that other one didn't work, as <...
3
votes
Draw the Ukrainian Flag
Applesoft Basic, 88 bytes
1Y=0
2M=13
3GR
4COLOR=2
5HLIN0,38ATY
6Y=Y+1
7IFY<M GOTO5
8COLOR=13
9M=26
10Y=13
11GOTO5
Kind of cheating because it only is 39:26. I ...
1
vote
1
vote
0
votes
1
vote
Draw the Swiss Flag
Desmos, 90 69 bytes
c=hsv(0,[1,0,0],1)
[0,6,13]<=x<=[32,26,19]\{[0,13,6]<=y<=[32,19,26]\}
Try it on Desmos!
-21 bytes thanks to Aiden Chow
0
votes
1
vote
Draw the flag of Bangladesh
Desmos, 64 61 bytes
r=rgb(244,42,65)
g=rgb(0,106,78)
-9<=x<=11\{yy<36\}
xx+yy<=16
Try it on Desmos!
-3 bytes thanks to Aiden Chow
1
vote
Draw the Ionising Radiation Hazard Symbol
Desmos, 60 bytes
w=hsv(0,0,1)
r<5\{[0,3,6]40<\theta<[1,3,5]60\}
xx+yy<9/4
r<1
Try it on Desmos
This is the version without scaling, now the shortest ...
0
votes
Draw the Ionising Radiation Hazard Symbol
Desmos, 95 bytes
b<=25
polygon((6,0),(3,-6),(-3,6),(3,6),(-3,-6),(-6,0),(6,0))
b<=2.25
b<=1
c=hsv(0,0,1)
b=xx+yy
Try it on Desmos!
Unsure if ...
1
vote
1
vote
Draw the Ukrainian Flag
Ly, 39 bytes
99*:3*&s*:[r009r,]+[r990r,]+'Po9lf2*f3r
Try it online!
This code pushes RGB values compatible with PPM ASCII formatted image into the stack, then ...
6
votes
0
votes
1
vote
0
votes
Draw the national flag of Iceland
pdfTeX, 108 bytes
\def~{ w 9 0 m 9 18 l s 0 9 m 25 9 l s }\pdfliteral{0 .28 .88 rg 0 0 25 18 re f 1 G 4~.84 .16 .16 RG 2~}\bye
1
vote
Top 50 recent answers are included
Related Tags
graphical-output × 331code-golf × 251
popularity-contest × 56
image-processing × 55
geometry × 42
kolmogorov-complexity × 40
ascii-art × 29
fractal × 22
code-challenge × 21
math × 20
animation × 15
random × 11
number × 8
color × 8
game × 6
tiling × 6
compression × 5
cellular-automata × 5
trigonometry × 5
game-of-life × 5
sequence × 4
integer × 4
grid × 4
path-finding × 4
hello-world × 4