GoPiGo 小汽車︰格點圖像算術《投影幾何》【四‧平面國】《乙》

百戰天龍》(MacGyver)(港譯《玉面飛龍》),美國電視劇系列,最初是在1985年9月在美國廣播公司電視網播出的,一直到1992年中的一季才結束,全劇共有七季139集。

故事舞台遍及世界各地,然而實際都是在加州南部(第一季、第二季和第七季)與加拿大溫哥華周邊地區(第三季至第六季)拍攝 。雖然影集已經停播,但後來仍有兩部電視電影,分別是《馬蓋先奪寶奇謀[1](The Lost City of Atlantic)》和《馬蓋先橫掃千軍[2](Trail to Doomsday)》。影集及電影大致上的情節在於馬蓋先的冒險故事與化解危機。他從來不帶武器,只靠一把瑞士刀,他過人的智慧,利用身邊任何不起眼的物品來解決困難。馬蓋先有著廣泛的物理化學知識,還有一切能實行他的「馬蓋先主義(MacGyverism)」的東西。

此處以平行光,思無窮,鑽籬木取離火!得百戰天龍智慧之旨耶☆物理固非數學,當物理原理用數學式子表達時,數學之正確,或需物理的詮釋乎?論疑惑生之所焉★

若問焦、焦面

牛頓成像公式

之成像法則

x \cdot x' = {f_{eff}}^2

所 說何事?不管 f_{eff} 是正或是負,  {f_{eff}}^2 都是正的也!如是對凸透鏡來講,無窮遠之物 x \to \infty ,將成像於後焦點之平面上 x' \to 0 。那麼對凹透鏡來說,分明數學式子一樣!!又怎麼能一樣的呢??假使知道凹透鏡的後焦距面在凹透鏡之前,前焦距面在凹透鏡之後 ,能否釋疑呢???當真成像還是在後焦距面上!!!

其實物理的基礎是現象事實,從幾何光學來談光行經透鏡時的現象 ,不過是光束之聚或散而已。事實與成不成像 ── 有人在看、相機在拍 ── 語意有差異矣。就像『照明

Lighting

Lighting or illumination is the deliberate use of light to achieve a practical or aesthetic effect. Lighting includes the use of both artificial light sources like lamps and light fixtures, as well as natural illumination by capturing daylight. Daylighting (using windows, skylights, or light shelves) is sometimes used as the main source of light during daytime in buildings. This can save energy in place of using artificial lighting, which represents a major component of energy consumption in buildings. Proper lighting can enhance task performance, improve the appearance of an area, or have positive psychological effects on occupants.

Indoor lighting is usually accomplished using light fixtures, and is a key part of interior design. Lighting can also be an intrinsic component of landscape projects.

豈因為要成像嘛。而且見物攝影無非是見物之像而已。所以虛、實之名義,只是說︰透鏡後光線聚焦稱實像;若是透鏡後光線往前之延伸線才匯聚叫虛像的哩。

【實】

522px-Lens1.svglarge_convex_lens

【虛】

522px-Lens1b.svgConcave_lens

所以『實點光源』、『虛點光源』不過『它』在哪裡的說法。物理現象『聚後實散』與『散前虛匯』,實際上是相同的吧。

因此一個一般光學矩陣

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

,可以等效於一個透鏡

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

,在主平面參考系裡,享有著同樣的成像公式

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

又說什麼呢?設若以 {f_{eff}}^+ 表示物距 d_o 比等效焦距大,但是很接近那個焦距。{f_{eff}}^- 表達物距 d_o 比此等效焦距小,但是也很接近那個焦距。當此實、虛之際,聚、散之時

\frac{1}{d_o_{\to {f_{eff}}^+}} + \frac{1}{d_i_{\to + \infty}} = \frac{1}{f_{eff}}

\frac{1}{d_o_{\to {f_{eff}}^-}} + \frac{1}{d_i_{\to - \infty}} = \frac{1}{f_{eff}}

到底該哪樣解釋

\frac{1}{d_o_{\to f_{eff}}} + \frac{1}{d_i_{\to \pm \infty}} = \frac{1}{f_{eff}} 的啊??倘以現象而言,同也。皆平行光罷了!!

實 發光體 d_o 自無窮遠處 + \infty 向凸透鏡之前焦距趨近,其像距 d_i 將由後焦距往後遠離,當 d_o \to {f_{eff}}^+ ,像將在無窮遠也 d_i \to \infty ,豈非透鏡後之平行光耶?★要是它從凸透鏡之主平面向後開始靠近前焦距面 d_o \to {f_{eff}}^- ,那麼 d_i \to -\infty ,難到能不是以『所見』為重,省略其透鏡後已然平行的乎!☆

試請讀者想想凹透鏡一致的乎★探探物貼 d_o \to 0 凹凸鏡面上之理耶☆

%e6%94%be%e5%a4%a7%e9%8d%b5%e7%9b%a4%e4%b8%ad%e7%9a%84%e6%94%be%e5%a4%a7%e9%8f%a1

─── 摘自《光的世界︰【□○閱讀】平行光之疑惑

 

根據失傳之《平面國數典》記載︰

起初以『平投派』者為主流之學術圈,因著『人造點光源』的發明

 

,有人開始懷疑他們的『太陽』是『平行光源』之『假說』。這就開啟了『點投派』者的『理論』。史稱論戰前後縱貫數百年之久。終以『點投派』學者用『無窮遠』『投射點』函括了『平投派』之『平行線』告捷而終。

,作者與其苦惱該如何將『平面話』翻譯成『立體語』的呢?不如請讀者以事證事吧︰

Projection (mathematics)

In mathematics, a projection is a mapping of a set (or other mathematical structure) into a subset (or sub-structure), which is equal to its square for mapping composition (or, in other words, which is idempotent). The restriction to a subspace of a projection is also called a projection, even if the idempotence property is lost. An everyday example of a projection is the casting of shadows onto a plane (paper sheet). The projection of a point is its shadow on the paper sheet. The shadow of a point on the paper sheet is this point itself (idempotence). The shadow of a three-dimensional sphere is a closed disk. Originally, the notion of projection was introduced in Euclidean geometry to denote the projection of the Euclidean space of three dimensions onto a plane in it, like the shadow example. The two main projections of this kind are:

  • The projection from a point onto a plane or central projection: If C is a point, called the center of projection, then the projection of a point P different from C onto a plane that does not contain C is the intersection of the line CP with the plane. The points P such that the line CP is parallel to the plane do not have any image by the projection, but one often says that they project to a point at infinity of the plane (see projective geometry for a formalization of this terminology). The projection of the point C itself is not defined.
  • The projection parallel to a direction D, onto a plane or parallel projection: The image of a point P is the intersection with the plane of the line parallel to D passing through P. See Affine space § Projection for an accurate definition, generalized to any dimension.

The concept of projection in mathematics is a very old one, most likely having its roots in the phenomenon of the shadows cast by real world objects on the ground. This rudimentary idea was refined and abstracted, first in a geometric context and later in other branches of mathematics. Over time differing versions of the concept developed, but today, in a sufficiently abstract setting, we can unify these variations.

