使用您喜欢的绘图工具以程序方式重新创建xkcd图


18

最近已经有相当数量的问题,关于娱乐XKCD风格的图形类似以下(1064中)各种语言

http://xkcd.com/1064/

您的目标是尽可能重现任何现有的xkcd漫画。漫画必须至少具有一个简单的图形或饼图或类似元素。

获得投票最高的答案,不得早于第一个有效答案后的10天。

您的条目必须包含以图形语言显示如上所述的xkcd-comic的代码,至少使用其绘图工具(Mathematica,MatLab等)。

  • 漫画不能存储为图像,必须按程序生成
  • 原始网站,其镜像或硬盘上的内容等都不得有任何链接。

投票者应评估结果与原始内容的相似性,并在较小程度上评估解决方案的美观性。这里没有代码问题,但是期望有一个尽可能短而简单的解决方案。


3
大多数选票都不是合适的客观取胜条件 -布尔选票是如何在不同程度上考虑多个要素的?我认为这个问题可以基于每个像素的平均错误除以代码长度或类似的东西来得出客观的获胜条件,但就目前而言,它只是鼓励人们复制粘贴在其他堆栈上已被广泛使用的答案。
彼得·泰勒

1
@PeterTaylor:这就是为什么我指定它必须是现有的 xkcd漫画,因此不会进行复制的原因。多数投票是常用的标准(以及我不太喜欢的“第一个解决方案”),否则,您在这里几乎不会发现任何非代码问题的问题(也不是Golfscript赢得的)
vsz

Answers:


8

这是一个刺。

后记

[ 删除计数,因为这不是高尔夫问题。]

xkcd1064

添加了“样式”部分,使其看起来更手绘。

xkcd1064,更多“手绘”

编辑: Helvetica的反应比Courier好。调整并增强了该“样式”部分。并添加了评论。

xkcd1064,比以前更“手绘”

%!

%futz with a coordinate pair
/f { 2 { rand 100 mod 100 div 1.47 mul
        dup .4 mul sub add
        exch } repeat } def

/op 2 array def %original point
/cp 2 array def %current point
/setcp { 2 copy cp astore pop } def %set current point
/difcp { cp aload pop %x' y' x y   %diff between cp and point on stack
    3 2 roll exch sub %x' x y'-y
    3 1 roll sub %y'-y x'-x
    exch %dx dy
} def
/scale2 { /n exch def  %scale two values
    n mul exch n mul exch
} def
/add2 {
    3 2 roll add
    3 1 roll add exch
} def
%futz with a path
/fpath {
    2 {
    %flattenpath
    % replace lines with curves
    [ { setcp cp op copy pop /moveto cvx }
        {
            %cp aload pop 4 2 roll 2 copy
            2 copy difcp %x3 y3 x30 y30
            2 copy 1 4 div scale2 %x3 y3 x30 y30 (1/3)x30 (1/3)y30
            cp aload pop add2 %x3 y3 x30 y30 x1 y1
            4 2 roll 3 4 div scale2 %x3 y3 x1 y1 (2/3)x30 (2/3)y30
            cp aload pop add2 %x3 y3 x1 y1 x2 y3
            6 4 roll %x1 y1 x2 y2 x3 y3
            setcp
            /curveto cvx }
        { setcp /curveto cvx }
        { op cp copy pop /closepath cvx } pathforall ] cvx newpath exec
    % chop the curves
    flattenpath
    % futz all the points
    [ { f
        /moveto cvx }
        { f
            /lineto cvx }
        { %f
            f 6 2 roll
            f 6 2 roll
            f 6 2 roll
            2 copy
            /curveto cvx
            3 1 roll
            3{f}repeat /lineto cvx % extra triple-futz'd line after each curve
        }
        { /closepath cvx } pathforall ] cvx newpath exec
    } repeat
} def

%futz with strokes
/oldstroke /stroke load def
/stroke { fpath oldstroke } def

%futz with fills
/oldfill /fill load def
/fill { fpath oldfill } def

%make sure rectstroke doesn't bypass being futzed with
/rectstroke {
    4 2 roll moveto
    1 index 0 rlineto
    0 exch rlineto
    neg 0 rlineto
    closepath
    stroke
} def

%futz with strings
%by making sure show uses our futz'd fill
/show { gsave currentpoint newpath moveto dup
    false charpath 1{fpath}repeat fill grestore stringwidth rmoveto } def

%fatter lines
1 setlinejoin %round joins
currentlinewidth 1.9 mul setlinewidth
%chop curves very small so there's lots of points for futzing
currentflat 6 div setflat

/Helvetica 10 selectfont

<<
/in{72 mul}
>>begin
1 in 1 in translate

0 0 6 in 4 in rectstroke
1 in 3 in moveto (WALKING BACK TO MY) show
1 in 2.8 in moveto (FRONT DOOR AT NIGHT:) show

36 3.5 in moveto
0 -2.8 in rlineto
5 in 0 rlineto
3.45 in .55 in moveto
0 20 rlineto
4.05 in .55 in moveto
0 20 rlineto
2.7 in .40 in moveto
(YARD  STEPS DOOR  INSIDE ) show
0 .05 in rmoveto
.4 in 0 rlineto
currentpoint
stroke
moveto
-10 3 rlineto
0 -6 rlineto fill

2.6 in .45 in moveto
-2 in 0 rlineto
currentpoint
stroke
moveto
10 3 rlineto
0 -6 rlineto fill

(FEAR) .9 in 2.3 in moveto show
(THAT THERE'S) .9 in 2.1 in moveto show
(SOMETHING) .9 in 1.9 in moveto show
(BEHIND ME) .9 in 1.7 in moveto show
1.8 in 1.86 in moveto
2 -26 rlineto
stroke

(FORWARD) 2.2 in 2.1 in moveto show
(SPEED) 2.2 in 1.9 in moveto show
2.75 in 2 in moveto
3 -13 rlineto
stroke

(EMBARRASSMENT) 4.5 in 2.5 in moveto show
4.6 in 2.65 in moveto
-2 20
-5 22
-27 25 rcurveto
stroke

.6 setgray %gray
40 1.6 in moveto
2.7 in 0
2.9 in 20
3.2 in 1.5 in rcurveto
10 20
20 20
30 0 rcurveto
15 -1.7 in
30 -1.8 in
1.4 in -2 in rcurveto
stroke

0 0 1 setrgbcolor %blue
40 1.2 in moveto
.9 in 27
.8 in 20
1.4 in 21 rcurveto
1 in -20
1.2 in 6
1.3 in 1.6 in rcurveto
    10 20
    20 20
    30 0 rcurveto
15 -1.8 in
30 -1.9 in
1.8 in -2.1 in rcurveto
stroke

1 0 0 setrgbcolor %red
40 .9 in moveto
3.3 in 0
3.5 in 20
3.6 in 1.5 in rcurveto
10 72
20 80
30 80 rcurveto
.7 in -10
.3 in -35
1.1 in -40 rcurveto
stroke

%thank you for scrolling all the way down to here. :)

您可以向其中添加一些“手绘”样式吗?:)
Sam Ax 2012年

是。首先,我完全忽略了这方面。然后,当我跟踪链接时,我完全不知所措。胖线应该没什么大不了的。我从Casselman得到了一种重新解释路径的方法。因此,如果我能理解这些数学转换,就应该能够复制它们。比我最初想象的要大得多的任务。
luser droog 2012年

即使没有这些品质,也非常出色。
Sam Ax

造型上超棒!
山姆Ax

7

HTML5

@font-face {
  font-family: 'Humor Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Humor Sans'), local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rzluXaaPc+d2zEVhoqWdXJ+mrkxXzfYOG3HugpDpHy/pM8hxsx7ZDzFxU23MVbeqrrBDSMbqiw1t85Ds9BFVynLJjQNdiygYP8tuX4Zlcziqeynl9ng9QjlbzWuX5l/bj1m489DTHHJ2+C/mpV/83OnbVOa2rnJJqPzUTLFnZM1lJswaf9chglGOOfHuTuLf3QZav4Cg/GRt3jabcNHMgMAAADAlSBRI3onokfvXZDo0Xs34+gZvMDV0QuMcvI2jLOdWQF/vp/d+c/97ywBQdly5AoJy5OvQKEixSJKRJUqU65CpSrVatSqU69BoybNYlrEtWrTrkOnLt0SevTq02/AoCHDRowaM27CpCnTZsyaMy9pwaIlKWnLVqxas27Dpowt23bs2rPvwKEjx06cOnPuwqUr127cevDoxZNXHz69eff1A6d8G4QA") format('woff');
}
body {
    font-family: 'Humor Sans';
    margin: 2em;
    background: #DDD;
    text-shadow: 1px 1px 2px #FFF;
}
h1 {
    font-family:Lucida,Helvetica,sans-serif;
}
.h1d {
    display: inline;
    font-size: .8em;
}
path,rect { fill: none;
    stroke:#000000;
    stroke-width:0.00329859;
    stroke-linecap:butt;
    stroke-linejoin:round;
    stroke-miterlimit:10.43299961;
 }
