Search This Blog

Dec 29, 2010

三 存理克欲 (一)

   仁义之道是孟子思想的核心,而仁义发自人的本心(良心),因此孟子主张存养本心,保持其纯然至善.


孟子曰:养心莫善于寡欲.其为人也寡欲,虽有不存焉者寡矣.其为人也多欲,虽有存焉者寡矣.(尽心.下.三五)


语译:
   孟子说:存养本心的方法没有比减少私欲来得更好的了.一个人如果减少私欲,虽然有放失本心的情况,那也是很
少的.一个人如果增多私欲,虽然有本心存在的情况,那也是很少的.


析论:
   天理和人欲是互为消长的.天理内在于每一个人以生俱来的,纯然至善的本心之中;人欲则是口,鼻,耳,目等人体
的器官接触到外物而引发的.被臭,味,声,色所牵引,而耽玩其间.耽玩愈久,必然百虑千想,纷至沓来,于是心灵向外
驰逐,陷溺越深,而纯然至善的本心也就遭受蒙蔽,放失,终至荡然无存. 这点在各种宗教,修身之法中都是共通的,强
调的是呈现本心,减少私欲,不让其为外物所蒙蔽.合乎天理,本心,就欲之,为之,以存养,扩充纯然至善的本心,使天理
昭然呈现,人道耸然挺立.

Dec 28, 2010

Setup Ubuntu 10.10 for iMX53 LTIB and Android environment

1. Be a root user
$ sudo passwd
enter root user password and then we can login as root

2. Setup proxy
Click System->Preference->Network proxy
setup your proxy setting and apply
Click System->Administration->Synaptic Package Manager
setup proxy and apply

3. Install all required package 
$ apt-get install rpm m4 patch bison libncurses5-dev g++ zlib1g-dev nfs-common nfs-kernel-server xinetd tftp tftpd gkermit git-core flex gperf libsdl1.2-dev libwxgtk2.6-dev build-essential curl valgrind libreadline5-dev ccache telnetd ssh samba gettext libgtk2.0-dev libdbus-glib-1-dev liborbit2-dev intltool libtool uuid-dev liblzo2-dev gparted git-doc git-email git-gui meld openbsd-inetd

Install package sun-java5-jdk
select System->Administration->Update Manager
hit "setting" and Choose the "Other Software" tab, hit Add and then enter
   deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
$ apt-get -y install sun-java5-bin sun-java5-jre sun-java5-jdk sun-java5-fonts sun-java5-plugin


4. Let root can compile LTIB
$ gedit /etc/sudoers
root ALL=NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

5. Setup NFS and tftpboot
Setting up NFS
$ gedit /etc/exports
add below line:
/tftpboot *(rw,sync,no_root_squash)

Setting up TFTP
$ mkdir /tftpboot
$ chmod 777 -R /tftpboot
$ gedit /etc/inetd.conf
tftp      dgram      udp      wait      nobody      /usr/sbin/tcpd      /usr/sbin/in.tftpd     /tftpboot
$ netstat -an | grep :69
We can see whether port 69 is opened.
udp        0      0 0.0.0.0:69              0.0.0.0:*
$ /etc/init.d/openbsd-inetd restart

6. Add export environment
$ gedit ~/.bashrc
export ARCH=arm
#export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-
export PATH=$PATH:/opt/freescale/ltib/usr/bin/

7. Automatic mount other partitions
$ gedit /etc/fstab
/dev/sdb1        /media/Linux    ext4    rw,nosuid,nodev,uhelper=udisks

8. Install LTIB BSP
Extract BSP and enter directory.
$ ./install
Enter installed directory
$ ./ltib -c
It will take long time to install host support packages at first time.
And then enter menu config, select imx5x platform.
After building done, generate "uImage" in directory "rootfs/boot", rootfs in "rootfs"