In cartography, a map projection is a map of a part of the surface of the Earth onto a plane, which, in some cases, but not always, is the restriction of a projection in the above meaning. The 3D projections are also at the basis of the theory of perspective.

The need for unifying the two kinds of projections and of defining the image by a central projection of any point different of the center of projection are at the origin of projective geometry. However, a projective transformation is a bijection of a projective space, a property not shared with the projections of this article.

Parallel projection

A parallel projection is a projection of an object in three-dimensional space onto a fixed plane, known as the projection plane or image plane, where the rays, known as lines of sight or projection lines, are parallel to each other. It is a basic tool in descriptive geometry. The projection is called orthographic if the rays are perpendicular (orthogonal) to the image plane, and oblique or skew if they are not.

Overview

A parallel projection is a particular case of projection in mathematics and graphical projection in technical drawing. Parallel projections can be seen as the limit of a central or perspective projection, in which the rays pass through a fixed point called the center or viewpoint, as this point is moved towards infinity. Put differently, a parallel projection corresponds to a perspective projection with an infinite focal length (the distance between the lens and the focal point in photography) or “zoom“. In parallel projections, lines that are parallel in three-dimensional space remain parallel in the two-dimensional projected image.

A perspective projection of an object is often considered more realistic than a parallel projection, since it more closely resembles human vision and photography. However, parallel projections are popular in technical applications, since the parallelism of an object’s lines and faces is preserved, and direct measurements can be taken from the image. Among parallel projections, orthographic projections are the most realistic, and are commonly used by engineers. On the other hand, certain types of oblique projections (for example cavalier projection, military projection) are very simple to implement, and are used to create quick and informal pictorials of objects.

The term parallel projection is used in the literature to describe both the procedure itself (a mathematical mapping function) as well as the resulting image produced by the procedure.

Parallel projection terminology and notations. The two blue parallel line segments to the right remain parallel when projected onto the image plane to the left.

 

且嘗試將『三維視線』投入『二維眼光』作一圖︰

 

若說 P 是『點投派』一『投影函數』,那麼

P  \left( \begin{array}{cc} x \\ y \end{array} \right)  =  \left( \begin{array}{cc} x/y \\ 1 \end{array} \right)

,依約一定落在『投影線』之 \left( \begin{array}{cc} x/y \\ 1 \end{array} \right) 點上。難到 P  \left( \begin{array}{cc} x/y \\ 1 \end{array} \right)  ?=  \left( \begin{array}{cc} x/y \\ 1 \end{array} \right) 能夠『不等於』 \neq 乎?

如此豈不當然 P^2 = P 哩??

不過『平投派』能借『矩陣』表達『x 正投影』︰

\left( \begin{array}{cc} 1 & 0 \\ 0 & 0 \end{array} \right)  \left( \begin{array}{cc} x \\ y \end{array} \right) = (x, 0) , \ P_x =  \left( \begin{array}{cc} 1 & 0 \\ 0 & 0 \end{array} \right)

符合『投影』約定『術語』︰ P_x \cdot P_x = P_x

怎能不問那 P 是否也『能用矩陣』表示耶◎

 

 

 

 

 

 

 

 

 

GoPiGo 小汽車︰格點圖像算術《投影幾何》【四‧平面國】《甲》

朱熹‧觀書有感

半畝方塘一鑑開,
天光雲影共徘徊。
問渠那得清如許,
為有源頭活水來。

昨夜江邊春水生,
蒙衝巨艦一毛輕。
向來枉費推移力,
此日中流自在行。

 

前一篇既讀過了許多有關『一維投影線』的描述,是否知道什麼是『投影』了呢 ?為什麼它可用『二維平面』上所有通過『原點』之『線』與 y = 1 這條『特殊線』的『交點』為『模型』哩?所謂的『無窮遠點』在哪裡?它有沒有『消失點』耶?…

此處我們順著 J.C. Álvarez Paiva 先生『平面國』 Flatland 想像作個『破甲之說』以為緣起吧。

據聞該國人的『眼睛』宛如理想之『針孔成像』器官,故而下圖的『Artist』僅是略說而已︰

 

 

 

當地的『科學家』曾仔細研究『不透明物』在『相異光源』下之『成影現象』︰

※ 出處︰ Question Board — Questions about Light
 

而且度量過他們的『太陽』,可視為遙遠的『點光源』

 

傳說經長年『眼見』與『實證』之爭後,越來越得手應心也︰

輪扁斲輪』說何事?書貴活讀,道通其意!

斲輪

莊子‧天道

世之所貴道者,書也。書不過語,語有貴也。語之所貴者,意也,意有所隨。意之所隨者,不可以言傳也,而世因貴言傳書。世雖貴之哉,猶不足貴也,為其貴非其 貴也。故視而可見者,形與色也;聽而可聞者,名與聲也。悲夫!世人以形色名聲為足以得彼之情。夫形色名聲,果不足以得彼之情,則知者不言,言者不知,而世 豈識之哉!

桓 公讀書於堂上,輪扁斲輪於堂下,釋椎鑿而上,問桓公曰:『敢問:公之所讀者,何言邪?』公曰:『聖人之言也。』曰:『聖人在乎?』公曰:『已死矣。』曰: 『然則君之所讀者,古人之糟魄已夫!』桓公曰:『寡人讀書,輪人安得議乎!有說則可,無說則死!』輪扁曰:『臣也以臣之事觀之。斲輪,徐則甘而不固,疾則 苦而不入,不徐不疾,得之於手而應於心,口不能言,有數存焉於其間。臣不能以喻臣之子,臣之子亦不能受之於臣,是以行年七十而老斲輪。古之人與其不可傳也 死矣,然則君之所讀者,古人之糟魄已夫!』

於是乎能『得手應心』耶??!!

因想起那個說『得心應手』的蘇軾有詩言︰

宋‧蘇軾《題西林壁》

橫看成嶺側成峰,
遠近高低各不同。
不識廬山真面目,
只緣身在此山中。

─ 摘自《W!o+ 的《小伶鼬工坊演義》︰神經網絡【MNIST】五

 

始流出這『統合圖』矣︰

 

 

 

 

 

 

 

 

 

GoPiGo 小汽車︰格點圖像算術《投影幾何》【三下】

若問薄透鏡之理想性何在?又為什麼會成為理論法寶的呢!得先從兩個曲面 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 ,於是正負與虛實之理相互爭勝, 用前一薄透鏡定之哉 ?或以後一薄透鏡定之哉!還是由薄透鏡組合定之哉??!!設若將此議論用之於像,豈不依然焉!!??奈何懷疑人眼或鏡頭只見虛像或實像呢★?倘已成像,就 是看到像了吧,又怎能不實的哩 。此時所謂設備之有無,難到不祇是為方不方便觀物的嗎☆!

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

 

難到『幾何光學三條線』不座落在同一平面上嗎?莫非『成像法則 』不是用『線狀物』描述耶??靜思光學系統通常有『光軸旋轉』『對稱性』,可得『沙漏』之意象乎!

安布羅喬洛倫采蒂的作品: Allegory of Good Government, 1338年

 

