2011-04-12
2011-01-16
科赫雪花/コッホ雪片/Koch snowflake
外面开始下雪了,入冬的第一场有规模的雪。
科赫曲线是一种分形。其形态似雪花,又称科赫雪花、雪花曲线。其豪斯多夫维是log4 / log3。
它最早出现在Helge von Koch的论文《关于一条连续而无切线,可由初等几何构作的曲线》(1904年,法语原题:Sur une courbe continue sans tangente, obtenue par une construction géométrique élémentaire)。
科赫曲线是 de Rham曲线的特例。
给定线段AB,科赫曲线可以由以下步骤生成:
- 将线段分成三等份(AC,CD,DB)
- 以CD为底,向外(内外随意)画一个等边三角形DMC
- 将线段CD移去
- 分别对AC,CM,MD,DB重复1~3。
生成过程演示
科赫雪花是以等边三角形三边生成的科赫曲线组成的。科赫雪花的面积是
,其中s是原来三角形的边长。每条科赫曲线的长度是无限大,它是连续而无处可微的曲线。
コッホ曲線(コッホきょくせん、英語: Koch curve)はフラクタル図形の一つ。スウェーデンの数学者ヘルゲ・フォン・コッホ (Helge von Koch) が考案した。線分を3等分し、分割した2点を頂点とする正三角形の作図を無限に繰り返すことによって得られる図形である。1回の操作で線分の長さが 4/3 倍になるので、操作を無限に繰り返して得られるコッホ曲線の長さは無限大である。完全なものは作図することができない。 コッホ曲線は相似比が1/3の4個のセグメントから成っているので、フラクタル次元はlog4 / log3 = 1.26186...次元である。
コッホ雪片(コッホせっぺん)は、上記のコッホ曲線をつなぎ合わせ、始点と終点を一致させたものである。
コッホ雪片は、有限の面積であるにもかかわらず、無限の周囲を持つ。
Koch snowflake
The Koch curve can be constructed by starting with an equilateral triangle, then recursively altering each line segment as follows:
- divide the line segment into three segments of equal length.
- draw an equilateral triangle that has the middle segment from step 1 as its base and points outward.
- remove the line segment that is the base of the triangle from step 2.
After one iteration of this process, the result is a shape similar to the Star of David.
The Koch curve is the limit approached as the above steps are followed over and over again.
Properties
The Koch curve has an infinite length because each time the steps above are performed on each line segment of the figure there are four times as many line segments, the length of each being one-third the length of the segments in the previous stage. Hence the total length increases by one third and thus the length at step n will be (4/3)n of the original triangle perimeter: the fractal dimension is log 4/log 3 ≈ 1.26, greater than the dimension of a line (1) but less than Peano's space-filling curve (2).
The Koch curve is continuous everywhere but differentiable nowhere.
Taking s as the side length, the original triangle area is
. The side length of each successive small triangle is 1/3 of those in the previous iteration; because the area of the added triangles is proportional to the square of its side length, the area of each triangle added in the nth step is 1/9th of that in the (n-1)th step. In each iteration after the first, 4 times as many triangles are added as in the previous iteration; because the first iteration adds 3 triangles, the nth iteration will add
triangles. Combining these two formulae gives the iteration formula:
where A0 is area of the original triangle. Substituting in
and expanding yields:
In the limit, as n goes to infinity, the limit of the sum of the powers of 4/9 is 4/5, so
So the area of a Koch snowflake is 8/5 of the area of the original triangle, or
. Therefore the infinite perimeter of the Koch triangle encloses a finite area.
Excel VBA Project:http://goo.gl/2vinu
2011-01-15
Custom Search API
handleResponse({
"kind": "customsearch#search",
"url": {
"type": "application/json",
"template": "https://www.googleapis.com/customsearch/v1?q\u003d{searchTerms}&num\u003d{count?}&start\u003d{startIndex?}&hr\u003d{language?}&safe\u003d{safe?}&cx\u003d{cx?}&cref\u003d{cref?}&sort\u003d{sort?}&alt\u003djson"
},
"queries": {
"nextPage": [
{
"title": "Google Custom Search - lectures",
"totalResults": 9130000,
"searchTerms": "lectures",
"count": 10,
"startIndex": 11,
"inputEncoding": "utf8",
"outputEncoding": "utf8",
"cx": "017576662512468239146:omuauf_lfve"
}
],
"request": [
{
"title": "Google Custom Search - lectures",
"totalResults": 9130000,
"searchTerms": "lectures",
"count": 10,
"startIndex": 1,
"inputEncoding": "utf8",
"outputEncoding": "utf8",
"cx": "017576662512468239146:omuauf_lfve"
}
]
},
"context": {
"title": "Curriculum",
"facets": [
[
{
"label": "lectures",
"anchor": "Lectures"
}
],
[
{
"label": "assignments",
"anchor": "Assignments"
}
],
[
{
"label": "reference",
"anchor": "Reference"
}
]
]
},
"items": [
{
"kind": "customsearch#result",
"title": "EE364a: Lecture Videos",
"htmlTitle": "EE364a: \u003cb\u003eLecture\u003c/b\u003e Videos",
"link": "http://www.stanford.edu/class/ee364a/videos.html",
"displayLink": "www.stanford.edu",
"snippet": "Apr 7, 2010 ... Course materials. Lecture slides · Lecture videos (2008) · Review sessions. Assignments. Homework · Reading. Exams. Final exam ...",
"htmlSnippet": "Apr 7, 2010 \u003cb\u003e...\u003c/b\u003e Course materials. \u003cb\u003eLecture\u003c/b\u003e slides · \u003cb\u003eLecture\u003c/b\u003e videos (2008) · Review sessions. \u003cbr\u003e Assignments. Homework · Reading. Exams. Final exam \u003cb\u003e...\u003c/b\u003e",
"cacheid": "TxVqFzFZLOsJ"
},
{
"kind": "customsearch#result",
"title": "Home § Harvard Natural Sciences Lecture Demonstrations",
"htmlTitle": "Home § Harvard Natural Sciences \u003cb\u003eLecture\u003c/b\u003e Demonstrations",
"link": "http://www.fas.harvard.edu/scidemos/",
"displayLink": "www.fas.harvard.edu",
"snippet": "A categorized catalog of lecture demonstrations available to undergraduate Harvard Physics courses consisting of descriptions, diagrams, and photos.",
"htmlSnippet": "A categorized catalog of \u003cb\u003electure\u003c/b\u003e demonstrations available to undergraduate \u003cbr\u003e Harvard Physics courses consisting of descriptions, diagrams, and photos.",
"cacheid": "wTeuo1Ba7qsJ"
},
{
"kind": "customsearch#result",
"title": "Discrete Math Lecture Notes",
"htmlTitle": "Discrete Math \u003cb\u003eLecture\u003c/b\u003e Notes",
"link": "http://www.cs.columbia.edu/~zeph/3203s04/lectures.html",
"displayLink": "www.cs.columbia.edu",
"snippet": "Jan 16, 2004 ... Discrete Math Lecture Notes. by Zeph Grunschlag. Topics. Lecture Download. Introduction: course policies; Overview, Logic, Propositions, ppt ...",
"htmlSnippet": "Jan 16, 2004 \u003cb\u003e...\u003c/b\u003e Discrete Math \u003cb\u003eLecture\u003c/b\u003e Notes. by Zeph Grunschlag. Topics. \u003cb\u003eLecture\u003c/b\u003e Download. \u003cbr\u003e Introduction: course policies; Overview, Logic, Propositions, ppt \u003cb\u003e...\u003c/b\u003e",
"cacheid": "MZ8S-g5WMB8J"
},
{
"kind": "customsearch#result",
"title": "Free Crypto Lectures - University of Washington Computer Science ...",
"htmlTitle": "Free Crypto \u003cb\u003eLectures\u003c/b\u003e - University of Washington Computer Science \u003cb\u003e...\u003c/b\u003e",
"link": "http://www.cs.washington.edu/education/courses/csep590/06wi/lectures/",
"displayLink": "www.cs.washington.edu",
"snippet": "",
"htmlSnippet": ""
},
{
"kind": "customsearch#result",
"title": "Dr. Adleman - Welcome — Association for Computing Machinery",
"htmlTitle": "Dr. Adleman - Welcome — Association for Computing Machinery",
"link": "http://www.acm.org/awards/turing_citations/rivest-shamir-adleman.html",
"displayLink": "www.acm.org",
"snippet": "",
"htmlSnippet": ""
},
{
"kind": "customsearch#result",
"title": "Lecture 23: Artificial Intelligence",
"htmlTitle": "\u003cb\u003eLecture\u003c/b\u003e 23: Artificial Intelligence",
"link": "http://www.cs.princeton.edu/courses/archive/spr05/cos126/lectures/23.pdf",
"displayLink": "www.cs.princeton.edu",
"snippet": "2. Overview. A whirlwind tour of Artificial Intelligence. We spend just one lecture, but there are: ■. Many courses on AI, but only one at Princeton :- ( ...",
"htmlSnippet": "2. Overview. A whirlwind tour of Artificial Intelligence. We spend just one \u003cbr\u003e \u003cb\u003electure\u003c/b\u003e, but there are: ■. Many courses on AI, but only one at Princeton :- ( \u003cbr\u003e \u003cb\u003e...\u003c/b\u003e",
"cacheid": "4vD07Y725wUJ",
"pagemap": {
"metatags": [
{
"creationdate": "D:20050424201323Z00'00'",
"creator": "pdftopdf filter",
"moddate": "D:20050424201323Z00'00'",
"producer": "Mac OS X 10.3.8 Quartz PDFContext"
}
]
}
},
{
"kind": "customsearch#result",
"title": "CS 152 Computer Architecture and Engineering Lecture 1 ...",
"htmlTitle": "CS 152 Computer Architecture and Engineering \u003cb\u003eLecture\u003c/b\u003e 1 \u003cb\u003e...\u003c/b\u003e",
"link": "http://www-inst.eecs.berkeley.edu/~cs152/sp09/lectures/L01-Intro.pdf",
"displayLink": "www-inst.eecs.berkeley.edu",
"snippet": "Jan 20, 2009 ... Lectures available online before noon, day of lecture ... Based on lectures, problem sets, and labs. • 40% Labs (one per module) ...",
"htmlSnippet": "Jan 20, 2009 \u003cb\u003e...\u003c/b\u003e \u003cb\u003eLectures\u003c/b\u003e available online before noon, day of \u003cb\u003electure\u003c/b\u003e \u003cb\u003e...\u003c/b\u003e Based on \u003cb\u003electures\u003c/b\u003e, \u003cbr\u003e problem sets, and labs. • 40% Labs (one per module) \u003cb\u003e...\u003c/b\u003e",
"cacheid": "lPNF9AE8tYEJ",
"pagemap": {
"metatags": [
{
"creationdate": "D:20090120190950-08'00'",
"moddate": "D:20090120190950-08'00'"
}
]
}
},
{
"kind": "customsearch#result",
"title": "Lecture Schedule",
"htmlTitle": "\u003cb\u003eLecture\u003c/b\u003e Schedule",
"link": "http://www.stanford.edu/class/cs140/cgi-bin/lectures.php",
"displayLink": "www.stanford.edu",
"snippet": "We recommend that you print out the notes for each lecture and bring them with you to class, so that you can add additional notes during class. ...",
"htmlSnippet": "We recommend that you print out the notes for each \u003cb\u003electure\u003c/b\u003e and bring them with \u003cbr\u003e you to class, so that you can add additional notes during class. \u003cb\u003e...\u003c/b\u003e",
"cacheid": "5T4lXiGl-ogJ"
},
{
"kind": "customsearch#result",
"title": "Lecture 7: Recursion",
"htmlTitle": "\u003cb\u003eLecture\u003c/b\u003e 7: Recursion",
"link": "http://www.cs.princeton.edu/courses/archive/spr05/cos126/lectures/07.pdf",
"displayLink": "www.cs.princeton.edu",
"snippet": "Lecture 7: Recursion. Start. Finish. Overview. What is recursion? ■. When one function calls ITSELF directly or indirectly. Why learn recursion? ...",
"htmlSnippet": "\u003cb\u003eLecture\u003c/b\u003e 7: Recursion. Start. Finish. Overview. What is recursion? ■. When one \u003cbr\u003e function calls ITSELF directly or indirectly. Why learn recursion? \u003cb\u003e...\u003c/b\u003e",
"cacheid": "Hn01M6e-Cw4J",
"pagemap": {
"metatags": [
{
"creationdate": "D:20050218214640Z00'00'",
"creator": "pdftopdf filter",
"moddate": "D:20050218214640Z00'00'",
"producer": "Mac OS X 10.3.7 Quartz PDFContext"
}
]
}
},
{
"kind": "customsearch#result",
"title": "EE263: Lecture Slides",
"htmlTitle": "EE263: \u003cb\u003eLecture\u003c/b\u003e Slides",
"link": "http://www.stanford.edu/class/ee263/lectures.html",
"displayLink": "www.stanford.edu",
"snippet": "Summary and final comments · All lectures, in 2up format, in one pdf file. Page generated 2010-12-09 06:43:48 PST, by jemdoc.",
"htmlSnippet": "Summary and final comments · All \u003cb\u003electures\u003c/b\u003e, in 2up format, in one pdf file. Page \u003cbr\u003e generated 2010-12-09 06:43:48 PST, by jemdoc.",
"cacheid": "HY9E7ycKKocJ"
}
]
}
);
2010-12-30
解决一种MSN运行缓慢的情况
最近加装虚拟机软件,带来了副作用,MSN慢到无法接受 ,
比如随便打开一个聊天窗口,大概要两、三分钟,
按下表情符号接近于就直接当掉,要过相当长的时间才会恢复响应,
或者是打字会奇慢无比,过几秒才会出现
点下去居然也要一段时间窗口才会出现…
解决办法就是
把局域网络IP设为自动取得
原因就是MSN在启动对话Session的时候
会先判别是不是内网的使用者
(不需要经过因特网,直接透过局域网传播信息)
但若设了一个假的局域网络IP(虚拟机软件的原因,ip需要做相应的调整)
封包送出去便卡在那边等待回传信息,
但因为是假的IP,所以不会有回传信息出现,直到Timeout以后他才会改用因特网的方式通讯..
所以使用者其实是在一直等待Timeout,速度必然会很慢。
比如随便打开一个聊天窗口,大概要两、三分钟,
按下表情符号接近于就直接当掉,要过相当长的时间才会恢复响应,
或者是打字会奇慢无比,过几秒才会出现
点下去居然也要一段时间窗口才会出现…
解决办法就是
把局域网络IP设为自动取得
原因就是MSN在启动对话Session的时候
会先判别是不是内网的使用者
(不需要经过因特网,直接透过局域网传播信息)
但若设了一个假的局域网络IP(虚拟机软件的原因,ip需要做相应的调整)
封包送出去便卡在那边等待回传信息,
但因为是假的IP,所以不会有回传信息出现,直到Timeout以后他才会改用因特网的方式通讯..
所以使用者其实是在一直等待Timeout,速度必然会很慢。
2010-10-25
I will persist. I will win
标签:
short essay
In the Orient young bulls are tested for the fight arena in a certain manner. Each is brought to the ring and allowed to attack a picador who pricks them with a lance. The bravery of each bull is then rated with care according to the number of times he demonstrates his willingness to charge in spite of the sting of the blade. Henceforth will I recognize that each day I am tested by life in like manner. If I persist, if I continue to try, if I continue to charge forward, I will succeed.
在古老的东方,挑选小公牛列竞技场格斗有一定的程序、它们被带进场地,向手持长矛的斗牛士攻击,裁判以它受激后再向斗牛士进攻的次数多寡来评定这只公牛的勇敢程度。从今往后。我须承认,我的生命每天都在接受类似的考验。如果我坚韧不拔,勇往直前,迎接挑战。那么我一定会成功。
I will persist until I succeed.
坚持不懈。直到成功。
I was not delivered unto this world in defeat, nor does failure course in my veins. I am not a sheep waiting to be prodded by my shepherd. I am a lion and I refuse to talk, to walk, to sleep with the sheep. I will hear not those who weep and complain, for their disease is contagious. Let them join the sheep. The slaughterhouse of failure is not my destiny.
我不是为了失败才来到这个世界上的,我的血管里也没有失败的血液在流动。我不是任人鞭打的羔羊,我是猛狮,不与羊群为伍。我不想听失意者的哭泣,抱怨者的牢骚,这是羊群中的瘟疫,我不能被它传染。失败者的屠宰场不是我命运的归宿。
I will persist until I succeed.
坚持不懈,直到成功。
The prizes of life are at the end of each journey, not near the beginning; and it is not given to me to know how many steps are necessary in order to reach my goal. Failure I may still encounter at the thousandth step, yet success hides behind the next bend in the road. Never will I know how close it lies unless I turn the corner.
生命的奖赏远在旅途终点,而非起点附近。我不知道要走多少步才能达到目标。踏上第一千步的时候,仍然可能遭到失败。但成功就藏在拐角后面,除非拐了弯,我永远不知道还有多远。
Always will I take another step. If that is of no avail I will take another, and yet another. In truth, one step at a time is not too difficult.
再前进一步,如果没有用,就再向前一步。事实上,每次进步一点点并不太难。
I will persist until I succeed.
坚持不懈,直到成功。
Henceforth, I will consider each day's effort as but one blow of my blade against a mighty oak. The first blow may cause not a tremor in the wood, nor the second, nor the third. Each blow, of itself, may be trifling, and seem of no consequence. Yet from childish swipes the oak will eventually tumble. So it will be with my efforts of today.
从今往后,我承认每天的奋斗就像对参天大树的一次砍击,头几刀可能了无痕迹。每一击者似微不足道,然而,累积起来,巨树终会倒下。这恰如我今天的努力。
I will be liken to the raindrop which washes away the mountain; the ant who devours a tiger; the star which brightens the earth; the slave who builds a pyramid. I will build my castle one brick at a time for I know that small attempts, repeated, will complete any undertaking.
就像冲洗高山的雨滴,吞噬猛虎的蚂蚁,照亮大地的星辰,建起金字塔的奴隶,我也要一砖一瓦地建造起自己的城堡,因为我深知水滴石穿的道理,只要持之以恒,什么都可以做到。
I will persist until I succeed.
坚持不懈,直到成功。
I will never consider defeat and I will remove from my vocabulary such words and phrases as quit, cannot, unable, impossible, out of the question, improbable, failure, unworkable, hopeless, and retreat; for they are the words of fools. I will avoid despair but if this disease of the mind should infect me then I will work on in despair. I will toil and I will endure. I will ignore the obstacles at my feet and keep mine eyes on the goals above my head, for I know that where dry desert ends, green grass grows.
我绝不考虑失败,我的字典里不再有放弃,不可能、办不到、没法子、成问题、失败,行不通、没希望、退缩…这类愚蠢的字眼。我要尽量避免绝望,一旦受到它的威胁,立即想方设法向它挑战。我要辛勤耕耘,忍受苦楚。我放眼未来,勇往直前,不再理会脚下的障碍。我坚信,沙漠尽头必是绿洲。
I will persist until I succeed.
坚持不懈,直到成功。
I will remember the ancient law of averages and I will bend it to my good. I will persist with knowledge that each failure to sell will increase my chance for success at the next attempt. Each nay I hear will bring me closer to the sound of yea. Each frown I meet only prepares me for the smile to come. Each misfortune I encounter will carry in it the seed of tomorrow's good luck. I must have the night to appreciate the day. I must fail often to succeed only once.
我要牢牢记住古老的平衡法则,鼓励自己坚持下去,因为每一次的失败都会增加下一次成功的机会。这一次的拒绝就是下一次的赞同,这一次皱起的眉头就是下一次舒展的笑容。今天的不幸,往往预示着明天的好运。夜幕降临。回想一天的遭遇。我总是心存感激。我深知,只有失败多次,才能成功。
I will persist until I succeed.
坚持不懈,直到成功。
I will try, and try, and try again. Each obstacle I will consider as a mere detour to my goal and a challenge to my profession. I will persist and develop my skills as the mariner develops his, by learning to ride out the wrath of each storm.
我要尝试,尝试,再尝试。障碍是我成功路上的弯路,我迎接这项挑战。我要像水手一样,乘风破浪。
I will persist until I succeed.
坚持不懈,直到成功。
Henceforth, I will learn and apply another secret of those who excel in my work. When each day is ended, not regarding whether it has been a success or a failure, I will attempt to achieve one more sale. When my thoughts beckon my tired body homeward I will resist the temptation to depart. I will try again. I will make one more attempt to close with victory, and if that fails I will make another. Never will I allow any day to end with a failure. Thus will I plant the seed of tomorrow's success and gain an insurmountable advantage over those who cease their labor at a prescribed time. When others cease their struggle, the mine will begin, and my harvest will be full.
从今往后,我要借鉴别人成功的秘诀。过去的是非成败,我全不计较,只抱定信念,明天会更好。当我精疲力歇时,我要抵制回家的诱惑,再试一次。我一试再试。争取每一天的成功,避免以失败收场。我要为明天的成功播种,超过那些按部就班的人。在别人停滞不前时,我继续拼搏,终有一天我会丰收。“
I will persist until I succeed.
坚持不懈,直到成功。
Nor will I allow yesterday's success to lull me into today's complacency, for this is the great foundation of failure. I will forget the happenings of the day that is gone, whether they were good or bad, and greet the new sun with confidence that this will be the best day of my life.
我不因昨日的成功而满足,因为这是失败的先兆。我要忘却昨日的一切,是好是坏,都让它随风而去。我信心百倍,迎接新的太阳,相信“今天是此生最好的一天”。
So long as there is breath in me, that long will I persist. For now I know one of the greatest principles of success; if I persist long enough I will win.
只要我一息尚存,就要坚持到底,因为我已深知成功的秘诀。
I will persist. I will win.
坚持不懈,终会成功。
Subscribe to:
Posts
(
Atom
)