$ ./ltib -m prep -p kernel-2.6.35.spec
It will extract kernel source code into "rpm/BUILD/linux-2.6.35.3"
$ export ARCH=arm
$ export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-
$ make im5x_defconfig
$ make uImage -j4

Dec 17, 2010

You've got to find what you love

   You've got to find what you love
                 你必须要找到你所爱的东西
 
I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I've ever gotten to a college graduation. Today I want to tell you three stories from my life. That's it. No big deal. Just three stories.

我今天很荣幸能和你们一起参加毕业典礼,斯坦福大学是世界上最好的大学之一。我从来没有从大学中毕业。说实话,今天也许是在我的生命中离大学毕业最近的一天了。今天我想向你们讲述我生活中的三个故事。不是什么大不了的事情,只是三个故事而已。

The first story is about connecting the dots.

第一个故事是关于如何把生命中的点点滴滴串连起来。

I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?

我在Reed大学读了六个月之后就退学了,但是在十八个月以后——我真正的作出退学决定之前,我还经常去学校。我为什么要退学呢?

It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: "We have an unexpected baby boy; do you want him?" They said: "Of course." My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.

故事从我出生的时候讲起。我的亲生母亲是一个年轻的,没有结婚的大学毕业生。她决定让别人收养我, 她十分想让我被大学毕业生收养。所以在我出生的时候,她已经做好了一切的准备工作,能使得我被一个律师和他的妻子所收养。但是她没有料到,当我出生之后,律师夫妇突然决定他们想要一个女孩。所以我的生养父母(他们还在我亲生父母的观察名单上)突然在半夜接到了一个电话:“我们现在这儿有一个不小心生出来的男婴,你们想要他吗?”他们回答道:“当然!”但是我亲生母亲随后发现,我的养母从来没有上过大学,我的父亲甚至从没有读过高中。她拒绝签这个收养合同。只是在几个月以后,我的父母答应她一定要让我上大学,那个时候她才同意。

And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents' savings were being spent on my college tuition. After six months, I couldn't see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didn't interest me, and begin dropping in on the ones that looked interesting.

在十七岁那年,我真的上了大学。但是我很愚蠢的选择了一个几乎和你们斯坦福大学一样贵的学校, 我父母还处于蓝领阶层,他们几乎把所有积蓄都花在了我的学费上面。在六个月后, 我已经看不到其中的价值所在。我不知道我想要在生命中做什么,我也不知道大学能帮助我找到怎样的答案。但是在这里,我几乎花光了我父母这一辈子的所有积蓄。所以我决定要退学,我觉得这是个正确的决定。不能否认,我当时确实非常的害怕, 但是现在回头看看,那的确是我这一生中最棒的一个决定。在我做出退学决定的那一刻, 我终于可以不必去读那些令我提不起丝毫兴趣的课程了。然后我还可以去修那些看起来有点意思的课程。

It wasn't all romantic. I didn't have a dorm room, so I slept on the floor in friends' rooms, I returned coke bottles for the five-cent deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:

但是这并不是那么罗曼蒂克。我失去了我的宿舍,所以我只能在朋友房间的地板上面睡觉,我去捡5美分的可乐瓶子,仅仅为了填饱肚子, 在星期天的晚上,我需要走七英里的路程,穿过这个城市到Hare Krishna寺庙,只是为了能吃上饭——这个星期唯一一顿好一点的饭。但是我喜欢这样。我跟着我的直觉和好奇心走, 遇到的很多东西,此后被证明是无价之宝。让我给你们举一个例子吧:

Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didn't have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can't capture, and I found it fascinating.

Reed大学在那时提供也许是全美最好的美术字课程。在这个大学里面的每个海报, 每个抽屉的标签上面全都是漂亮的美术字。因为我退学了, 没有受到正规的训练, 所以我决定去参加这个课程,去学学怎样写出漂亮的美术字。我学到了san serif 和serif字体, 我学会了怎么样在不同的字母组合之中改变空格的长度, 还有怎么样才能作出最棒的印刷式样。那是一种科学永远不能捕捉到的、美丽的、真实的艺术精妙, 我发现那实在是太美妙了。