或許『沙漏』不止是度量『時間』,還潛藏著『針孔相機模型』的『奧秘』!!

熟悉的事物往往容易疑惑,然而意料之外的難處卻能加深理解◎

試讀『一維投影』的若干文摘︰

Projective line

In mathematics, a projective line is, roughly speaking, the extension of a usual line by a point called a point at infinity. The statement and the proof of many theorems of geometry are simplified by the resultant elimination of special cases; for example, two distinct projective lines in a projective plane meet in exactly one point (there is no “parallel” case).

There are many equivalent ways to formally define a projective line; one of the most common is to define a projective line over a field K, commonly denoted P1(K), as the set of one-dimensional subspaces of a two-dimensional Kvector space. This definition is a special instance of the general definition of a projective space.

Homogeneous coordinates

An arbitrary point in the projective line P1(K) may be represented by an equivalence class of homogeneous coordinates, which take the form of a pair

  [x_1 : x_2]

of elements of K that are not both zero. Two such pairs are equivalent if they differ by an overall nonzero factor λ:

  [x_{1}:x_{2}]\sim [\lambda x_{1}:\lambda x_{2}].

Line extended by a point at infinity

The projective line may be identified with the line K extended by a point at infinity. More precisely, the line K may be identified with the subset of P1(K) given by

\left\{[x : 1] \in \mathbf P^1(K) \mid x \in K\right\}.

This subset covers all points in P1(K) except one, which is called the point at infinity:

  \infty = [1 : 0].

This allows to extend the arithmetic on K to P1(K) by the formulas

  \frac {1}{0}=\infty,\qquad \frac {1}{\infty}=0,
  x\cdot \infty = \infty \quad \text{if}\quad x\not= 0
x+ \infty = \infty \quad \text{if}\quad x\not= \infty

Translating this arithmetic in term of homogeneous coordinates gives, when [0 : 0] does not occur:

  [x_1 : x_2] + [y_1 : y_2] = [x_1 y_2 + y_1 x_2 : x_2 y_2],
[x_1 : x_2] \cdot [y_1 : y_2] = [x_1 y_1 : x_2 y_2],
  [x_1 : x_2]^{-1} = [x_2 : x_1].

Examples

Real projective line

The projective line over the real numbers is called the real projective line. It may also be thought of as the line K together with an idealised point at infinity ∞ ; the point connects to both ends of K creating a closed loop or topological circle.

An example is obtained by projecting points in R2 onto the unit circle and then identifying diametrically opposite points. In terms of group theory we can take the quotient by the subgroup {1, −1}.

Compare the extended real number line, which distinguishes ∞ and −∞.

Homography

In projective geometry, a homography is an isomorphism of projective spaces, induced by an isomorphism of the vector spaces from which the projective spaces derive.[1] It is a bijection that maps lines to lines, and thus a collineation. In general, some collineations are not homographies, but the fundamental theorem of projective geometry asserts that is not so in the case of real projective spaces of dimension at least two. Synonyms include projectivity, projective transformation, and projective collineation.

Historically, homographies (and projective spaces) have been introduced to study perspective and projections in Euclidean geometry, and the term homography, which, etymologically, roughly means “similar drawing” date from this time. At the end of the 19th century, formal definitions of projective spaces were introduced, which differed from extending Euclidean or affine spaces by adding points at infinity. The term “projective transformation” originated in these abstract constructions. These constructions divide into two classes that have been shown to be equivalent. A projective space may be constructed as the set of the lines of a vector space over a given field (the above definition is based on this version); this construction facilitates the definition of projective coordinates and allows using the tools of linear algebra for the study of homographies. The alternative approach consists in defining the projective space through a set of axioms, which do not involve explicitly any field (incidence geometry, see also synthetic geometry); in this context, collineations are easier to define than homographies, and homographies are defined as specific collineations, thus called “projective collineations”.

For sake of simplicity, unless otherwise stated, the projective spaces considered in this article are supposed to be defined over a (commutative) field. Equivalently Pappus’s hexagon theorem and Desargues’ theorem are supposed to be true. A large part of the results remain true, or may be generalized to projective geometries for which these theorems do not hold.

Geometric motivation

Historically, the concept of homography had been introduced to understand, explain and study visual perspective, and, specifically, the difference in appearance of two plane objects viewed from different points of view.

In the Euclidean space of dimension 3, a central projection from a point O (the center) onto a plane P that does not contain O is the mapping that sends a point A to the intersection (if it exists) of the line OA and the plane P. The projection is not defined if the point A belongs to the plane passing through O and parallel to P. The notion of projective space was originally introduced by extending the Euclidean space, that is, by adding points at infinity to it, in order to define the projection for every point except O.

Given another plane Q, which does not contain O, the restriction to Q of the above projection is called a perspectivity.

With these definitions, a perspectivity is only a partial function, but it becomes a bijection if extended to projective spaces. Therefore, this notion is normally defined for projective spaces. The notion is also easily generalized to projective spaces of any dimension, over any field, in the following way: Given two projective spaces P and Q of dimension n, a perspectivity is a bijection from P to Q that may be obtained by embedding P and Q in a projective space R of dimension n + 1 and restricting to P a central projection onto Q.

If f is a perspectivity from P to Q, and g a perspectivity from Q to P, with a different center, then gf is a homography from P to itself, which is called a central collineation, when the dimension of P is at least two. (see § Central collineation below and Perspectivity § Perspective collineations).

Originally, a homography was defined as the composition of a finite number of perspectivities.[2] It is a part of the fundamental theorem of projective geometry (see below) that this definition coincides with the more algebraic definition sketched in the introduction and detailed below.

 

Points A, B, C, D and A′, B′, C′, D′ are related by a perspectivity, which is a projective transformation.

Perspectivity

In geometry and in its applications to drawing, a perspectivity is the formation of an image in a picture plane of a scene viewed from a fixed point.

Graphics

The science of graphical perspective uses perspectivities to make realistic images in proper proportion. According to Kirsti Andersen, the first author to describe perspectivity was Leon Alberti in his De Pictura (1435).[1] In English, Brook Taylor presented his Linear Perspective in 1715, where he explained “Perspective is the Art of drawing on a Plane the Appearances of any Figures, by the Rules of Geometry”.[2] In a second book, New Principles of Linear Perspective (1719), Taylor wrote

When Lines drawn according to a certain Law from the several Parts of any Figure, cut a Plane, and by that Cutting or Intersection describe a figure on that Plane, that Figure so described is called the Projection of the other Figure. The Lines producing that Projection, taken all together, are called the System of Rays. And when those Rays all pass thro’ one and same Point, they are called the Cone of Rays. And when that Point is consider’d as the Eye of a Spectator, that System of Rays is called the Optic Cone[3]

Projective geometry

In projective geometry the points of a line are called a projective range, and the set of lines in a plane on a point is called a pencil.

Given two lines  \ell and  m in a plane and a point P of that plane on neither line, the bijective mapping between the points of the range of  \ell and the range of  m determined by the lines of the pencil on P is called a perspectivity (or more precisely, a central perspectivity with center P).[4] A special symbol has been used to show that points X and Y are related by a perspectivity;  X \doublebarwedge Y . In this notation, to show that the center of perspectivity is P, write  X \ \overset {P}{\doublebarwedge} \ Y. Using the language of functions, a central perspectivity with center P is a function  f_P \colon [\ell] \mapsto [m] (where the square brackets indicate the projective range of the line) defined by  f_P (X) = Y \text{ whenever } P \in XY.[5] This map is an involution, that is,  f_P (f_P (X)) = X \text{ for all }X \in [\ell].

The existence of a perspectivity means that corresponding points are in perspective. The dual concept, axial perspectivity, is the correspondence between the lines of two pencils determined by a projective range.

Projectivity

The composition of two perspectivities is, in general, not a perspectivity. A perspectivity or a composition of two or more perspectivities is called a projectivity (projective transformation, projective collineation and homography are synonyms).

There are several results concerning projectivities and perspectivities which hold in any pappian projective plane:[6]

Theorem: Any projectivity between two distinct projective ranges can be written as the composition of no more than two perspectivities.

Theorem: Any projectivity from a projective range to itself can be written as the composition of three perspectivities.

Theorem: A projectivity between two distinct projective ranges which fixes a point is a perspectivity.

 

A perspectivity:
ABCD \doublebarwedge A'B'C'D',

 

默想平面國 Flatland 之藝術家會怎麼認識它呢☆

The Real Projective Line

J.C. Álvarez Paiva

In this chapter we study the action of the projective group on the real projective line.

Notes
  • Anything preceded by a * may be left for a second reading.
  • Next to the exercises there is a two-digit number in parentheses which describes its degree of difficulty. The simplest exercises are identified by a (00), while the hardest — those that could take you a week of intensive brain work — are identified by a (50).

 


Juan Carlos Alvarez 2000-10-27

Basic definitions

Definition 1.1   The is the set of all lines in passing through the origin.

Note that if and are two nonzero vectors lying on the same line through the origin, then they are multiples of each other. This remark allows us to redefine as the quotient of by the equivalence relation (or ) if and are multiples of each other.

Exercise 1.6 (00)   Let be the slope of the line passing through the origin and let

be an invertible matrix. Verify that the slope of the line equals .

This exercise tells us that in suitable coordinates projective transformations have the form .

As explained in [2], projective geometry arose from the artists’ needs to represent the three-dimensional world on a two-dimensional canvas. An artist in Flatland just has to worry about representing a two-dimensional world on a one-dimensional canvas. The figure below shows a Flatland artist copying a one-dimensional image onto a canvas. Notice how distances are distorted.

 

 

This type of correspondence between the points in two lines is called a perspective.

 

 

 

 

 

 

 

GoPiGo 小汽車︰格點圖像算術《投影幾何》【三上】

身處將入『人工智慧』之時代,假使不能善用『軟體工具』,豈非落伍?若說非不能也!年少未曾學也!!當思活到老學到老乎??由於這個系列文章將用到

SciPy

NumPy & SymPy

‧ …

尤其是『SymPy』,它們的『安裝』、『說明』與『範例』或不宜多所剪貼,故請舊雨新知參閱相關鍊結以及所屬文本哩。

這裡摘要只為方便讀者回顧『矩陣運算』︰

翻古出新,談談如何用『SymPy』之

Matrices

Matrices (linear algebra)

模組為『工具』,操作

初等矩陣

線性代數中,初等矩陣(又稱為基本矩陣[1])是一個與單位矩陣只有微小區別的矩陣。具體來說,一個n階單位矩陣E經過一次初等行變換或一次初等列變換所得矩陣稱為n階初等矩陣。[2]

操作

初等矩陣分為3種類型,分別對應著3種不同的行/列變換。

兩行(列)互換:
  R_i \leftrightarrow R_j
把某行(列)乘以一非零常數:
kR_i \rightarrow R_i,\ 其中   k \neq 0
把第i行(列)加上第j行(列)的k倍:
R_i + kR_j \rightarrow R_i

初等矩陣即是將上述3種初等變換應用於一單位矩陣的結果。以下只討論對某行的變換,列變換可以類推。

行互換

這一變換Tij,將一單位矩陣的第i行的所有元素與第j行互換。

 T_{i,j} = \begin{bmatrix} 1 & & & & & & & \\ & \ddots & & & & & & \\ & & 0 & & 1 & & \\ & & & \ddots & & & & \\ & & 1 & & 0 & & \\ & & & & & & \ddots & \\ & & & & & & & 1\end{bmatrix}\quad

性質

  • 逆矩陣即自身: T_{ij}^{-1} = T_{ij}
  • 因為單位矩陣的行列式為1,故  |T_{ij}|=-1。與其他相同大小的方陣A亦有一下性質:  |T_{ij}A|=-|A|

把某行乘以一非零常數

這一變換Tim),將第i行的所有元素乘以一非零常數m

 T_i (m) = \begin{bmatrix} 1 & & & & & & \\ & \ddots & & & & & \\ & & 1 & & & & \\ & & & m & & & \\ & & & & 1 & & \\ & & & & & \ddots & \\ & & & & & & 1\end{bmatrix}\quad

性質

  • 逆矩陣為 T_{i}(m)^{-1} = T_{i}(\frac{1}{m})
  • 此矩陣及其逆矩陣均為對角矩陣
  • 其行列式 |T_{i}(m)|=m。故對於一等大方陣A|T_{i}(m)A|=m|A|

把第i行加上第j行的m

這一變換Tijm),將第i行加上第j行的m倍。

 T_{i,j}(m) = \begin{bmatrix} 1 & & & & & & & \\ & \ddots & & & & & & \\ & & 1 & & & & & \\ & & & \ddots & & & & \\ & & m & & 1 & & \\ & & & & & & \ddots & \\ & & & & & & & 1\end{bmatrix}

性質

  • 逆矩陣具有性質  T_{ij}(m)^{-1}=T_{ij}(-m)
  • 此矩陣及其逆矩陣均為三角矩陣
  • |T_{ij}(m)|=1。故對於一等大方陣A有: |T_{ij}(m)A| = |A|

親自『實證』消去法的精神,體驗用『工具』來『學習』之樂趣吧! !

省思這個『初等』當真可『模擬』紙筆運算嗎??

pi@raspberrypi:~ 
*** QuickLaTeX cannot compile formula:
python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11) 
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> from sympy import *
>>> init_printing()
>>> a, b, c, d, e, f, g, h, i, m = symbols('a, b, c, d, e, f, g, h, i, m')
>>> M = Matrix([[a, b, c], [d, e, f], [g, h, i]])
>>> M
⎡a  b  c⎤
⎢       ⎥
⎢d  e  f⎥
⎢       ⎥
⎣g  h  i⎦

>>> 二三列交換 = Matrix([[1, 0, 0], [0, 0, 1], [0, 1, 0]])
>>> 二三列交換
⎡1  0  0⎤
⎢       ⎥
⎢0  0  1⎥
⎢       ⎥
⎣0  1  0⎦
>>> 二三列交換 * M
⎡a  b  c⎤
⎢       ⎥
⎢g  h  i⎥
⎢       ⎥
⎣d  e  f⎦

>>> 第二列乘m = Matrix([[1, 0, 0], [0, m, 0], [0, 0, 1]])
>>> 第二列乘m
⎡1  0  0⎤
⎢       ⎥
⎢0  m  0⎥
⎢       ⎥
⎣0  0  1⎦
>>> 第二列乘m * M
⎡ a    b    c ⎤
⎢             ⎥
⎢d⋅m  e⋅m  f⋅m⎥
⎢             ⎥
⎣ g    h    i ⎦

>>> 第三列加第二列乘m = Matrix([[1, 0, 0], [0, 1, 0], [0, m, 1]])
>>> 第三列加第二列乘m
⎡1  0  0⎤
⎢       ⎥
⎢0  1  0⎥
⎢       ⎥
⎣0  m  1⎦
>>> 第三列加第二列乘m * M
⎡   a        b        c   ⎤
⎢                         ⎥
⎢   d        e        f   ⎥
⎢                         ⎥
⎣d⋅m + g  e⋅m + h  f⋅m + i⎦
>>> 
</pre>
<span style="color: #003300;">或可得『自學』之法哩!!??</span>

─── 摘自《<a href="http://www.freesandal.org/?p=56412">光的世界︰派生科學計算三</a>》

 

<span style="color: #666699;">重溫『仿射變換』︰</span>

<span style="color: #808080;">廬山東林寺<a style="color: #808080;" href="http://www.freesandal.org/?p=2711">三笑庭</a>名聯‧清‧唐蝸寄</span>

<span style="color: #808080;">橋跨虎溪,三教三源流,三人三笑語;</span>
<span style="color: #808080;"> 蓮開僧舍,一花一世界,一葉一如來。</span>

<span style="color: #003300;">曾經三人三笑語,聞得虎嘯,恍然大悟。何故三詠三抒懷︰</span>

<div class="wc-shortcodes-row wc-shortcodes-item wc-shortcodes-clearfix"><div class="wc-shortcodes-column wc-shortcodes-content wc-shortcodes-one-half wc-shortcodes-column-first ">

<span style="color: #808080;"><a style="color: #808080;" href="https://zh.wikisource.org/zh-hant/%E8%A9%A0%E4%BA%8C%E7%96%8F">詠二疏</a>‧陶淵明</span>

<span style="color: #808080;">大象轉四時,功成者自去。</span>
<span style="color: #808080;"> 借問衰周來,幾人得其趣?</span>
<span style="color: #808080;"> 遊目漢廷中,二疏復此舉。</span>
<span style="color: #808080;"> 高嘯返舊居,長揖儲君傅。</span>
<span style="color: #808080;"> 餞送傾皇朝,華軒盈道路。</span>
<span style="color: #808080;"> 離別情所悲,余榮何足顧!</span>
<span style="color: #808080;"> 事勝感行人,賢哉豈常譽?</span>
<span style="color: #808080;"> 厭厭閭裏歡,所營非近務。</span>
<span style="color: #808080;"> 促席延故老,揮觴道平素。</span>
<span style="color: #808080;"> 問金終寄心,清言曉未悟。</span>
<span style="color: #808080;"> 放意樂餘年,遑恤身後慮。</span>
<span style="color: #808080;"> 誰雲其人亡,久而道彌著。</span>

</div><div class="wc-shortcodes-column wc-shortcodes-content wc-shortcodes-one-half wc-shortcodes-column-last ">

<span style="color: #808080;"><a style="color: #808080;" href="https://zh.wikisource.org/zh-hant/%E8%A9%A0%E4%B8%89%E8%89%AF">詠三良</a>‧陶淵明</span>

<span style="color: #808080;">彈冠乘通津,但懼時我遺;</span>
<span style="color: #808080;"> 服勤盡歲月,常恐功愈微。</span>
<span style="color: #808080;"> 忠情謬獲露,遂為君所私。</span>
<span style="color: #808080;"> 出則陪文輿,入必侍丹帷;</span>
<span style="color: #808080;"> 箴規向已從,計議初無虧。</span>
<span style="color: #808080;"> 一朝長逝後,願言同此歸。</span>
<span style="color: #808080;"> 厚恩因難忘,君命安可違?</span>
<span style="color: #808080;"> 臨穴罔惟疑,投義誌攸希。</span>
<span style="color: #808080;"> 荊棘籠高墳,黃鳥聲正悲。</span>
<span style="color: #808080;"> 良人不可贖,泫然沾我衣。</span>

</div></div>

<span style="color: #808080;"><a style="color: #808080;" href="https://zh.wikisource.org/zh-hant/%E8%A9%A0%E8%8D%8A%E8%BB%BB">詠荊軻</a>‧陶淵明</span>

<span style="color: #808080;">燕丹善養士,誌在報強嬴。</span>
<span style="color: #808080;"> 招集百夫良,歲暮得荊卿。</span>
<span style="color: #808080;"> 君子死知己,提劍出燕京;</span>
<span style="color: #808080;"> 素驥鳴廣陌,慷慨送我行。</span>
<span style="color: #808080;"> 雄發指危冠,猛氣衝長纓。</span>
<span style="color: #808080;"> 飲餞易水上,四座列群英。</span>
<span style="color: #808080;"> 漸離擊悲筑,宋意唱高聲。</span>
<span style="color: #808080;"> 蕭蕭哀風逝,淡淡寒波生。</span>
<span style="color: #808080;"> 商音更流涕,羽奏壯士驚。</span>
<span style="color: #808080;"> 心知去不歸,且有後世名。</span>
<span style="color: #808080;"> 登車何時顧,飛蓋入秦庭。</span>
<span style="color: #808080;"> 淩厲越萬裏,逶迤過千城。</span>
<span style="color: #808080;"> 圖窮事自至,豪主正怔營。</span>
<span style="color: #808080;"> 惜哉劍術疏,奇功遂不成!</span>
<span style="color: #808080;"> 其人雖已沒,千載有餘情。</span>

<span style="color: #003300;">晉時<a style="color: #003300;" href="https://zh.wikipedia.org/zh-tw/%E9%99%B6%E6%B8%8A%E6%98%8E">淵明</a>,晉後名潛,已棄五斗米,不知姓字忘其何人,<a style="color: #003300;" href="http://www.freesandal.org/?p=29427">五柳先生</a>『伍』『柳』吟誦耶??果真二三子其志一也!!雖說是移時隔空得失不同,其人其心何其相似乎??!!先生『<a style="color: #003300;" href="http://www.zwbk.org/MyLemmaShow.aspx?zh=zh-tw&lid=78693">菀柳</a>』之『情』仍一樣吧!!??</span>

<span style="color: #808080;">誰雲其人亡,久而道彌著。</span>

<span style="color: #808080;">良人不可贖,泫然沾我衣。</span>

<span style="color: #808080;">其人雖已沒,千載有餘情。</span>

大暑已過,入秋之際,講此『春耕夏耘』之『心法』勒。古今中外『學問』縱有千百種,談起功夫『心法』則一矣。往往其『志一』其『人同』也!!只是『一花』『一葉』真誠對待歟??

<span style="color: #003300;">如果天地公平,天理能隨觀者變乎??故知物理學之所以著意於</span>

<span style="color: #003300;"><a style="color: #003300;" href="https://zh.wikipedia.org/zh-tw/%E4%BB%BF%E5%B0%84%E5%8F%98%E6%8D%A2">仿射變換</a>之<span id=".E6.80.A7.E8.B3.AA" class="mw-headline">性質</span>了!!</span>

<span style="color: #808080;">一仿射變換保留了:</span>
<ol>
 	<li><span style="color: #808080;">點之間的共線性,例如通過同一線之點 (即稱為共線點)在變換後仍呈共線。</span></li>
 	<li><span style="color: #808080;">向量沿著一線的比例,例如對相異共線三點 <img class="mwe-math-fallback-image-inline" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/34ca63f1bf90ff180f60ae1921599052c62afe89" alt="p_{1},\,p_{2},\,p_{3}," width="98" height="19" /> <img class="mwe-math-fallback-image-inline" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/033ae99f7900d8c5bd3459a80f9e7f5f6fb07791" alt="\overrightarrow {p_{1}p_{2}}" width="40" height="30" /> 與 <img class="mwe-math-fallback-image-inline" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a5f97fcb4b346ff107baa509e1aebac328e8bd4b" alt="\overrightarrow {p_{2}p_{3}}" width="42" height="32" />的比例同於 <img class="mwe-math-fallback-image-inline" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a49164cfaadf80350914df400643af54e7bae911" alt="\overrightarrow {f(p_{1})f(p_{2})}" width="96" height="39" />及<span class="mwe-math-mathml-inline mwe-math-mathml-a11y">  </span><img class="mwe-math-fallback-image-inline" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/475803f6b965c1a6cc97f28c43df6a0430d3512c" alt="\overrightarrow {f(p_{2})f(p_{3})}" width="104" height="42" />。</span></li>
 	<li><span style="color: #808080;">帶不同質量的點之<a style="color: #808080;" title="質心" href="https://zh.wikipedia.org/wiki/%E8%B3%AA%E5%BF%83">質心</a>。</span></li>
</ol>
<span style="color: #808080;">一仿射變換為可逆的<a class="mw-redirect" style="color: #808080;" title="若且唯若" href="https://zh.wikipedia.org/wiki/%E8%8B%A5%E4%B8%94%E5%94%AF%E8%8B%A5">若且唯若</a>A為可逆的。在矩陣表示中,其反元素為</span>
<dl>
 	<dd><span style="color: #808080;"><img class="mwe-math-fallback-image-inline" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ddfc76aceafb89584e37d908a18bb693a77e64c7" alt="{\begin{bmatrix}A^{{-1}}&-A^{{-1}}{\vec {b}}\ \\0,\ldots ,0&1\end{bmatrix}}" width="207" height="65" /></span></dd>
</dl>
<span style="color: #808080;">可逆仿射變換組成<a class="new" style="color: #808080;" title="仿射群(頁面不存在)" href="https://zh.wikipedia.org/w/index.php?title=%E4%BB%BF%E5%B0%84%E7%BE%A4&action=edit&redlink=1">仿射群</a>,其中包含具n階的<a class="mw-redirect" style="color: #808080;" title="一般線性群" href="https://zh.wikipedia.org/wiki/%E4%B8%80%E8%88%AC%E7%B7%9A%E6%80%A7%E7%BE%A4">一般線性群</a>為子群,且自身亦為一n+1階的一般線性群之子群。 當A為常數乘以<a style="color: #808080;" title="正交矩陣" href="https://zh.wikipedia.org/wiki/%E6%AD%A3%E4%BA%A4%E7%9F%A9%E9%98%B5">正交矩陣</a>時,此子集合構成一子群,稱之為<a style="color: #808080;" title="相似 (幾何)" href="https://zh.wikipedia.org/wiki/%E7%9B%B8%E4%BC%BC_%28%E5%B9%BE%E4%BD%95%29">相似變換</a>。<span style="color: #ff9900;">舉例而言,假如仿射變換於一平面上且假如A之<a style="color: #ff9900;" title="行列式" href="https://zh.wikipedia.org/wiki/%E8%A1%8C%E5%88%97%E5%BC%8F">行列式</a>為1或-1,那麼該變換即為<a class="new" style="color: #ff9900;" title="等面積變換(頁面不存在)" href="https://zh.wikipedia.org/w/index.php?title=%E7%AD%89%E9%9D%A2%E7%A9%8D%E8%AE%8A%E6%8F%9B&action=edit&redlink=1">等面積變換</a>。此類變換組成一稱為等仿射群的子集。一同時為等面積變換與相似變換之變換,即為一平面上保持<a class="mw-redirect" style="color: #ff9900;" title="歐幾里德距離" href="https://zh.wikipedia.org/wiki/%E6%AC%A7%E5%87%A0%E9%87%8C%E5%BE%B7%E8%B7%9D%E7%A6%BB">歐幾里德距離</a>不變之<a style="color: #ff9900;" title="等距同構" href="https://zh.wikipedia.org/wiki/%E7%AD%89%E8%B7%9D%E5%90%8C%E6%9E%84">保距映射</a>。</span> 這些群都有一保留了原<a style="color: #808080;" title="定向 (向量空間)" href="https://zh.wikipedia.org/wiki/%E5%AE%9A%E5%90%91_%28%E5%90%91%E9%87%8F%E7%A9%BA%E9%96%93%29">定向</a>的子群,也就是其對應之<i>A</i>的行列式大於零。在最後一例中,即為三維中<a class="mw-redirect" style="color: #808080;" title="剛體" href="https://zh.wikipedia.org/wiki/%E5%89%9B%E9%AB%94">剛體</a>運動之群(旋轉加平移)。 假如有一不動點,我們可以將其當成原點,則仿射變換被縮還到一線性變換。這使得變換更易於分類與理解。舉例而言,將一變換敘述為特定軸的旋轉,相較於將其形容為平移與旋轉的結合,更能提供變換行為清楚的解釋。只是,這取決於應用與內容。</span>

<span style="color: #003300;">若知『平移』與『旋轉』為『保距映射』,餘理可知矣︰</span>

<span style="color: #808080;">※矩陣乘法不具『交換性』,正是『平移』後『旋轉』往往不等於『旋轉』再『平移』也。</span>
<pre class="lang:python decode:true ">pi@raspberrypi:~

*** Error message:
Missing $ inserted.
Missing $ inserted.
leading text: >>> init_
Unicode character ⎡ (U+23A1)
leading text: ⎡
Unicode character ⎤ (U+23A4)
leading text: ⎡a  b  c⎤
Unicode character ⎢ (U+23A2)
leading text: ⎢
Unicode character ⎥ (U+23A5)
leading text: ⎢       ⎥
Unicode character ⎢ (U+23A2)
leading text: ⎢
Unicode character ⎥ (U+23A5)
leading text: ⎢d  e  f⎥
Unicode character ⎢ (U+23A2)
leading text: ⎢
Unicode character ⎥ (U+23A5)
leading text: ⎢       ⎥
Unicode character ⎣ (U+23A3)
leading text: ⎣
Unicode character ⎦ (U+23A6)
leading text: ⎣g  h  i⎦
Missing $ inserted.
Unicode character 二 (U+4E8C)
leading text: >>> 二
Unicode character 三 (U+4E09)
leading text: >>> 二三
Unicode character 列 (U+5217)

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]: init_printing()

In [3]: xα, yα, xβ, yβ, Tx, Ty, θ = symbols('xα, yα, xβ, yβ, Tx, Ty, θ')

In [4]: T = Matrix([[1, 0, Tx], [0, 1, Ty], [0, 0, 1]])

In [5]: T
Out[5]:
⎡1 0 Tx⎤
⎢ ⎥
⎢0 1 Ty⎥
⎢ ⎥
⎣0 0 1 ⎦

In [6]: T.det()
Out[6]: 1

In [7]: R = Matrix([[cos(θ), sin(θ), 0], [-sin(θ), cos(θ), 0], [0, 0, 1]])

In [8]: R
Out[8]:
⎡cos(θ) sin(θ) 0⎤
⎢ ⎥
⎢-sin(θ) cos(θ) 0⎥
⎢ ⎥
⎣ 0 0 1⎦

In [9]: R.det()
Out[9]:
2 2
sin (θ) + cos (θ)

In [10]: R.det().simplify()
Out[10]: 1

In [11]: α平移 = T * Matrix([xα, yα, 1])

In [12]: α平移
Out[12]:
⎡Tx + xα⎤
⎢ ⎥
⎢Ty + yα⎥
⎢ ⎥
⎣ 1 ⎦

In [13]: β平移 = T * Matrix([xβ, yβ, 1])

In [14]: β平移
Out[14]:
⎡Tx + xβ⎤
⎢ ⎥
⎢Ty + yβ⎥
⎢ ⎥
⎣ 1 ⎦

In [15]: αβ平移距離 = (α平移[0] - β平移[0])** 2 + (α平移[1] - β平移[1])** 2

In [16]: αβ平移距離
Out[16]:
2 2
(xα - xβ) + (yα - yβ)

In [17]: α旋轉 = R * Matrix([xα, yα, 1])

In [18]: α旋轉
Out[18]:
⎡xα⋅cos(θ) + yα⋅sin(θ) ⎤
⎢ ⎥
⎢-xα⋅sin(θ) + yα⋅cos(θ)⎥
⎢ ⎥
⎣ 1 ⎦

In [19]: β旋轉 = R * Matrix([xβ, yβ, 1])

In [20]: β旋轉
Out[20]:
⎡xβ⋅cos(θ) + yβ⋅sin(θ) ⎤
⎢ ⎥
⎢-xβ⋅sin(θ) + yβ⋅cos(θ)⎥
⎢ ⎥
⎣ 1 ⎦

In [21]: αβ旋轉距離 = (α旋轉[0] - β旋轉[0])** 2 + (α旋轉[1] - β旋轉[1])** 2

In [22]: αβ旋轉距離
Out[22]:
2
(-xα⋅sin(θ) + xβ⋅sin(θ) + yα⋅cos(θ) - yβ⋅cos(θ)) + (xα⋅cos(θ) - xβ⋅cos(θ) + y

2
α⋅sin(θ) - yβ⋅sin(θ))

In [23]: αβ旋轉距離.expand().simplify()
Out[23]:
2 2 2 2
xα - 2⋅xα⋅xβ + xβ + yα - 2⋅yα⋅yβ + yβ

In [24]: R*T
Out[24]:
⎡cos(θ) sin(θ) Tx⋅cos(θ) + Ty⋅sin(θ) ⎤
⎢ ⎥
⎢-sin(θ) cos(θ) -Tx⋅sin(θ) + Ty⋅cos(θ)⎥
⎢ ⎥
⎣ 0 0 1 ⎦

In [25]: T*R
Out[25]:
⎡cos(θ) sin(θ) Tx⎤
⎢ ⎥
⎢-sin(θ) cos(θ) Ty⎥
⎢ ⎥
⎣ 0 0 1 ⎦

In [26]:

─── 摘自《光的世界︰派生科學計算六‧下

 

特別點出