text {
    text-align:start;
    letter-spacing:0px;
    word-spacing:0px;
    writing-mode:lr-tb;
    font-size:14px;
    text-anchor:start;
    fill:#000000;
    fill-opacity:1;
    stroke:none;
    font-family:Humor Sans;
}
text {
    font-size:0.01944444px;
    text-anchor:middle;
    fill:#000000;
    fill-opacity:1;
    stroke:none;
    font-family:Humor Sans;
}
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Front Door ( from xkcd.com 1064 )</title>
  </head>
<body><h1>Front Door <div class="h1d">( from xkcd.com 1064 )</div></h1>
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="434"
   version="1.1" viewBox="0 0 0.7876308 0.53355077">
  <defs>
    <marker id="Aen" style="overflow:visible">
      <path d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" transform="matrix(-0.4,0,0,-0.4,-4,0)"
         style="fill-rule:evenodd;fill:#000;stroke:#000000;stroke-width:1pt" />
    </marker>
    <marker orient="auto" id="Ast" style="overflow:visible">
      <path d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         transform="matrix(-0.4,0,0,-0.4,-1.4,0)"
         style="fill-rule:evenodd;fill:#000;stroke:#000000;stroke-width:1pt" />
    </marker>
  </defs>
  <rect width="0.75612795" height="0.50201935" x="0.015758738" y="0.015780471" />
  <path d="m 0.08162198,0.08036774 c -3.384e-4,3.2166e-4 -7.6617e-4,0.35262886 -7.6617e-4,0.35262886 0,0 0.20318503,-6.6026e-4 0.29000566,-0.003213 0.0402085,3.6731e-4 0.0806898,-1.3866e-4 0.12100339,-4.2191e-4 0.0422491,-4.676e-5 0.0848177,0.001196 0.12714108,1.4026e-4 0.0292134,0.0012 0.0579496,7.8663e-4 0.0872307,8.041e-5" />
  <path d="M 0.45045642,0.44967094 C 0.45097434,0.43767424 0.44992661,0.42569324 0.4498655,0.41370014" />
  <path d="m 0.52462262,0.44857719 c 0.001364,-0.0112841 -0.001303,-0.022673 8.8508e-4,-0.0339046" />
  <path d="m 0.34455432,0.46185837 c -0.0838098,-0.00177 -0.16763839,9.02e-5 -0.25145536,-4.499e-4" style="marker-end:url(#Ast)" />
  <path d="m 0.36372087,0.26833529 c 3.15e-6,-3.093e-5 0.003925,0.021959 0.003958,0.0219625" />
  <path d="m 0.59455272,0.18635665 c 0.00168,-0.0249062 -0.0194278,-0.0449558 -0.0436226,-0.042955 -0.001466,-1.5486e-4 -0.002932,-3.0973e-4 -0.004398,-4.6459e-4" />
  <path d="m 0.08896568,0.31883844 c 0.0589995,-0.004388 0.11835478,4.8486e-4 0.17689559,-0.007727 0.0452821,-0.002558 0.0920316,-0.008761 0.13292997,-0.0296799 0.0495136,-0.0206019 0.0702543,-0.0754087 0.082167,-0.12423165 -0.001544,-0.0316524 0.0363005,-0.0771322 0.0574533,-0.031946 0.009799,0.0468904 0.0124403,0.0957944 0.0257953,0.14199884 0.0103229,0.0424564 0.0381648,0.0821154 0.0814383,0.0955288 0.0230248,0.006738 0.0463641,0.0136174 0.0701731,0.01698" style="stroke:#888" />
  <path d="m 0.08766361,0.36678952 c 0.0463076,-0.0161779 0.0920382,-0.0420708 0.14283849,-0.0357173 0.0467333,-0.004581 0.0974621,0.0266481 0.14082991,-0.00179 0.0400306,-0.0301432 0.041483,-0.0866619 0.0490443,-0.13214834 0.003929,-0.030081 -0.00375,-0.0999028 0.0422392,-0.0879794 0.0291414,0.0376662 0.0177989,0.0902038 0.0319018,0.1336763 0.009362,0.0507676 0.0330856,0.10817744 0.0871312,0.12415282 0.0508722,0.0193263 0.0767224,0.0174745 0.11889504,0.0257316" style="stroke:#00f" />
  <path d="m 0.08912193,0.4046365 c 0.10169167,1.097e-5 0.2041028,3.5438e-4 0.3047905,-0.0155419 0.0458292,-0.008171 0.0971567,-0.0242812 0.12178371,-0.0670869 0.025388,-0.0534434 0.0183231,-0.11451516 0.0333489,-0.17061477 -0.003977,-0.0433016 0.0436224,-0.0993166 0.0831427,-0.0568712 0.0246552,0.0226559 0.0477548,0.0560862 0.0858377,0.0521295" style="stroke:#f00" />
  <path d="m 0.70840577,0.46185837 c -0.002849,8.248e-5 -0.0849355,0.001616 -0.0849355,0.001616" style="marker-start:url(#Aen)" />
  <path d="m 0.24465913,0.2858699 c 9.6794e-4,0.0147144 0.001383,0.0294673 0.002814,0.0441494" />
  <text x="100.15588" y="48.485607" transform="scale(0.00138889,0.00138889)"
    style="font-size:14px;text-anchor:start">
    <tspan x="100.15588" y="48.485607" id="tspan7010">WALKING BACK TO MY</tspan>
    <tspan x="100.15588" y="65.285591" id="tspan7012">FRONT DOOR AT NIGHT:</tspan></text>
  <rect width="0.24843951" height="0.065260872" x="0.12345294" y="0.039088331" />
  <text x="0.23551519" y="0.20231472"><tspan x="0.23551519" y="0.20231472">fear</tspan>
    <tspan x="0.23551519" y="0.22564805">ThAT there's</tspan>
    <tspan x="0.23551519" y="0.24898137">something</tspan>
    <tspan x="0.23551519" y="0.2723147">behing me</tspan></text>
  <text x="0.36015913" y="0.22917171"><tspan x="0.36015913" y="0.22917171">fORWarD</tspan>
    <tspan x="0.36015913" y="0.25250503">SPEED</tspan></text>
  <text x="0.37393194" y="0.46812996"><tspan x="0.37393194" y="0.46812996">yarD</tspan>
    <tspan x="0.45037103" y="0.46812996">step</tspan>
    <tspan x="0.52267832" y="0.46812996">door</tspan>
    <tspan x="0.58878779" y="0.46812996">inside</tspan></text>
  <text x="0.63905853" y="0.20506927">
    <tspan x="0.63905853" y="0.20506927">emBARRASSMENT</tspan></text>
