空间想象:立方体迭代后所形成的三维分形图形

    今年一月份,California的一个数学艺术展览会上出现了这样一种神奇的三维图形。放出图片之前,你能根据下面的文字描述想象出这个图形的样子吗?
    给定一个单位大小的立方体,在其中5个面的中心放置一个边长为1/2的小立方体;这5个小立方体中的每一个都有5个面露在外面,在这25个面中的每一个面中心再向外拼接一个边长为1/4的小立方体;然后每个1/4小立方体的5个暴露在外的面上再放置1/8大小的立方体……不断迭代下去后,最终会形成一个什么样的三维图形?

      

    上图就是按照要求迭代11次的样子,里面那个斜着放的红色立方体是最初的那个单位立方体,外面拼接了5个橙色立方体,每个橙色立方体外面又拼接了5个黄绿黄绿的小立方体……最终的形状大致是一个四棱锥,上面有很多三角形的洞,这些被挖去的部分恰好组成了最经典的分形图形——Sierpinski三角形。这是由艺术家Robert Fathauer发现的,在展览上的名字叫做Fractal Crystal No.1。

查看更多:http://www.bridgesmathart.org/art-exhibits/jmm08/

另类分形图形赏:2007年分形艺术大赛获奖作品

从2007年分形艺术大赛(Benoit Mandelbrot Fractal Art Contest)中选了几个自己感觉不错的图与大家分享。

图片按以下三个原则来选取:
1. 严格符合分形图形的定义
2. 与以往的分形图形风格很不一样
3. 很好看:)

查看全部获奖作品:http://www.fractalartcontests.com/2007/winners.php
查看全部参赛作品:http://www.fractalartcontests.com/2007/entries.php

Geek饰物DIY:粘土工艺之Sierpinski三角形

    一提到水果,人们首先想到的往往是苹果;一提到AV女优,最先想到的总是武腾兰;同样地,一提到分形图形,大多数人都会首先想起Sierpinski三角形。Sierpinski三角形可能是最具有代表性的分形图形了,随身佩戴一个Sierpinski三角形绝对够酷。回想Sierpinski三角形的构造方法,将三个同样的三角形的边长缩小一半,再与一个空白的倒三角相拼即可得到一个更高阶的Sierpinski三角形。这种构造方法非常简单,它是在现实生活中最容易构造的分形图形之一,你所需要的仅仅是一种可以拉伸变形的材料。

  
1. 准备好两种颜色的软陶泥(比如蓝色和白色);
2. 捏出四个三角形的长条,三个蓝色的,一个白色的;
3. 把这四个长条拼成一个大三角形

  
4. 把这个长条拉长到原来的四倍(因此横截面积缩小到原来的1/4)

  
5. 切下三段一样长的长条,再捏一个同样大小的白色三角形长条
6. 重复步骤3到5

  
    第7次迭代后,我们得到了2187个三角形,很多细节已经看不清了,此时你可以把它近似地看作一个Sierpinski三角形。接下来你要做的,就是用金属把它串起来,最后烘烤成形即可。钥匙链、手机链、耳环、项链……想拿它干啥就干啥吧。

查看更多:http://www.evilmadscientist.com/article.php/fimofractals

神奇的分形艺术(四):Julia集和Mandelbrot集

    考虑函数f(z)=z^2-0.75。固定z0的值后,我们可以通过不断地迭代算出一系列的z值:z1=f(z0), z2=f(z1), z3=f(z2), …。比如,当z0 = 1时,我们可以依次迭代出:

z1 = f(1.0) = 1.0^2 – 0.75 = 0.25
z2 = f(0.25) = 0.25^2 – 0.75 = -0.6875
z3 = f(-0.6875) = (-0.6875)^2 – 0.75 = -0.2773
z4 = f(-0.2773) = (-0.2773)^2 – 0.75 = -0.6731
z5 = f(-0.6731) = (-0.6731)^2 – 0.75 = -0.2970

    可以看出,z值始终在某一范围内,并将最终收敛到某一个值上。
    但当z0=2时,情况就不一样了。几次迭代后我们将立即发现z值最终会趋于无穷大:

z1 = f(2.0) = (2.0)^2 – 0.75 = 3.25
z2 = f(3.25) = (3.25)^2 – 0.75 = 9.8125
z3 = f(9.8125) = (9.8125)^2 – 0.75 = 95.535
z4 = f(95.535) = (95.535)^2 – 0.75 = 9126.2
z5 = f(9126.2) = (9126.2)^2 – 0.75 = 83287819.2

    经过计算,我们可以得到如下结论:当z0属于[-1.5, 1.5]时,z值始终不会超出某个范围;而当z0小于-1.5或大于1.5后,z值最终将趋于无穷。
    现在,我们把这个函数扩展到整个复数范围。对于复数z0=x+iy,取不同的x值和y值,函数迭代的结果不一样:对于有些z0,函数值约束在某一范围内;而对于另一些z0,函数值则发散到无穷。由于复数对应平面上的点,因此我们可以用一个平面图形来表示,对于哪些z0函数值最终趋于无穷,对于哪些z0函数值最终不会趋于无穷。我们用深灰色表示不会使函数值趋于无穷的z0;对于其它的z0,我们用不同的颜色来区别不同的发散速度。由于当某个时候|z|>2时,函数值一定发散,因此这里定义发散速度为:使|z|大于2的迭代次数越少,则发散速度越快。这个图形可以编程画出。和上次一样,我用Pascal语言,因为我不会C的图形操作。某个MM要过生日了,我把这个自己编程画的图片送给她^_^

{$ASSERTIONS+}

uses graph;

type
   complex=record
      re:real;
      im:real;
   end;

operator * (a:complex; b:complex) c:complex;
begin
   c.re := a.re*b.re - a.im*b.im;
   c.im := a.im*b.re + a.re*b.im;
end;

operator + (a:complex; b:complex) c:complex;
begin
   c.re := a.re + b.re;
   c.im := a.im + b.im;
end;

var
   z,c:complex;
   gd,gm,i,j,k:integer;
begin
   gd:=D8bit;
   gm:=m640x480;
   InitGraph(gd,gm,'');
   Assert(graphResult=grOk);

   c.re:=-0.75;
   c.im:=0;
   for i:=-300 to 300 do
   for j:=-200 to 200 do
   begin
      z.re:=i/200;
      z.im:=j/200;
      for k:=0 to 200 do
      begin
         if sqrt(z.re*z.re + z.im*z.im) >2 then break
         else z:=(z*z)+c;
      end;
      PutPixel(i+300,j+200,k)
   end;

   readln;
   CloseGraph;
end.

    代码在Windows XP SP2,FPC 2.0下通过编译,麻烦大家帮忙报告一下程序运行是否正常(上次有人告诉我说我写的绘图程序不能编译)。在我这里,程序运行的结果如下:

    这个美丽的分形图形表现的就是f(z)=z^2-0.75时的Julia集。考虑复数函数f(z)=z^2+c,不同的复数c对应着不同的Julia集。也就是说,每取一个不同的c你都能得到一个不同的Julia集分形图形,并且令人吃惊的是每一个分形图形都是那么美丽。下面的六幅图片是取不同的c值得到的分形图形。你可能不相信这样一个简单的构造法则可以生成这么美丽的图形,这没什么,你可以改变上面程序代码中c变量的值来亲自验证。

c = 0.45, -0.1428
  

c = 0.285, 0.01
  

c = 0.285, 0
  

c = -0.8, 0.156
  

c = -0.835, -0.2321
  

c = -0.70176, -0.3842
  

    类似地,我们固定z0=0,那么对于不同的复数c,函数的迭代结果也不同。由于复数c对应平面上的点,因此我们可以用一个平面图形来表示,对于某个复数c,函数f(z)=z^2+c从z0=0开始迭代是否会发散到无穷。我们同样用不同颜色来表示不同的发散速度,最后得出的就是Mandelbrot集分形图形:
    

    前面说过,分形图形是可以无限递归下去的,它的复杂度不随尺度减小而消失。Mandelbrot集的神奇之处就在于,你可以对这个分形图形不断放大,不同的尺度下你所看到的景象可能完全不同。放大到一定时候,你可以看到更小规模的Mandelbrot集,这证明Mandelbrot集是自相似的。下面的15幅图演示了Mandelbrot集的一个放大过程,你可以在这个过程中看到不同样式的分形图形。

网上可以找到很多小程序实现Mandelbrot集的放大过程。把上面给出的代码改一改,你也可以写出一个这样的程序来。

Update:2011 年 8 月 31 日,我对这个话题做了更进一步的讨论 http://www.matrix67.com/blog/archives/4570

十个有趣的英文文字游戏(下)

