光的世界︰【□○閱讀】樹莓派近攝鏡‧總結

金樓子卷四‧梁‧孝元皇帝

見善則喜,聞惡則憂,民之情也。茍無憂喜,其惟聖人乎?若無喜而不喜,無憂而不憂,蓋何足稱也。白鳥,蚊也。齊桓公臥於栢寢 ,謂仲父曰︰吾國富民殷,無餘憂矣。一物失所,寡人猶為之悒悒 ,今白鳥營營,饑而未飽,寡人憂之。因開翠紗之幬,進蚊子焉。其蚊有知禮者,不食公之肉而退。其蚊有知足者●公而退。其蚊有不知足者,遂長噓短吸而食之;及其飽也,腹膓為之破潰。公曰︰嗟乎民生亦猶是。乃宣下齊國脩止足之鑒,節民玉食,節民錦衣,齊國大化。

蚊子立論,能得國之大化??當真匪夷所思,不知何處想來!!既已為白鳥立傳,打不得也。事實白鳥有複眼,反應要比人快的多 ,想打怕也打不到的哩!!??觀物聯想以至於如此者,大概上能閱覽天文卦象,下可讀通地理風水的吧??!!

因此以近攝鏡之理,通廣角鏡頭

Wide-angle lens

In photography and cinematography, a wide-angle lens refers to a lens whose focal length is substantially smaller than the focal length of a normal lens for a given film plane. This type of lens allows more of the scene to be included in the photograph, which is useful in architectural, interior and landscape photography where the photographer may not be able to move farther from the scene to photograph it.

Another use is where the photographer wishes to emphasise the difference in size or distance between objects in the foreground and the background; nearby objects appear very large and objects at a moderate distance appear small and far away.

This exaggeration of relative size can be used to make foreground objects more prominent and striking, while capturing expansive backgrounds.[1]

A wide angle lens is also one that projects a substantially larger image circle than would be typical for a standard design lens of the same focal length. This large image circle enables either large tilt & shift movements with a view camera, or a wide field of view.

By convention, in still photography, the normal lens for a particular format has a focal length approximately equal to the length of the diagonal of the image frame or digital photosensor. In cinematography, a lens of roughly twice the diagonal is considered “normal”.[2]

220px-focal_length

How focal length affects photograph composition. Three images depict the same two objects, kept in the same positions. By changing focal length and adjusting the camera’s distance from the pink bottle, it remains the same size in the image, while the blue bottle’s size appears to dramatically change. Also note that at small focal lengths, more of the scene is included.

 

以及魚眼鏡頭

Fisheye lens

A fisheye lens is an ultra wide-angle lens that produces strong visual distortion intended to create a wide panoramic or hemispherical image.[1][2] Fisheye lenses achieve extremely wide angles of view by forgoing producing images with straight lines of perspective (rectilinear images), opting instead for a special mapping (for example: equisolid angle), which gives images a characteristic convex non-rectilinear appearance.

The term fisheye was coined in 1906 by American physicist and inventor Robert W. Wood based on how a fish would see an ultrawide hemispherical view from beneath the water (a phenomenon known as Snell’s window).[2][3] Their first practical use was in the 1920s for use in meteorology[4][5] to study cloud formation giving them the name “whole-sky lenses”. The angle of view of a fisheye lens is usually between 100 and 180 degrees[1] while the focal lengths depend on the film format they are designed for.

Mass-produced fisheye lenses for photography first appeared in the early 1960s[6] and are generally used for their unique, distorted appearance. For the popular 35 mm film format, typical focal lengths of fisheye lenses are between 8 mm and 10 mm for circular images, and 15–16 mm for full-frame images. For digital cameras using smaller electronic imagers such as 1/4″ and 1/3″ format CCD or CMOS sensors, the focal length of “miniature” fisheye lenses can be as short as 1 to 2mm.

These types of lenses also have other applications such as re-projecting images filmed through a fisheye lens, or created via computer generated graphics, onto hemispherical screens. Fisheye lenses are also used for scientific photography such as recording of aurora and meteors, and to study plant canopy geometry and to calculate near-ground solar radiation. They are also used as peephole door viewers to give the user a wide field of view.

vlg_shop

An example of full-frame fisheye used in a closed space (Nikkor 10.5mm)

 