</svg>
</body></html>


4

蟒蛇

在matplotlib中使用了稍微作弊的xkcd方法:

import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter1d

plt.xkcd()

x = np.linspace(0,10,1000)
unit = np.linspace(0,1,100)

speed = np.r_[np.ones(500)*3,3+5*unit**4.,np.ones(100)*8,1+7*unit[::-1]**2,np.ones(200)]
speed = gaussian_filter1d(speed,18)

fear = np.r_[np.linspace(0.5,2,450),2+6*unit**4,np.ones(100)*8,8*unit[::-1]**2,np.zeros(250)+0.1]
fear = gaussian_filter1d(fear,18)
fear_gauss_bump = 0.8*np.exp(-np.power(x-2.5,2.)/(2*np.power(1, 2.)))
fear += fear_gauss_bump

embarrassment = np.r_[np.zeros(600)+0.1, 9.5*unit**2, 9.5-np.linspace(0,1.5,300)]
embarrassment = gaussian_filter1d(embarrassment,60)

plt.figure(figsize=(12,6))
plt.plot(x,speed,c="gray")
plt.plot(x,fear,c="#1E9FDB")
plt.plot(x,embarrassment,c="r")

plt.plot([2.5,2.7],[3.9,2.3],c='k')
plt.plot([4.3,4.5],[3.6,3.1],c='k')
plt.plot(np.linspace(7.3,7.8,15),(0.25-(np.linspace(7.3,7.8,15)-7.3)**2)**0.5+7,c='k')

ax = plt.gca()
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.get_xaxis().tick_bottom()
ax.get_yaxis().tick_left()
#plt.ylim([0,10])
ax.set_xticks([6,7])
ax.set_xticklabels(["STEPS","DOOR"])
ax.set_yticks([])

ax.text(2,4,"FEAR\nTHAT THERE'S\nSOMETHING\nBEHIND ME",horizontalalignment='center')
ax.text(3.9,3.4,"FORWARD\nSPEED",horizontalalignment='center')
ax.text(7.4,6.6,"EMBARRASSMENT")
ax.text(1,8,"WALKING BACK TO MY\nFRONT DOOR AT NIGHT:",bbox={'facecolor':'none', 'edgecolor':'black'})
ax.annotate("YARD", xy=(0.5,-0.3), xytext=(4.5,-0.4),annotation_clip=False,arrowprops={'facecolor':'black', 'shrink':0.01, 'width':0.5})
ax.annotate("INSIDE", xy=(10,-0.3), xytext=(7.5,-0.4),annotation_clip=False,arrowprops={'facecolor':'black', 'shrink':0.01, 'width':0.5})

plt.show()

在此处输入图片说明

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.