Jul 21, 2014

Use python matplotlib to create 3D vector-based graphics, 3D vector graphics DIY

I drew the following graphs using Python and it's Matplotlib. If you are interested in the python code, they are here (not including the first gyroscope figure, will be added later). I am trying to improve the code into many functions/modules so that drawing can be convenient and automated. The part related to plotting starts from line 128, because this is just a portion of another bigger project. Just want to show this is not as time-consuming as one may think it is. We can create or draw beautiful vector-based graphs without buying expensive software like Adobe Illustrator or Acdsee Canvas. However as you can guess with this method you will need the numerical x,y,z locations of everything! (which is generated from yet another portion of the program!)

Jun 25, 2014

Python code for 3D rotation simulation (core algorithm: iteration of direction cosine matrix)

(ongoing revision persists...)

Iteration of DCM with angular velocity in body frame. (This is the module. Import it in Python to use the iteration method.)
An example. (A test code.)

The background theory is in this post (in Chinese language though, I want to translate it into English but it takes time. Hope someone is interested in translating it!). And it has a python simulation of a rotating symmetric top in 3D motion.

The approximation of rotation by iteration of DCM is discussed in this textbook[1]. The approximation of rotation ωdt is also discussed. Here I use ω(t+dt)dt to approximate the rotation from t to t+dt. This is discussed in the same post.

[1]  D.H. Titterton and J.L. Weston, Strapdown inertial navigation technology, Peter Peregrinus
Ltd., London UK, 1997




May 22, 2014

模範生制度與無為而治

" 不尚賢,使民不爭;不貴難得之貨,使民不爲盜;不見可欲,使民心不亂。
  是以聖人之治,虛其心,實其腹,弱其志,強其骨。
  常使民無知無欲,使夫智者不敢爲也。
  爲無爲,則無不治。"

- 老子道德經 -

新聞http://buzzorange.com/2015/10/16/why-do-we-need-model-student/

May 1, 2014

direction of friction force of rolling objects 有外力作用的的純滾動摩擦的作用力方向討論

這是一題常見於研究所考試試題的延伸討論。

試題舉例:國立成功大學96學年度碩士班招生考試試題,編號224,系所:醫學工程研究所甲組,科目:工程力學

這邊詳細的討論幾種較難的延伸型態,並審視磨擦力作用於滾動物體的方向,因摩擦力的方向很容易弄錯。有趣的是這些型態在日常生活中都很常見。

A sectional material I wrote up for university physics. These are more advanced problems for 1st and 2nd year engineering in university.

重新將我的手稿排版(latex): 排版完成2016/6/18



我的部落格內的相關文章:
http://whymranderson.blogspot.tw/2013/06/3-dimentional-rolling-coin-simulation.html
http://whymranderson.blogspot.tw/2013/02/two-coins-roll-without-slipping-puzzle.html


舊手稿


Apr 28, 2014

說話的時候 是把柔軟的內心拿出來交流的時候 要 慢慢來

我覺得,說話的時候,都是捧著我們的內心在手上而跟別人交流的時候,內心是多麼脆弱是非常容易碰觸到而受傷的,尤其是當兩個手上拿著心臟的人遇到的時候。因為既要小心關注手上拿著的非常脆弱的心,而又需要分點心思來跟其他的人交流,一個不注意,別人把手上的內心撞著了,輕輕地碰一下,那就算了,惡意的撞可是真會有傷的。一般人可能不知道,說話這件事情是需要很專心花心思去處理的動作。得要正確地練習。

受到言語攻擊,相當於內心受到攻擊,想要反擊是很正常的反應,不過,更高的層次,是聰明的人可以四兩撥千金,在受到攻擊前就會適時地反應,既達到自己受到心靈傷害,又可以小小的回個不傷人的警示招式,有時還可以起到幽默而破冰而雙贏的作用。這點是我們台灣人比較不會得地方,或許是因為我們這幾代的價值觀缺乏這部分的認知與省思。

多練習方法對的溝通交流,才是正確的方式。只要記得,捧在手上的內心,其實是有一定程度的防禦能力,對一定程度的攻擊是不會有影響反而可以起到段練心智的作用,多多練習這種機會,並且以來三回一的大氣肚方式,會讓你的內心逐漸茁壯且肚量越來越大,肚量大就更不容易受傷。防守,大部分的時候絕對是一個好的攻擊。而且攻擊容易防守難,當然是要先練防守先。

舉例來說,莫須有的罪名安插,是很常見的言語攻擊,如果心智沒有練習過的人,一開始就只能以相同方式 - 更莫須有的罪名 來反擊,這種反應是正常的,沒甚麼不對,不過久了你會發現,這樣的方式起不到保護自己內心的作用,還是會有傷痕,會難過,而且,會影響到過日子。我目前練習到的程度是,想想對方可能是個不值得你注意的傢伙,那就微笑帶過,這樣內心不會受傷,而且你會發現,突然就有時間可以慢慢地靜靜地思考一個幽默的情境回話,想不到那也就算了,這樣你的內心雖然受到攻擊但是是處於開心的狀態,那就有起到練習的作用,你的內心復原會很快,可能一天之內就平復了。而攻擊你的人,復原的速度會非常慢,生活會一團糟,它會影響到自己的生活,工作,處處碰壁。溝通不需要運氣,認真就輸了一半,賭氣就輸了全部,內心會受傷。

不過,隨意但要注意,惡意的語言攻勢,隨處可見,馬路如虎口,說話如戰場,要多練習方法正確的說話。記得,說話,是要花時間花心思去處理的,不能隨便回回的,多練習思考自己不會受傷的防禦情境。