Ambigram
    Ambigram是指把一个单词或短语写成对称的样子,这样从两个不同的角度看这个图形都能读出这个单词或短语。例如,下面一个图形就是单词Ambigram的Ambigram:
      

    ambigram.com的首页有个这样的图片:
      

    Wikipedia上有这样一个Ambigram:
      

    最后来看一个左右轴对称的Ambigram(献丑了):
      

    Erich Friedman教授为他的朋友创作了很多Ambigram。你可以在他的个人主页上看到。

Alphametic
    Alphametic是指,把一句话写成加法算式,每一个字母表示一个数字,那么这个“虫食算”有唯一解。最常见的Alphametic可能是这个:
    SEND + MORE = MONEY
    它的唯一解是9567 + 1085 = 10652

    另一些Alphametic如下:
    FIFTY + STATES = AMERICA
    TERRIBLE + NUMBER = THIRTEEN
    EARTH + AIR + FIRE + WATER = NATURE
    SATURN + URANUS + NEPTUNE + PLUTO = PLANETS

    1969年,有人发现了这样一个有趣的Alphametic:
    THREE + THREE + TWO + TWO + ONE = ELEVEN

    这样的Alphametic叫做Doubly-True Alphametic。可以证明上面这个Doubly-True Alphametic是合法的Alphametic中“最小的”一个。另外两个稍微大一点的Doubly-True Alphametic为:
    SEVEN + SEVEN + SIX = TWENTY
    EIGHT + EIGHT + TWO + ONE + ONE = TWENTY

Mnemonic
    Mnemonic本意是可以帮助记忆的句子。例如,我原来记together这个单词就记作We want to get her。再比如,arithmetic可以记作A Rat In Tom's House Might Eat Tom's Ice Cream(每个单词的首字母)。当然,也有一些专门搞笑的Mnemonic,比如Microsoft = Most Intelligent Customers Realize Our Software Only Fools Them,而Macintosh = Most Applications Crash. If Not, The Operating System Hangs。
    数学家George Pólya(就是Pólya置换定理的那个Pólya)曾说过一句经典的话:How I need a drink, alcoholic of course, after the heavy chapters involving quantum mechanics! 依次数出每个单词的字母个数,你会惊讶的发现它正好是圆周率的前15位。后来又有人在后面加上一句All of thy geometry, Herr Planck, is fairly hard,让圆周率长度增加到24位。另一些圆周率的Mnemonic如下:
    Can I have a large container of orange juice?
    May I have a white telephone, or pastel color?
    How I wish I could calculate pi faster.
    For a girl I loved contrived; by nature tough, her heart survived.

    下面这首诗给出了圆周率的前740位。其中10个字母的单词表示一个数字0,字母数大于10的单词则表示两位数。

Poe, E.
      Near a Raven

Midnights so dreary, tired and weary.
    Silently pondering volumes extolling all by-now obsolete lore.
During my rather long nap – the weirdest tap!
    An ominous vibrating sound disturbing my chamber's antedoor.
        "This", I whispered quietly, "I ignore".

Perfectly, the intellect remembers: the ghostly fires, a glittering ember.
    Inflamed by lightning's outbursts, windows cast penumbras upon this floor.
Sorrowful, as one mistreated, unhappy thoughts I heeded:
    That inimitable lesson in elegance – Lenore –
        Is delighting, exciting…nevermore.

Ominously, curtains parted (my serenity outsmarted),
    And fear overcame my being – the fear of "forevermore".
Fearful foreboding abided, selfish sentiment confided,
    As I said, "Methinks mysterious traveler knocks afore.
        A man is visiting, of age threescore."

Taking little time, briskly addressing something: "Sir," (robustly)
    "Tell what source originates clamorous noise afore?
Disturbing sleep unkindly, is it you a-tapping, so slyly?
    Why, devil incarnate!–" Here completely unveiled I my antedoor–
        Just darkness, I ascertained – nothing more.

While surrounded by darkness then, I persevered to clearly comprehend.
    I perceived the weirdest dream…of everlasting "nevermores".
Quite, quite, quick nocturnal doubts fled – such relief! – as my intellect said,
    (Desiring, imagining still) that perchance the apparition was uttering a whispered "Lenore".
        This only, as evermore.

Silently, I reinforced, remaining anxious, quite scared, afraid,
    While intrusive tap did then come thrice – O, so stronger than sounded afore.
"Surely" (said silently) "it was the banging, clanging window lattice."
    Glancing out, I quaked, upset by horrors hereinbefore,
        Perceiving: a "nevermore".

Completely disturbed, I said, "Utter, please, what prevails ahead.
    Repose, relief, cessation, or but more dreary 'nevermores'?"