{\vec{r}}^{'}_H = {(x^{'},y^{'},1)}^{transpose} = T*R \ {\vec{r}}_H = T*R \ {(x, y, 1)}^{transpose}

Representation

As shown above, an affine map is the composition of two functions: a translation and a linear map. Ordinary vector algebra uses matrix multiplication to represent linear maps, and vector addition to represent translations. Formally, in the finite-dimensional case, if the linear map is represented as a multiplication by a matrix  A and the translation as the addition of a vector  {\vec {b}}, an affine map  f acting on a vector  {\vec {x}} can be represented as

  {\vec {y}}=f({\vec {x}})=A{\vec {x}}+{\vec {b}}.

Augmented matrix

Using an augmented matrix and an augmented vector, it is possible to represent both the translation and the linear map using a single matrix multiplication. The technique requires that all vectors are augmented with a “1” at the end, and all matrices are augmented with an extra row of zeros at the bottom, an extra column—the translation vector—to the right, and a “1” in the lower right corner. If  A is a matrix,

{\begin{bmatrix}{\vec {y}}\\1\end{bmatrix}}=\left[{\begin{array}{ccc|c}\,&A&&{\vec {b}}\ \\0&\ldots &0&1\end{array}}\right]{\begin{bmatrix}{\vec {x}}\\1\end{bmatrix}}

is equivalent to the following

{\vec {y}}=A{\vec {x}}+{\vec {b}}.

The above-mentioned augmented matrix is called an affine transformation matrix, or projective transformation matrix (as it can also be used to perform projective transformations).

This representation exhibits the set of all invertible affine transformations as the semidirect product of  K^{n} and  {\displaystyle GL(n,K)}. This is a group under the operation of composition of functions, called the affine group.

Ordinary matrix-vector multiplication always maps the origin to the origin, and could therefore never represent a translation, in which the origin must necessarily be mapped to some other point. By appending the additional coordinate “1” to every vector, one essentially considers the space to be mapped as a subset of a space with an additional dimension. In that space, the original space occupies the subset in which the additional coordinate is 1. Thus the origin of the original space can be found at  {\displaystyle (0,0,\dotsc ,0,1)}. A translation within the original space by means of a linear transformation of the higher-dimensional space is then possible (specifically, a shear transformation). The coordinates in the higher-dimensional space are an example of homogeneous coordinates. If the original space is Euclidean, the higher dimensional space is a real projective space.

The advantage of using homogeneous coordinates is that one can combine any number of affine transformations into one by multiplying the respective matrices. This property is used extensively in computer graphics, computer vision and robotics.

 

揣想『齊次座標系』擴充後之『加‧乘』『次序』吧◎

畢竟『理解』的目前是『人』耶◎

 

 

 

 

 

 

 

 

 

GoPiGo 小汽車︰格點圖像算術《投影幾何》【二】

靜思『歐式幾何』︰

歐式幾何裡並無『座標系』之概念,而是以『全等』關係︰

Congruence (geometry)

In geometry, two figures or objects are congruent if they have the same shape and size, or if one has the same shape and size as the mirror image of the other.[1]

More formally, two sets of points are called congruent if, and only if, one can be transformed into the other by an isometry, i.e., a combination of rigid motions, namely a translation, a rotation, and a reflection. This means that either object can be repositioned and reflected (but not resized) so as to coincide precisely with the other object. So two distinct plane figures on a piece of paper are congruent if we can cut them out and then match them up completely. Turning the paper over is permitted.

In elementary geometry the word congruent is often used as follows.[2] The word equal is often used in place of congruent for these objects.

  • Two line segments are congruent if they have the same length.
  • Two angles are congruent if they have the same measure.
  • Two circles are congruent if they have the same diameter.

In this sense, two plane figures are congruent implies that their corresponding characteristics are “congruent” or “equal” including not just their corresponding sides and angles, but also their corresponding diagonals, perimeters and areas.

The related concept of similarity applies if the objects differ in size but not in shape.

Congruent_non-congruent_triangles.svg

An example of congruence. The two triangles on the left are congruent, while the third is similar to them. The last triangle is neither similar nor congruent to any of the others. Note that congruence permits alteration of some properties, such as location and orientation, but leaves others unchanged, like distance and angles. The unchanged properties are called invariants.

研究各類圖形具有種種性質之『不變性』。

─── 摘自《光的世界︰派生科學計算六‧中

 

和『座標幾何』︰

若問為什麼平面上的一個一般三角形可以如下圖表示

三角形重心

, 只用著 a \ , b \  , \ c 三個參數?即使在思考過 a 是『底』之『長』, c 是此『底』之『高』, b 是此『高』距與此『底』一端的距離。我們深信這就『確定』了那個三角形。然而若再問︰如果此三角形的三個頂點用更一般的 A \ (x_0, y_0)  、 B \ (x_1,y_1)C \ (x_2,y_2) 來表達 ,如是分明有六個參數。那麼這兩種『表述』當真是一樣的嗎?設想你在桌面上『移動』一個三角形,從此『位置』此『方位』到達彼『位置』彼『方位』,你會認 為這個三角形『改變』了嗎??假使『直覺』以為『不變』,這個三角形就必得有使之『不變』的『因由』,這個『因由』不必『參照』解析幾何的『座標』而確立 。或可說它就是歐式幾何一個三角形的『定義』內涵而已。如此而言,一個『確定』的三角形,可由它的三個『邊長』來『確立』,所以六個參數補之以三個確定之 邊長關係,豈非還是三個參數的耶??

因為這個『歐式幾何』的『留白』,常使人懷疑『解析幾何』簡化『座標系』的『選擇』,到底『圖形』的『自由度』是幾何的了。說難道易,就請讀者思索︰平面上的『 □ 』與『 ○ 』,到底一方一圓需要幾個參數來描述的呢?

─── 摘自《勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 PD‧箱子世界‧留白

 

的『顯著差異』,將可默想『齊次座標』之『旨趣留白』乎?!

 

如果依據伽利略『相對性』原理之視角,那麼物理性質也不該因為『觀察者』或『座標系』之不同而有所改變??因是古典力學就得符合『伽利略變換』矣!!

Galilean transformation

In physics, a Galilean transformation is used to transform between the coordinates of two reference frames which differ only by constant relative motion within the constructs of Newtonian physics. These transformations together with spatial rotations and translations in space and time form the inhomogeneous Galilean group (assumed throughout below). Without the translations in space and time the group is the homogeneous Galilean group. The Galilean group is the group of motions of Galilean relativity action on the four dimensions of space and time, forming the Galilean geometry. This is the passive transformation point of view. The equations below, although apparently obvious, are valid only at speeds much less than the speed of light. In special relativity the Galilean transformations are replaced by Poincaré transformations; conversely, the group contraction in the classical limit c → ∞ of Poincaré transformations yields Galilean transformations.

Galileo formulated these concepts in his description of uniform motion.[1] The topic was motivated by his description of the motion of a ball rolling down a ramp, by which he measured the numerical value for the acceleration of gravity near the surface of the Earth.

300px-Standard_conf

Standard configuration of coordinate systems for Galilean transformations.

 

只是通常各自有『原點』的『座標系』並不方便以『矩陣』來表達『時空』之『等距同構

Isometry

In mathematics, an isometry (or congruence, or congruent transformation) is a distance-preserving injective map between metric spaces.[1]

Introduction

Given a metric space (loosely, a set and a scheme for assigning distances between elements of the set), an isometry is a transformation which maps elements to the same or another metric space such that the distance between the image elements in the new metric space is equal to the distance between the elements in the original metric space. In a two-dimensional or three-dimensional Euclidean space, two geometric figures are congruent if they are related by an isometry;[3] the isometry that relates them is either a rigid motion (translation or rotation), or a composition of a rigid motion and a reflection.

Isometries are often used in constructions where one space is embedded in another space. For instance, the completion of a metric space M involves an isometry from M into M’, a quotient set of the space of Cauchy sequences on M. The original space M is thus isometrically isomorphic to a subspace of a complete metric space, and it is usually identified with this subspace. Other embedding constructions show that every metric space is isometrically isomorphic to a closed subset of some normed vector space and that every complete metric space is isometrically isomorphic to a closed subset of some Banach space.

An isometric surjective linear operator on a Hilbert space is called a unitary operator.

Academ_Reflections_with_parallel_axis_on_wallpaper.svg

A composition of two opposite isometries is a direct isometry. A reflection in a line is an opposite isometry, like R 1 or R 2 on the image. Translation T is a direct isometry: a rigid motion.[2]

的變換性質,因此借著

齊次坐標

數學裡,齊次坐標(homogeneous coordinates),或投影坐標(projective coordinates)是指一個用於投影幾何裡的坐標系統,如同用於歐氏幾何裡的笛卡兒坐標一般。該詞由奧古斯特·費迪南德·莫比烏斯於1827年在其著作《Der barycentrische Calcul》一書內引入[1][2]。齊次坐標可讓包括無窮遠點的點坐標以有限坐標表示。使用齊次坐標的公式通常會比用笛卡兒坐標表示更為簡單,且更為對稱 。齊次坐標有著廣泛的應用,包括電腦圖形及3D電腦視覺。使用齊次坐標可讓電腦進行仿射變換,並通常,其投影變換能簡單地使用矩陣來表示。

如一個點的齊次坐標乘上一個非零純量,則所得之坐標會表示同一個點。因為齊次坐標也用來表示無窮遠點,為此一擴展而需用來標示坐標之數值比投影空間之維度多一。例如,在齊次坐標裡,需要兩個值來表示在投影線上的一點,需要三個值來表示投影平面上的一點。

600px-RationalBezier2D.svg

有理貝茲曲線-定義於齊次坐標內的多項式曲線(藍色),以及於平面上的投影-有理曲線(紅色)

來統整論述也就自然而然的了??!!更別說由於雙眼之視覺現象還得走入『仿射變換』的哩!!??

2D_affine_transformation_matrix.svg