之用,誠餘論矣。雖然。因為 CPU、GPU 之便宜與快速,影像處理軟體突飛猛進,或將賦予事物以新意乎☆★

Chessboard detection

Chessboards arise frequently in computer vision theory and practice because their highly structured geometry is well-suited for algorithmic detection and processing. The appearance of chessboards in computer vision can be divided into two main areas: camera calibration and feature extraction. This article provides a unified discussion of the role that chessboards play in the canonical methods from these two areas, including references to the seminal literature, examples, and pointers to software implementations.

……

Multiplane calibration

Multiplane calibration is a variant of camera auto-calibration that allows one to compute the parameters of a camera from two or more views of a planar surface. The seminal work in multiplane calibration is due to Zhang.[4] Zhang’s method calibrates cameras by solving a particular homogeneous linear system that captures the homographic relationships between multiple perspective views of the same plane. This multiview approach is popular because, in practice, it is more natural to capture multiple views of a single planar surface – like a chessboard – than to construct a precise 3D calibration rig, as required by DLT calibration. The following figures demonstrate a practical application of multiplane camera calibration from multiple views of a chessboard.[5]

multiple_chessboard_views

Multiple views of a chessboard for multiplane calibration

reconstructed_boards_camera

Reconstructed orientations (camera-centric coordinates)

reconstructed_boards_world

Reconstructed orientations (world-centric coordinates)

 

 

 

 

 

 

 

 

 

光的世界︰【□○閱讀】樹莓派近攝鏡‧下‧答之合

放大鏡之歷史久遠矣︰

放大透鏡的歷史可追溯至古埃及,約西元前五世紀,以埃及的象形文字表示「一片玻璃透鏡」。最早的文字記載則可追溯到古羅馬,約公元前一世紀,羅馬皇帝尼祿的導師塞內卡寫道「無論多小或模糊的文字,透過球體或注滿水的玻璃壺就會放大」。[1]亦有一說尼錄皇帝曾以一個祖母綠寶石當做凸透鏡來觀賞鬥士比賽。[2]

早於千多年前,人們已把透明水晶寶石磨成「透鏡」,這些透鏡可放大影像。

 

一位喜歡觀察自然萬物的人,也許早已見過它多變的形貌也︰

Water Droplet as a Simple Magnifier

A water droplet can act as a simple magnifier and magnify the object behind it. Water tends to form spherical droplets under the influence of surface tension. When attached to an object like these examples, the spherical shape is distorted, but still capable of forming an image. Above the droplets are on tiny emerging pine cones. At left the droplet forms a partial image of the flower that is out of focus behind it.

 

所謂明視距離,也稱作近點,就是眼睛能聚焦清晰成像的最短距離 ,成年人通常大約是 25 公分。因此在觀察小東西時。需要放大鏡才能看的更清楚物件之紋理。若將放大鏡緊貼眼睛,就彷彿相機加裝近攝鏡一樣,因此可以更近的距離觀物︰

\frac{1}{X_{=25cm}} + \frac{1}{X_{retina}} = \frac{1}{f_{eye}} \     (1)

\frac{1}{X_{min}} + \frac{1}{X_{retina}} = \frac{1}{f_{eq.}} \     (2)

而且 \frac{1}{f_{eq.}} = \frac{1}{f_{eye}} + \frac{1}{f_{mag}} 。從 (2) -(1) ,解之得

X_{min} = \frac{X_{=25cm}}{D_{mag} X_{=25cm} + 1}

\therefore \frac{1}{X_{min}} = \frac{1}{f_{mag}} + \frac{1}{25}因為