None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, it's likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.
当时看起来这些东西在我的生命中,好像都没有什么实际应用的可能。但是十年之后,当我们在设计第一台Macintosh电脑的时候,就不是那样了。我把当时我学的那些家伙全都设计进了Mac。那是第一台使用了漂亮的印刷字体的电脑。如果我当时没有退学, 就不会有机会去参加这个我感兴趣的美术字课程, Mac就不会有这么多丰富的字体,以及赏心悦目的字体间距。那么现在个人电脑就不会有现在这么美妙的字型了。当然我在大学的时候,还不可能把从前的点点滴滴串连起来,但是当我十年后回顾这一切的时候,真的豁然开朗了。

  Again, you can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something - your gut, destiny, life, karma, whatever, because believing that the dots that will connect down the road will give you the confidence to follow your heart, even when it leads you off the well-worn path, and that will make all the difference.
 再次说明的是,你在向前展望的时候不可能将这些片断串连起来;你只能在回顾的时候将点点滴滴串连起来。所以你必须相信这些片断会在你未来的某一天串连起来。你必须要相信某些东西:你的勇气、目的、生命、因果。因为只有你相信这些点是存在关系的,你才能自信地踏上那条你梦寐以求的路,这条路可能带领你偏离主流价值观,而也正因此,人生可能真的与众不同。

My second story is about love and loss.

我的第二个故事是关于爱和失去的。

I was lucky – I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation - the Macintosh - a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out.What had been the focus of my entire adult life was gone, and it was devastating.
我非常幸运, 因为我在很早的时候就找到了我钟爱的东西。Woz和我在二十岁的时候就在父母的车库里面开创了苹果公司。我们工作得很努力, 十年之后, 这个公司从那两个车库中的穷光蛋发展到了超过四千名的雇员、价值超过二十亿的大公司。在公司成立的第九年,我们刚刚发布了最好的产品,那就是Macintosh。我也快要到三十岁了。在那一年, 我被炒了鱿鱼。你怎么可能被你自己创立的公司炒了鱿鱼呢? 嗯,在苹果快速成长的时候,我们雇用了一个很有天分的家伙和我一起管理这个公司, 在最初的几年,公司运转的很好。但是后来我们对未来的看法发生了分歧, 最终我们吵了起来。当争吵不可开交的时候, 董事会站在了他的那一边。所以在三十岁的时候, 我被炒了。在这么多人的眼皮下我被炒了。在而立之年,我生命的全部支柱离自己远去, 这真是毁灭性的打击。
I really didn't know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down - that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me – I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.

在最初的几个月里,我真是不知道该做些什么。我把从前的创业激情给丢了, 我觉得自己让与我一同创业的人都很沮丧。我和David Pack和Bob Boyce见面,并试图向他们道歉。我把事情弄得糟糕透顶了。但是我渐渐发现了曙光, 我仍然喜爱我从事的这些东西。苹果公司发生的这些事情丝毫的没有改变这些, 一点也没有。我被驱逐了,但是我仍然钟爱它。所以我决定从头再来。

I didn't see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.
我当时没有觉察, 但是事后证明, 从苹果公司被炒是我这辈子发生的最棒的事情。因为,作为一个成功者的沉重感被作为一个创业者的轻松感觉代替: 对任何事情都不再那么确定。这让我觉得如此自由, 进入了我生命中最有创造力的一个阶段。
During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I retuned to Apple, and the technology we developed at NeXT is at the heart of Apple's current renaissance. And Laurene and I have a wonderful family together.

在接下来的五年里, 我创立了一个名叫NeXT的公司, 还有一个叫Pixar的公司, 然后和一个后来成为我妻子的优雅女人相识。Pixar 制作了世界上第一个用电脑制作的动画电影——“”玩具总动员”,Pixar现在也是世界上最成功的电脑制作工作室。在后来的一系列运转中,Apple收购了NeXT, 然后我又回到了Apple公司。我们在NeXT发展的技术在Apple的复兴之中发挥了关键的作用。我还和Laurence 一起建立了一个幸福的家庭。

I'm pretty sure none of this would have happened if I hadn't been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Don't lose faith. I'm convinced that the only thing that kept me going was that I loved what I did. You've got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.
我可以非常肯定,如果我不被Apple开除的话, 这其中一件事情也不会发生的。这个良药的味道实在是太苦了,但是我想病人需要这个药。有些时候, 生活会拿起一块砖头向你的脑袋上猛拍一下。不要失去信心。我很清楚唯一使我一直走下去的,就是我做的事情令我无比钟爱。你需要去找到你所爱的东西。对于工作是如此, 对于你的爱人也是如此。你的工作将会占据生活中很大的一部分。你只有相信自己所做的是伟大的工作, 你才能怡然自得。如果你现在还没有找到, 那么继续找、不要停下来、全心全意的去找, 当你找到的时候你就会知道的。就像任何真诚的关系, 随着岁月的流逝只会越来越紧密。所以继续找,直到你找到它,不要停下来!
My third story is about death.

我的第三个故事是关于死亡的。

When I was 17, I read a quote that went something like: "If you live each day as if it was your last, someday you'll most certainly be right." It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: "If today were the last day of my life, would I want to do what I am about to do today?" And whenever the answer has been "No" for too many days in a row, I know I need to change something.
当我十七岁的时候, 我读到了一句话:“如果你把每一天都当作生命中最后一天去生活的话,那么有一天你会发现你是正确的。”这句话给我留下了深刻的印象。从那时开始,过了33年,我在每天早晨都会对着镜子问自己:“如果今天是我生命中的最后一天, 你会不会想要完成你今天要做的事情呢?”当答案连续很多天都是“不是”的时候, 我知道自己需要改变某些事情了。
Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Because almost everything – all external expectations, all pride, all fear of embarrassment or failure - these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.
 “记住你即将死去”是我一生中遇到的最重要箴言。它帮我指明了生命中重要的选择。因为几乎所有的事情, 包括所有的荣誉、所有的骄傲、所有对难堪和失败的恐惧,这些在死亡面前都会消失。我看到的是留下的真正重要的东西。你有时候会思考你将会失去某些东西,“记住你即将死去”是我知道的避免这些想法的最好办法。你已经赤身裸体了, 你没有理由不去听从你内心的召唤。

About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didn't even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctor's code for prepare to die. It means to try to tell your kids everything you thought you'd have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.

大概一年以前, 我被诊断出癌症。我在早晨七点半做了一个检查, 检查清楚的显示在我的胰腺有一个肿瘤。我当时都不知道胰腺是什么东西。医生告诉我那很可能是一种无法治愈的癌症, 我还有三到六个月的时间活在这个世界上。我的医生叫我回家, 然后整理好我的一切, 那就是医生准备死亡的程序。那意味着你将要把未来十年对你小孩说的话在几个月里面说完.;那意味着把每件事情都搞定, 让你的家人会尽可能轻松的生活;那意味着你要说“再见了”。

I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and I'm fine now.

我整天和那个诊断书一起生活。后来有一天早上我作了一个活切片检查,医生将一个内窥镜从我的喉咙伸进去,通过我的胃, 然后进入我的肠子, 用一根针在我的胰腺上的肿瘤上取了几个细胞。我当时很镇静,因为我被注射了镇定剂。但是我的妻子在那里, 后来告诉我,当医生在显微镜地下观察这些细胞的时候他们开始尖叫, 因为这些细胞最后竟然是一种非常罕见的可以用手术治愈的胰腺癌症。我做了这个手术, 现在我痊愈了。

 This was the closest I've been to facing death, and I hope it's the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:
那是我最接近死亡的时候, 我还希望这也是以后的几十年最接近的一次。从死亡线上又活了过来, 死亡对我来说,只是一个有用但是纯粹是知识上的概念的时候,我可以更肯定一点地对你们说:
  No one wants to die. Even people who want to go to heaven don't want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life's change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.

没有人愿意死, 即使人们想上天堂, 人们也不会为了去那里而死。但是死亡是我们每个人共同的终点。从来没有人能够逃脱它。也应该如此。因为死亡就是生命中最好的一个发明。它将旧的清除以便给新的让路。你们现在是新的, 但是从现在开始不久以后, 你们将会逐渐的变成旧的然后被清除。我很抱歉这很戏剧性, 但是这十分的真实。

Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma - which is living with the results of other people's thinking. Don't let the noise of other's opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.
你们的时间很有限, 所以不要将他们浪费在重复其他人的生活上。不要被教条束缚,那意味着你和其他人思考的结果一起生活。不要被其他人喧嚣的观点掩盖你真正的内心的声音。还有最重要的是, 你要有勇气去听从你直觉和心灵的指示——它们在某种程度上知道你想要成为什么样子,所有其他的事情都是次要的。
When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960's, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.

当我年轻的时候, 有一本叫做“整个地球的目录”振聋发聩的杂志,它是我们那一代人的圣经之一。它是一个叫Stewart Brand的家伙在离这里不远的Menlo Park书写的, 他象诗一般神奇地将这本书带到了这个世界。那是六十年代后期, 在个人电脑出现之前, 所以这本书全部是用打字机,、剪刀还有偏光镜制造的。有点像用软皮包装的google, 在google出现三十五年之前:这是理想主义的, 其中有许多灵巧的工具和伟大的想法。

Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: "Stay Hungry. Stay Foolish." It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.

Stewart和他的伙伴出版了几期的“整个地球的目录”,当它完成了自己使命的时候, 他们做出了最后一期的目录。那是在七十年代的中期, 你们的时代。在最后一期的封底上是清晨乡村公路的照片(如果你有冒险精神的话,你可以自己找到这条路的),在照片之下有这样一段话:“保持饥饿,保持愚蠢。”这是他们停止了发刊的告别语。“保持饥饿,保持愚蠢。”我总是希望自己能够那样,现在, 在你们即将毕业,开始新的旅程的时候, 我也希望你们能这样:

Stay Hungry. Stay Foolish.

保持饥饿,保持愚蠢。

Thank you all very much.

非常感谢你们。
 

Dec 10, 2010

3阶魔方复原方法

  这个星期在研究魔方,历史上第一次成功复原6面.回想之前仅能复原一面的历史,实在感慨.参考了数个视频才成功,为秉承资源共享原则,把过程总结了一下,供后来者参考.

1.     概述:

     我们的目的是将一个3阶魔方复原.几个基本概念要澄清,”角块是指有3个面的块,”棱块是指有2个面的块, 只有一个面的我们称之为中心块,一般我们保持它们的位置固定. 通常我们以白色为底面,与其相对的黄色为顶面.其他的侧面分别为前后左右面. 从下往上我们称之为第一层,第二层,第三层.

2.     构造底面十字

     我们在底面构建一个十字,同时每个十字中的棱块的侧面颜色和其颜色的中心块位于同一面.
·         先把4个白色棱块移到顶面,这个我们不讨论,每个人都会做的.
·         旋转第三层,使得白色棱块的侧面颜色和其颜色的中心块位于同一面,然后向下旋转这个面180,使得白色棱块位于底面.重复此动作,使4个棱块转到底面,我们的十字构成,同时棱块侧面颜色也和中心块位于同一面.

3.     复原底面角块.

     我们会完成底面,并使底面棱块,角块的侧面颜色统一在其颜色中心块的那个侧面,侧面会出现一个颜色的倒”T”.
·         寻找位于第三层的白色角块,并且其白色面位于侧面,而非顶面.
·         如果没有找到,则其要么在第一层,要么在第三层,但是白色面在顶层.我们通常的处理方法是使此块和底面缺角的一边位于右侧面,并在列上不重叠.右顺à上顺()à右逆(目的是把这个角块转离右侧面).
·         旋转第三层,使其另一个侧面颜色和其中心块位于同一个侧面.使这一面为前面.
·         若此角块白色面在左边,则左逆à上逆à左顺
·         若此角块白色面在右边,则右顺à上顺à右逆

4.     构造第二层

我们这里的目的是将第二层完全构造出来,完成后,我们会看到,底面完整的白色,4个侧面下两层完全复原.
·         在第三层找到不含顶面颜色的棱块
·         使棱块侧面颜色与中心块一致,形成一个”I”,面向自己,这时有2种情况.
o   棱块顶面的颜色的中心块在左侧,将左侧改为面向自己.
上逆->前逆->上顺->前顺->上顺->右顺->上逆->右逆
o   棱块顶面的颜色的中心块在右侧.
上顺->右顺->上逆->右逆->上逆->前逆->上顺->前顺
·         如果在第三层找不到不含顶面颜色的棱块,在第二层找一个符合条件的棱块,通过一样的公式把它移到第三层.
上顺->右顺->上逆->右逆->上逆->前逆->上顺->前顺

5.     构造顶面十字

我们这里会把顶面构造一个十字出来,其它的层面不变.有顶面会有3种情况,但公式一致,将魔方如下图方向摆放. “B”表示其他颜色, “Y”表示顶面颜色, “à表示做一次公式,图形会变成箭头右方的图形.
BBB           BYB             BBB
BYB     à  YYB     à    YYY
BBB           BBB             BBB
前顺à右顺à上顺à右逆à上逆à前逆

6.     构造顶面同一颜色

     我在这里会把顶面作成统一的颜色,其他层面不变.开始会有5种状态,公式只有2.通过调用公式将状态3,4,5转换为状态1,2,再调用公式完成动作.
顶面:   BYB        BYB      BYB      YYY     YYB
             YYY        YYY       YYY       YYY     YYY
             BYY        BYY       BYB      BYB    BYY
前面:   BBB       YBB       YBY      YBY     YBB
             BBB       BBB       BBB      BBB    BBB
             BBB       BBB       BBB      BBB    BBB
状态:    (1)         (2)         (3)         (4)       (5)

·         状态(1):前面左上角的颜色不是顶面颜色,用公式(1).
右逆à上顺2à右顺à上顺à右逆à上顺à右顺
·         状态(2):前面左上角的颜色是顶面颜色,用公式(2).
上逆à右顺à上逆2à右逆à上逆à右顺à上逆à右逆
·         状态(3):前面左右上角的颜色是顶面颜色,用公式(1)转为状态(1)(2).
·         状态(4):
o   左右上角块是顶面颜色.
上逆2->公式(1)à状态(5)à上逆à公式(1)à状态(1)(2)
o   左右上角块不是顶面颜色.
上顺à公式(1)à状态(5) à上逆à公式(1)à状态(1)(2)
·         状态(5):就是上逆à公式(1)à状态(1)(2)

7.     顶角归位

   我们这里会使第三层的顶角侧面颜色和其颜色中心块处于同一面,顶面,底面及下两层保持不变.
·         状态(1):使左右上角为同一颜色的为前面.
左边2层顺à上逆à右顺à下顺2à右逆à上顺à右顺à下顺2à右顺2
·         状态(2):没有左右上角同一颜色,做一次以上公式,得到状态(1).

8.     第三层棱块归位.

   这里我们完成最后一步,复原6.
   让已经还原的侧面朝向后面.
   右顺à上逆à右顺à上顺à右顺à上顺à右顺à上逆à右逆à上逆à右顺2