The bird intruded thence – O, irritation ever since! –
    Then sat on Pallas' pallid bust, watching me (I sat not, therefore),
        And stated "nevermores".

Bemused by raven's dissonance, my soul exclaimed, "I seek intelligence;
    Explain thy purpose, or soon cease intoning forlorn 'nevermores'!"
"Nevermores", winged corvus proclaimed – thusly was a raven named?
    Actually maintain a surname, upon Pluvious seashore?
        I heard an oppressive "nevermore".

My sentiments extremely pained, to perceive an utterance so plain,
    Most interested, mystified, a meaning I hoped for.
"Surely," said the raven's watcher, "separate discourse is wiser.
    Therefore, liberation I'll obtain, retreating heretofore –
        Eliminating all the 'nevermores' ".

Still, the detestable raven just remained, unmoving, on sculptured bust.
    Always saying "never" (by a red chamber's door).
A poor, tender heartache maven – a sorrowful bird – a raven!
    O, I wished thoroughly, forthwith, that he&#
39;d fly heretofore.
        Still sitting, he recited "nevermores".

The raven's dirge induced alarm – "nevermore" quite wearisome.
    I meditated: "Might its utterances summarize of a calamity before?"
O, a sadness was manifest – a sorrowful cry of unrest;
    "O," I thought sincerely, "it's a melancholy great – furthermore,
        Removing doubt, this explains 'nevermores' ".

Seizing just that moment to sit – closely, carefully, advancing beside it,
    Sinking down, intrigued, where velvet cushion lay afore.
A creature, midnight-black, watched there – it studied my soul, unawares.
    Wherefore, explanations my insight entreated for.
        Silently, I pondered the "nevermores".

"Disentangle, nefarious bird! Disengage – I am disturbed!"
    Intently its eye burned, raising the cry within my core.
"That delectable Lenore – whose velvet pillow this was, heretofore,
    Departed thence, unsettling my consciousness therefore.
        She's returning – that maiden – aye, nevermore."

Since, to me, that thought was madness, I renounced continuing sadness.
    Continuing on, I soundly, adamantly forswore:
"Wretch," (addressing blackbird only) "fly swiftly – emancipate me!"
    "Respite, respite, detestable raven – and discharge me, I implore!"
        A ghostly answer of: "nevermore".

" 'Tis a prophet? Wraith? Strange devil? or the ultimate evil?"
    "Answer, tempter-sent creature!", I inquired, like before.
"Forlorn, though firmly undaunted, with 'nevermores' quite indoctrinated,
    Is everything depressing, generating great sorrow evermore?
        I am subdued!", I then swore.

In answer, the raven turned – relentless distress it spurned.
    "Comfort, surcease, quiet, silence!" – pleaded I for.
"Will my (abusive raven!) sorrows persist unabated?
    Nevermore Lenore respondeth?", adamantly I encored.
        The appeal was ignored.

"O, satanic inferno's denizen — go!", I said boldly, standing then.
    "Take henceforth loathsome "nevermores" – O, to an ugly Plutonian shore!
Let nary one expression, O bird, remain still here, replacing mirth.
    Promptly leave and retreat!", I resolutely swore.
        Blackbird's riposte: "nevermore".

So he sitteth, observing always, perching ominously on these doorways.
    Squatting on the stony bust so untroubled, O therefore.
Suffering stark raven's conversings, so I am condemned, subserving,
    To a nightmare cursed, containing miseries galore.
        Thus henceforth, I'll rise (from a darkness, a grave) — nevermore!

                        — original: E. Poe
                        — Redone by measuring circles.

Lipogram
    看看下面这句话有什么问题?

This is an unusual paragraph. I'm curious how quickly you can find out what is so unusual about it. It looks so plain you would think nothing was wrong with it! In fact, nothing is wrong with it! It is unusual though. Study it, and think about it, but you still may not find anything odd. But if you work at it a bit, you might find out! Try to do so without any coaching!

    答案:这段话里竟然没有一个字母e !
    Lipogram就是指的这样一个段落(甚至文章),里面缺少某个常用的字母。在所有的Lipogram中,写一个没有字母e的文章是最难的,因为字母e出现的频率最高。
    看一个比较长的Lipogram。下面这篇文章里硬是没有一个字母e!

Looking at this paragraph with confusion? I'll aid you slightly. Is any odd gap, lacuna or omission obvious to you? Got it now? No?

That's right – this is a lipogram – a book, paragraph or similar thing in writing that lacks a symbol, particularly (but not always) that symbol fifth in rank out of our 26 script-signs (found amidst 'd' and 'f'), which stands for a sound such as that in 'kiwi'. I won't bring it up right now, to avoid spoiling it. I could play with lipograms morning, noon and night. So it is with joy that I submit to you this location – truly, a loquacious location – for lipogram fanatics to join as a unit to glorify this form of wordplay.

As far as I know, this location has a distinct honour: it contains such an abundant quantity of words without using this taboo glyph that no WWW location can outmatch it. As of right now, it contains 1500 words without any hint of that symbol. Naturally, many long lipograms abound in print, including books, rhyming stanzas, and similar works of fiction. Most notably, La Disparition (A Void) by a famous author of a writing group known as Oulipo, stands out as a paragon of lipogrammaticity. I cannot aim to surpass it, but as a fan, I can look upon it with admiration.

Writing lipograms is, as you might think, a difficult task. In my lingo, 2/3 of all words contain that symbol which I am now avoiding, including many common pronouns and similar words commonly found in writing. Without using abbrvs., slang and odd jargon, which most purists scorn as cop-outs, it's darn tough to impart information in a stylistically satisfying way. Stripping paragraphs of particular symbols has a way of making looking at lipograms jarring. No doubt about it, a lipogram is a particularly arduous form of wordplay.

Having said this, acquiring a knack for lipogram composition isn't that hard, and may assist you in your non-lipogrammatic writing. Not to say that I'm without aid in this activity; my dictionary is always handy, as is a book with synonyms for words. And, notwithstanding any drawbacks flowing from passing many an hour looking for unusual ways to say ordinary things, it might aid your socialization skills. Chicks truly dig lipogrammatists, or so my old lady says.

Sadly, a handful of critics find lipograms ridiculous, ugly or without worth (as fiction or as wordplay). To such sorry saps, I say only that in constraining your thoughts and writing in a particular way aids in promoting branching paths of thought, thus amplifying vocabulary and instilling adroit linguistic skills among both young and old. By putting into praxis ways of thinking that wouldn't occur normally, lipograms call for authors to look at writing as an activity in ways that, frankly, wouldn't occur to such niggling adjudicators of linguistic conduct.

Withholding a symbol found in so many words has drastic symptoms that disallow many topics of discussion. (From this point on, I'll stick to talking about that sign I'm skipping right now). Using math is almost an impossibility; you can only main
tain 15 of all non-digital words for cardinal quantity up to 100, and hardly any at all past that point, though using digits is a good way out. You can go north or south, but talking about circumnavigating our world latitudinally is an impossibility. How can I possibly talk about various kinds of malt liquor, or parts of my body, without it? To top it all off, as an Anglo, strict prohibitions apply to naming of my own form of linguistic communication. I ought to thank my lucky stars that I'm not writing in lipogrammatic français, though, which holds on to only an octal portion of its original vocabulary.

But all is not lost. Surprisingly, profanity is mostly intact. As a practicing lipogrammatist, you'll find you want many such words, for it is a task so awkward as to call for cussing and cursing on a normal basis. A world map is truly a blissful oasis; my country (Canada) is totally satisfactory, as with most toponyms for nations (111 out of 186, by my count); with a bit of work, USA, UK, and so on, can still show up, and with twin island nations Trinidad and Tobago and Antigua and Barbuda (both with 17 glyphs) topping my list for prolongation. Musicians (particularly classical artists), astonishingly, hold firm as topics of discussion, with Bach, Bartok, Brahms, Chopin, Dvorak, Haydn, Holst, Liszt, Mozart, orff, Puccini, Rachmaninov, Rossini, Scarlatti, Schumann, Strauss, Stravinsky, Tchaikovsky and Vivaldi void of my lost non-consonant.

An additional branch of family Lipogrammatica consists of univocalics. This form of wordplay is akin to a lipogram, but contains a solitary sign that's not a consonant. To wit, a univocalic might omit 'a', 'i', 'o', and 'u' (but what about 'y'?). A univocalic has a sonorant quality that a lipogram lacks, so you must look at a lipogram, but contrarily, a univocalic is both auditory and visual, and has a strong sound if said aloud. Univocalic writing is hard to pull off, but if it's good, its payoff is gigantic.

另外推荐本Blog里的两个相关内容:
http://www.matrix67.com/blog/article.asp?id=104
http://www.matrix67.com/blog/article.asp?id=173

Matrix67收集整理
转贴请注明出处