M_{X_{min} \cdot X_{min} = M_X_{=25cm} \cdot X_{=25cm}  = X_{retina}所以

M_{X_{min} = \frac{X_{retina}}{X_{min}} = M_X_{=25cm} \cdot \frac{X_{=25cm}}{X_{min}} = M_X_{=25cm} (D_{mag} X_{=25cm} + 1)

\therefore \frac{M_{X_{min} }}{M_X_{=25cm}} = \frac{25}{f_{mag}} + 1

假使單從放大鏡成像來講,

\frac{1}{d_o} + \frac{1}{d_i} = \frac{1}{f_{mag}}

前焦距內之物 d_o < f_{mag}越靠近焦點 {d_o}^- \to f_{mag},虛像將趨近於與物同邊之無窮遠處 d_i \to - \infty 。若以接續成像來講,此時眼睛與放大鏡中間的距離,對比下大可以忽略不計。因此從相對角放大率觀之,

M_{{d_o}^- \to f_{mag} = \frac{25}{f_{mag}}

的了。不過還是多讀讀幾家文本,加深印象與理解的好耶☆

Simple Magnifier

The simple magnifier achieves angular magnification by permitting the placement of the object closer to the eye than the eye could normally focus. The standard close focus distance is taken as 25 cm, and the angular magnification is given by the relationships below.

This precision magnifier performs the role of a simple magnifier, but has multiple elements to overcome aberrations and give a sharper image. Lens combinations are used to make high quality magnifiers for use as eyepieces.

 

光學 標題:放大鏡的原理
1:黃福坤 (研究所)張貼:2006-10-22 12:39:58:

上圖顯示眼睛直接觀看蜜蜂時在視網膜上呈現的大小,圖中 dn通常是明視距離也就是正常狀況為25cm. 視角= y0/dn
下圖則顯示使用放大鏡後的效果,視角=yi/L

比較兩圖可以知道 眼睛看物體的視角變大了!
兩者視角的放大比率就是 放大鏡的放大率(注意和一般透鏡放大率的定義M=-si/so=yi/yo不同)
放大鏡的放大率=(yi/L)/(yo/dn)=-si*dn/(so*L)使用放大鏡時 物體通常非常接近焦距(si->L, so->f) 所以放大鏡的(角)放大倍率= dn/f 只和透鏡的焦距有關!

 

 

 

 

 

 

 

 

 

 

 

 

光的世界︰【□○閱讀】樹莓派近攝鏡‧下‧答之轉

承上篇,固然一個一般光學矩陣

  \left( \begin{array}{cc} A &  B  \\ C & D  \end{array} \right)

之主平面成像公式

\frac{1}{do} + \frac{1}{di} = \frac{1}{f_{eff}} = -C

已經足夠。然而在討論 d_od_i 之正負號時並不方便。何不以前焦點面 F 、後焦點面 F' 將之改寫為焦、焦面矩陣形制呢︰

牛頓成像公式

簡單矩陣計算

後焦距空間 * 系統矩陣 * 前焦距空間

可以證明︰

\left( \begin{array}{cc} 1 & -\frac{A}{C} \\  0 & 1 \end{array} \right) \left( \begin{array}{cc} A & B \\  C & D \end{array} \right) \left( \begin{array}{cc} 1 & -\frac{D}{C} \\  0 & 1 \end{array} \right) = \left( \begin{array}{cc} 0 & -\frac{A D - B C}{C} \\ C & 0 \end{array} \right)

若此光學系統處於同一介質中,則

det  \left( \begin{array}{cc} A &  B  \\ C & D \end{array}  \right)  = A D - B C = 1

因此牛頓成像法則依舊成立︰

x \cdot x' = \frac{1}{C^2} = {f_{eff}}^2

此處 x 在前焦距 f_{front} = - \frac{D}{C} 之前為正,在前焦距之後為負; x' 在後焦距 f_{back} = - \frac{A}{C} 之後為正,後焦距之前為負。故而方便以焦距 f_{eff} = - \frac{1}{C} 為尺,探討物、像之位置也。

當真無有疑義焉?若以主平面為參考系,果然

x = d_o - f_{eff}

x' = d_i - f_{eff}

的 耶??

x \cdot x' = (d_o - f_{eff}) (d_i - f_{eff})

= d_o d_i - d_o f_{eff} - d_i f_{eff} + {f_{eff}}^2

= d_o d_i \left(1 - \frac{f_{eff}}{d_i} - \frac{f_{eff}}{d_o} \right) + {f_{eff}}^2

\therefore = {f_{eff}}^2

故知不同參考系之選擇實為簡化論述乎!!

所以用 x = \pm  \ n \times f_{eff} ,得 x' = \pm \ \frac{f_{eff}}{n} ;以及 x = \pm \ \frac{f_{eff}}{m} ,得 x' = \pm \ m \times f_{eff} 。誠有好處的也。

那麼《光的世界︰矩陣光學六己》文本之

x \cdot x' = FFL * BFL

所說何事的呢??!!這是講該光學系統不滿足

det  \left( \begin{array}{cc} A &  B  \\ C & D \end{array}  \right)  = A D - B C = 1 的哩!!??

 

今天是

教師節

教師節是一個感謝老師一年來教導的節日,旨在肯定教師為教育事業所做的貢獻與努力。不同國家訂定「教師節」的時間有所不同。1994年聯合國教科文組織訂每年10月5日世界教師日。1985年9月10日,是中華人民共和國第一個教師節,中華民國則以9月28日訂為教師節。

 

不知到底誰該放、不放假???想起古代

子曰:自行束脩以上,吾未嘗無誨焉。

!!!

或許現象總需要親自體驗,才容易同理同感吧︰

隱約聽著 Mrphs 繼續說道︰這湖心小築裡有六個『學園』 Campus 是為小學堂暑修寒訓之『學習營』而預備。湖心平台上的是『天文 ‧氣象營』,其餘往下數,『科技營』在二十五層,『人文營』位於五十層,『海洋營』居七十五層,『地理營』佔第一百層。其實還有一個『生命館』屬於全體谷 民,就設立於入口大廳。這個大廳的格局象個『 田 』田字,分有東南西北四館。其中東西北三館是『水』的三相 ── 水‧溼‧冰 ── 之展示館。這南館最特別,是『模擬』館,內有百座『計算單位』所構成的 It 網『平行運算器』 。所謂一個『計算單位』是由萬台『碼訊』machine 所集成。可以即時動態計算巨量的『非線性』方程式之『數值分析』,用以演示`『光』、『水』、『氣』交互系統之各種現象變化。傳達『生命』可貴的『科技護 生』之旨。也是『學園』教與習『理化模型』使用的主機。……

─── 摘自《勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧尖端‧五

 

豈能已有工具︰

Computer simulation

A computer simulation (or “sim”) is an attempt to model a real-life or hypothetical situation on a computer so that it can be studied to see how the system works. By changing variables in the simulation, predictions may be made about the behaviour of the system. It is a tool to virtually investigate the behaviour of the system under study.[1]

Computer simulation has become a useful part of modeling many natural systems in physics, chemistry and biology,[6] and human systems in economics and social science (e.g., computational sociology) as well as in engineering to gain insight into the operation of those systems. A good example of the usefulness of using computers to simulate can be found in the field of network traffic simulation. In such simulations, the model behaviour will change each simulation according to the set of initial parameters assumed for the environment.

Traditionally, the formal modeling of systems has been via a mathematical model, which attempts to find analytical solutions enabling the prediction of the behaviour of the system from a set of parameters and initial conditions. Computer simulation is often used as an adjunct to, or substitution for, modeling systems for which simple closed form analytic solutions are not possible. There are many different types of computer simulation, the common feature they all share is the attempt to generate a sample of representative scenarios for a model in which a complete enumeration of all possible states would be prohibitive or impossible.

Several software packages exist for running computer-based simulation modeling (e.g. Monte Carlo simulation, stochastic modeling, multimethod modeling) that makes all the modeling almost effortless.

Modern usage of the term “computer simulation” may encompass virtually any computer-based representation.

 

不說此工具的耶☆

 

opticalraytracer-poster

Overview

OpticalRayTracer is a powerful, Java-based virtual optical bench. It once functioned perfectly from within a Web page (and on this page) as a Java applet, but it seems applets can no longer be trusted. Here’s an image of OpticalRayTracer in operation. Please download OpticalRayTracer and run it as an application (details below).

Click image for more views

Note: Be sure also to see the new Snell’s Law Calculator, an online analysis tool.

The Details
  • What it is: A sophisticated, cross-platform virtual optical bench.
  • Written in: Java.
  • Works with: Windows, Linux, Macintosh, etc.

OpticalRayTracer is a free (GPL) cross-platform application that analyzes systems of lenses and mirrors. It uses optical principles and a virtual optical bench to predict the behavior of many kinds of ordinary and exotic lens types as well as flat and curved mirrors. OpticalRayTracer includes an advanced, easy-to-use interface that allows the user to rearrange the optical configuration by dragging objects around using the mouse.

OpticalRayTracer fully analyzes lens optical properties, incuding refraction and dispersion. The dispersion display uses color-coded light beams to simplify interpretation of the results.

Recent OpticalRayTracer versions allow the creation of mirrors, flat and curved. In modern optical designs, mirrors often produce better results than lenses, for example in astronomical instruments. Such instruments can be roughed out in OpticalRayTracer’s virtual workbench.

Educators take note: OpticalRayTracer has significant educational potential in the teaching of basic optical principles, and has some entertaining and game-like behaviors to hold the student’s attention.

OpticalRayTracer includes a detailed tutorial/help file to assist the user in getting started in this interesting activity, and this online documentation is also available.

OpticalRayTracer is © Copyright 2014, P. Lutus. All rights reserved.
OpticalRayTracer is released under the General Public License.
OpticalRayTracer is also Careware (http://arachnoid.com/careware),
unless this kind of idea makes you crazy, in which case OpticalRayTracer is free (e.g. GPL).

 

 

 

 

 

 

 

 

 

 

 

光的世界︰【□○閱讀】樹莓派近攝鏡‧下‧答之承

驢橋定理

驢橋定理拉丁語Pons asinorum),也稱為等腰三角形定理,是在歐幾里得幾何中的一個數學定理,是指等腰三角形二腰對應的二底角相等。等腰三角形定理也是歐幾里得幾何原本第一卷命題五的內容。

有關其名稱驢橋定理的由來有二種:一種是幾何原本中的示意圖即為一座橋,另外一種比較廣為大家接受,是指這是幾何原本中第一個對於讀者智力的測試,並且做為往後續更困難命題的橋樑[1]幾何學是列在中世紀四術之中,驢橋定理是在幾何原本的前面出現的較困難命題,是數學能力的一個門檻,也稱之為「笨蛋的難關」[2],無法理解此一命題的人可能也無法處理後面更難的命題。

無論其名稱的由來為何,驢橋定理一詞也變成是一種隱喻,是指對能力或了解程度的關鍵測試,可以將了解及不了解的人區分開來[3]

Pons asinorum

In geometry, the statement that the angles opposite the equal sides of an isosceles triangle are themselves equal is known as the pons asinorum (Latin pronunciation: [ˈpons asiˈnoːrʊm]; English /ˈpɒnz ˌæsˈnɔərəm/ PONZ-ass-i-NOR-(r)əm), Latin for “bridge of donkeys”. This statement is Proposition 5 of Book 1 in Euclid‘s Elements, and is also known as the isosceles triangle theorem. Its converse is also true: if two angles of a triangle are equal, then the sides opposite them are also equal.

The name of this statement is also used metaphorically for a problem or challenge which will separate the sure of mind from the simple, the fleet thinker from the slow, the determined from the dallier; to represent a critical test of ability or understanding.[1]

byrne_preface-15

Byrne版幾何原本中,驢橋定理的內容,有列出部份歐幾里得的證明

 

假如兩個三角形全等之第一原理為 SAS ── 夾角相等、夾角之兩邊亦皆對等 ── ,那麼作等長之延伸線段,迭代使用 SAS 證明,的確需要一番思慮。若是 SSS ── 三邊長都對應相等 ── 當第一原理,或許只需在等腰三角形之底取中點,就可藉 SSS 得出兩底角相等。據知幾何原本裡根本沒有 SSS 全等,這又為什麼呢?難到是因為它不夠直覺嗎?還是以一邊為底,兩端點各依所餘兩邊作圓,此二圓將相交於兩點,那要如何判定所形成的這兩個三角形全等的呢??也許 SSS 之證明可以藉著在頂點處作條平行於底邊的平行線︰

歐幾里得』的『平行公設』 ── 經過『線外』一『』,只能作一條『平行線』平行該『 ──,或許正因為不夠『直覺』,然而有人將它看成了『公理』,於是乎長期以來議論不斷,如此經過了兩千多年。一八二零年時,俄國數學家『尼古拉‧伊萬諾維奇‧羅巴切夫斯基』 Никола́й Ива́нович Лобаче́вский 想用『歸謬法』證明︰假使僅『反對』了『平行公設』 ── 假設有兩條平行線 ── ,但是卻『保留』著『其它公設』,這樣的『幾何系統』是不是會發生內部 之『邏輯矛盾』的呢?本來是想『證明』平行公設的『必要性』,結果意外『成立』了一門『新的幾何學』,這就是第一個被提出的『非歐幾何學』。如果從『羅氏幾何學』建構方法來看,我們可以『知道』只要『選擇』邏輯上不矛盾的『一些公理』都有可能『成立』一種『幾何學』。這樣我們的『大自然』它會『選擇』特定的『幾何學』的嗎?假使果真有這個『幾何學』,我們又要『依據』什麼才能『判斷』它是『真實』的呢??因此我們或許更當 細思『先驗知識』與『後驗知識』之間的大哉『』與『』的吧!!

400px-Noneuclid

三種平行假設

Teorema_de_desargues.svg
笛沙格定理

如果A.a,B.b,C.c 共點,那麼 (A.B)∩(a.b),(A.C)∩(a.c),(B.C)∩(b.c) 共線。

200px-Hyperbolic_triangle.svg
雙曲面幾何學
多條平行線

Triangle_on_spherical_plane
球面幾何學
沒有平行線

─── 摘自《【Sonic π】電聲學之電路學《四》之《 !!!! 》上

 

在此頂點兩端都可取一點,依據 SAS 及內錯角相等,全等於 SSS 之三角形。如是再因平行線的唯一性而得證。傳聞愛因斯坦小時並不了了,嘗如倔驢般畫了幾百個直角三角形,只求能實證畢氏定理,豈非反倒助其後發先至的呢!!因是一時之會與不會從來不是問題 ,想不想會才是大哉問的哩??!!

雖然通常求解一般性問題︰a^2 + b^2 = c^2 的所有整數解。

勾股數組

勾股數組是滿足勾股定理  a^2 + b^2 = c^2正整數  (a,b,c),其中的  a,b,c稱為勾股數。例如  (3,4,5)就是一組勾股數組。

任意一組勾股數  (a,b,c)可以表示為如下形式: a=k(m^2-n^2), b=2kmn, c=k(m^2+n^2),其中  k, m,n\in \mathbb{N*},m>n

phzscn

趙爽 勾股圓方圖證明勾股定理法動畫

要比特定問題︰x^2 + y^2 = {17}^2 的整數解。

困難的多。事實上這並非是必然的矣!!??

就讓我們以一般光學矩陣為例

  \left( \begin{array}{cc} A &  B  \\ C & D  \end{array} \right)

探討前後焦距主平面、以及成像法則吧。如是也可知道 ABCD 這四個符號,實有著深刻的意蘊,故能決定那光學系統之行為。

【前後焦距】

牛頓成像公式

依慣例假設光的行徑方向是左→右,遇一光學系統,此處發生折射【※ 或反射】,這處稱之為『前端點』 V ,而後行經此光學系統 ,最終發生折射處【※ 或反射】稱之為『後端點』 V' 。這構成了『端點面參考系』,也就是『前後焦距』以平行光『度量』聚散的座標系。簡單推導如下︰

pi@raspberrypi:~ ipython3 Python 3.4.2 (default, Oct 19 2014, 13:31:11)  Type "copyright", "credits" or "license" for more information.  IPython 2.3.0 -- An enhanced Interactive Python. ?         -> Introduction and overview of IPython's features. %quickref -> Quick reference. help      -> Python's own help system. object?   -> Details about 'object', use 'object??' for extra details.  In [1]: from sympy import *  In [2]: from sympy.physics.optics import FreeSpace, FlatRefraction, ThinLens, GeometricRay, CurvedRefraction, RayTransferMatrix  In [3]: init_printing()  In [4]: A, B, C, D = symbols('A, B, C, D')  In [5]: 光學系統 = RayTransferMatrix(A, B, C, D)  In [6]: 光學系統 Out[6]:  ⎡A  B⎤ ⎢    ⎥ ⎣C  D⎦  In [7]: z, h, θ = symbols('z, h, θ')  In [8]: 平行光匯聚於後焦點 = FreeSpace(z) * 光學系統 * GeometricRay(h, 0)  In [9]: 平行光匯聚於後焦點 Out[9]:  ⎡h⋅(A + C⋅z)⎤ ⎢           ⎥ ⎣    C⋅h    ⎦  In [10]: 匯聚前焦點之光而後平行 = 光學系統 * FreeSpace(z) * GeometricRay(0, θ)  In [11]: 匯聚前焦點之光而後平行 Out[11]:  ⎡θ⋅(A⋅z + B)⎤ ⎢           ⎥ ⎣θ⋅(C⋅z + D)⎦  In [12]:  </pre> <span style="color: #003300;">得到</span>  <span style="color: #003300;">後焦距  =-\frac{A}{C}</span>  <span style="color: #003300;">前焦距 =-\frac{D}{C}。</span>     <span style="color: #003300;">【<a style="color: #003300;" href="http://www.freesandal.org/?p=58169">主平面</a>】</span>  <span style="color: #003300;">也知</span>  <span style="color: #003300;">後主平面  =\frac{1 - A}{C}</span>  <span style="color: #003300;">前主平面 =\frac{1 - D}{C}</span>  故可驗證薄透鏡之等效式為︰ <pre class="lang:python decode:true">In [12]: 等效薄透鏡 = FreeSpace((1-A)/C) * 光學系統 * FreeSpace((1-D)/C)  In [13]: 等效薄透鏡 Out[13]:  ⎡       D⋅(-A + 1)   -D + 1⎤ ⎢1  B + ────────── + ──────⎥ ⎢           C          C   ⎥ ⎢                          ⎥ ⎣C             1           ⎦  In [14]: 等效薄透鏡.B.simplify() Out[14]:  -A⋅D + B⋅C + 1 ──────────────       C         In [15]:  </pre>    <span style="color: #003300;"> 若此光學系統處於同一介質中,則</span> det  \left( \begin{array}{cc}
A &  B  \\
C & D \end{array}  \right)  = A D - B C = 1。  <span style="color: #003300;">正為所求也。</span>     還可考之以『主平面參考系』  等效焦距f_{eff}= 後焦距 - 後主平面= -\frac{A}{C} - \frac{1 - A}{C} = - \frac{1}{C}也就是  等效焦距f_{eff}= 前焦距 - 前主平面= -\frac{D}{C} - \frac{1 - D}{C} = - \frac{1}{C}的了。  如此成像法則\frac{1}{do} + \frac{1}{di} = \frac{1}{f_{eff}}$

果能有疑義焉☆

 

 

 

 

 

 

 

 

 

 

光的世界︰【□○閱讀】樹莓派近攝鏡‧下‧答之起

若問薄透鏡之理想性何在?又為什麼會成為理論法寶的呢!得先從兩個曲面 R_1}R_2 的折射推導出薄透鏡

  \left( \begin{array}{cc} 1 &  0  \\ - \frac{1}{f} & 1  \end{array} \right)

以及造透鏡者公式

\Phi (R_1, R_2) = \frac{1}{f} = (n-1) \left[  \frac{1}{R_1} - \frac{1}{R_2}  \right] 講起。

因為 \Phi (R_1, R_2) 的反對稱性︰

\Phi (R_2, R_1) = - \Phi (R_1, R_2)

當薄透鏡由 R_1 \to R_2 反轉成 R_2 \to R_1 時,凹面將變凸面、凸面將變凹面,此時 R_1R_2 依約定之符號正負慣例,皆需變號,反倒使薄透鏡維持反轉不變性。故知薄透鏡前、後焦距一樣就是焦距 f 。事實上由於薄透鏡的特殊矩陣形制,兩個緊貼之薄透鏡組合還滿足交換律的哩︰

\left( \begin{array}{cc}  1 & 0 \\  - \frac{1}{f_1} & 1 \end{array} \right) \left( \begin{array}{cc} 1 & 0 \\  - \frac{1}{f_2} & 1 \end{array} \right)  = \left( \begin{array}{cc} 1 & 0 \\  - \frac{1}{f_2}  & 1 \end{array} \right)  \left( \begin{array}{cc} 1& 0 \\ - \frac{1}{f_1} & 1 \end{array} \right)

 

其次薄透鏡的

端點面 = 主平面 = 節點面

,使得它特別容易用『幾何光學三條線』作圖,講述成像法則

\frac{1}{d_o} + \frac{1}{d_i} = \frac{1}{f}

,此處 d_o 是物距, d_i 是像距。

在此成像條件下,總合矩陣可表示成︰

\left( \begin{array}{cc} 1 & d_i \\  0 & 1 \end{array} \right) \left( \begin{array}{cc} 1 & 0 \\  - \frac{1}{f} & 1 \end{array} \right) \left( \begin{array}{cc} 1 & d_o \\  0 & 1 \end{array} \right) = \left( \begin{array}{cc} - \frac{d_i}{d_o}& 0 \\ - \frac{1}{f} & - \frac{d_o}{d_i} \end{array} \right)

也就是說總合矩陣的B 參數等於 0

若以放大率 M = - \frac{d_i}{d_o} 之定義,可將之改寫為︰

  \left( \begin{array}{cc}  M &  0  \\ - \frac{1}{f} & \frac{1}{M}  \end{array} \right)

此處負號是說︰假如 f 是正的,將聚焦產生倒立之實像也。

雖然沿著光徑走,經過一個透鏡,才能到下個透鏡,光子不必知有幾村幾店,不過是走過這村到那店,因此

物成像,像做物。

依序聚散罷了,講其是否能『串接成像』而已︰

\left( \begin{array}{cc} A_2 & 0 \\ C_2 & D_2 \end{array} \right) \left( \begin{array}{cc} A_1 & 0 \\ C_1 & D_1 \end{array} \right) = \left( \begin{array}{cc} A_2 A_1 & 0 \\ C_2 A_1 + D_2 C_1 & D_2 D_1 \end{array} \right)

 

不過符號眾多,代數運算麻煩,而且易為虛實正負物距像距鬧的個頭昏腦轉。即使知兩個一般光學矩陣

  \left( \begin{array}{cc} A &  B  \\ C & D  \end{array} \right)

就可代表『人眼見物』或『鏡頭攝物』,卻難了那個 ABCD 之光學矩陣實為人眼或鏡頭所設計出的觀物設備矣。

因此通熟薄透鏡的基本成像法則

\frac{1}{d_o} + \frac{1}{d_i} = \frac{1}{f}

之作用︰物已成像,像即是物。實是關鍵處也。若說起初物在透鏡之外, 則 do_{begin} > 0 ,但如成像落在下個薄透鏡之內,那麼 do_{next} < 0 ,於是正負與虛實之理相互爭勝, 用前一薄透鏡定之哉 ?或以後一薄透鏡定之哉!還是由薄透鏡組合定之哉??!!設若將此議論用之於像,豈不依然焉!!??奈何懷疑人眼或鏡頭只見虛像或實像呢★?倘已成像,就是看到像了吧,又怎能不實的哩 。此時所謂設備之有無,難到不祇是為方不方便觀物的嗎☆!

固然物理不是數學,但當物理原理可用數學作表達時,用數學概念探討物理現象,也是理所當然的也。且以『物距序列』在薄透鏡之焦距外和焦距內,看看『像距序列』之變化也。

pi@raspberrypi:~ ipython3 Python 3.4.2 (default, Oct 19 2014, 13:31:11)  Type "copyright", "credits" or "license" for more information.  IPython 2.3.0 -- An enhanced Interactive Python. ?         -> Introduction and overview of IPython's features. %quickref -> Quick reference. help      -> Python's own help system. object?   -> Details about 'object', use 'object??' for extra details.  In [1]: from sympy import *  In [2]: from sympy.physics.optics import FreeSpace, FlatRefraction, ThinLens, GeometricRay, CurvedRefraction, RayTransferMatrix  In [3]: init_printing()  In [4]: do, di, f, n = symbols('do, di, f, n')  In [5]: Img = Eq(1/do + 1/di, 1/f)  In [6]: Img Out[6]:  1    1    1 ── + ── = ─ do   di   f  In [7]: ObjFar = Img.subs(do, n*f)  In [8]: solve(ObjFar, di) Out[8]:  ⎡ f⋅n ⎤ ⎢─────⎥ ⎣n - 1⎦  In [9]: limit(solve(ObjFar, di)[0], n, oo) Out[9]: f  In [10]: ObjNear = Img.subs(do, f/n)  In [11]: solve(ObjNear, di) Out[11]:  ⎡ -f  ⎤ ⎢─────⎥ ⎣n - 1⎦  In [12]: limit(solve(ObjNear, di)[0], n, oo) Out[12]: 0  In [13]:</pre>    為何不及於『焦距上』的耶?因為d_i \to \infty$ 之故, SymPy 不能求解也。或可考之以內、外極限值乎︰
In [13]: limit(solve(ObjFar, di)[0], n, 1,'+')
Out[13]: ∞⋅sign(f)

In [14]: limit(solve(ObjNear, di)[0], n, 1,'-')
Out[14]: ∞⋅sign(f)

In [15]: