樹莓派 0W 狂想曲︰ 不大聲以色《♪♪♪》

時有所變,境隨之遷,自然徑改路移。

回首來時路

Adafruit PiTFT 3.5″ Touch Screen for Raspberry Pi

Easy Install

The PiTFT requires kernel support and a couple other things to make it a nice stand-alone display. We have a detailed step-by-step setup for hackers who want to tweak, customize or understand the PiTFT setup. If you just want to get going, check out the following for easy-install instructions!

Ready to go image

f you want to start with a fresh image, we have two for Raspbian.  There’s the larger ‘classic Jessie’ image that will boot into X by default, and requires a 8G image, it has a lot more software installed. There’s also the smaller ‘Jessie Lite’ that will boot into the command line, and can be burned onto a 2G card! Click below to download and install into a new SD card. Unzip and follow the classic SD card burning tutorials

已經足夠新的呀!

pi@raspberrypi:~ cat /proc/version  Linux version 4.4.27-v7+ (root@vagrant-ubuntu-trusty-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #2 SMP Wed Oct 26 19:09:12 UTC 2016  pi@raspberrypi:~ cd /usr/share/X11/xorg.conf.d/
pi@raspberrypi:/usr/share/X11/xorg.conf.d ls 10-evdev.conf  10-quirks.conf  50-synaptics.conf pi@raspberrypi:/usr/share/X11/xorg.conf.d

 

奈何一升級 upgrade ,觸控螢幕無法用耶★

考之再三,長話短說,原來樹莓派 PIXEL 桌面環境,開始使用『libinput』

 

libinput

libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.

This wiki page provides only basic information, more documentation about libinput is available in the API documentation.

 

管理『輸入裝置』哩!

略為詳細介紹或可參考

libinput

From the libinput wiki page:

libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.

The X.Org input driver supports most regular Xorg#Input devices. Particularly notable is the project’s goal to provide advanced support for touch (multitouch and gesture) features of touchpads and touchscreens. See the project documentation for more information.

 

它的『優先權』 40-libinput.conf 壓過舊有『evdev』 10-evdev.conf ,將之移往 80-evdev.conf ,重奪主導權也︰

pi@raspberrypi:~ cat /proc/version  Linux version 4.4.27-v7+ (root@vagrant-ubuntu-trusty-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #2 SMP Wed Oct 26 19:09:12 UTC 2016  pi@raspberrypi:~ cd /usr/share/X11/xorg.conf.d/
pi@raspberrypi:/usr/share/X11/xorg.conf.d ls 10-quirks.conf  40-libinput.conf  70-synaptics.conf  80-evdev.conf pi@raspberrypi:/usr/share/X11/xorg.conf.d cd

pi@raspberrypi:~ libinput-list-devices  Device:           stmpe-ts Kernel:           /dev/input/event2 Group:            1 Seat:             seat0, default Capabilities:     touch  Tap-to-click:     n/a Tap-and-drag:     n/a Tap drag lock:    n/a Left-handed:      n/a Nat.scrolling:    n/a Middle emulation: n/a Calibration:      identity matrix Scroll methods:   none Click methods:    none Disable-w-typing: n/a Accel profiles:   n/a Rotation:         n/a   pi@raspberrypi:~ evtest 
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:	Logitech USB Receiver
/dev/input/event1:	Logitech USB Receiver
/dev/input/event2:	stmpe-ts
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "stmpe-ts"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   1098
      Min        0
      Max     4095
    Event code 1 (ABS_Y)
      Value   1295
      Min        0
      Max     4095
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max      255
Properties:
Testing ... (interrupt to exit)
Event: time 1494840049.174094, type 3 (EV_ABS), code 0 (ABS_X), value 1523
Event: time 1494840049.174094, type 3 (EV_ABS), code 1 (ABS_Y), value 2971
Event: time 1494840049.174094, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 88
Event: time 1494840049.174094, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1494840049.174094, -------------- EV_SYN ------------
Event: time 1494840049.180995, type 3 (EV_ABS), code 0 (ABS_X), value 1479
Event: time 1494840049.180995, type 3 (EV_ABS), code 1 (ABS_Y), value 2918
Event: time 1494840049.180995, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 75
Event: time 1494840049.180995, -------------- EV_SYN ------------
Event: time 1494840049.188005, type 3 (EV_ABS), code 0 (ABS_X), value 1548
Event: time 1494840049.188005, type 3 (EV_ABS), code 1 (ABS_Y), value 2849
Event: time 1494840049.188005, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 124
Event: time 1494840049.188005, -------------- EV_SYN ------------
Event: time 1494840049.194911, type 3 (EV_ABS), code 0 (ABS_X), value 1562
Event: time 1494840049.194911, type 3 (EV_ABS), code 1 (ABS_Y), value 2856
Event: time 1494840049.194911, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 114
Event: time 1494840049.194911, -------------- EV_SYN ------------
Event: time 1494840049.201876, type 3 (EV_ABS), code 0 (ABS_X), value 1568
Event: time 1494840049.201876, type 3 (EV_ABS), code 1 (ABS_Y), value 2846
Event: time 1494840049.201876, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 113
Event: time 1494840049.201876, -------------- EV_SYN ------------
Event: time 1494840049.208820, type 3 (EV_ABS), code 0 (ABS_X), value 1547
Event: time 1494840049.208820, type 3 (EV_ABS), code 1 (ABS_Y), value 2851
Event: time 1494840049.208820, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 99
Event: time 1494840049.208820, -------------- EV_SYN ------------
Event: time 1494840049.225197, type 3 (EV_ABS), code 0 (ABS_X), value 1470
Event: time 1494840049.225197, type 3 (EV_ABS), code 1 (ABS_Y), value 2904
Event: time 1494840049.225197, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 79
Event: time 1494840049.225197, -------------- EV_SYN ------------
Event: time 1494840049.307917, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1494840049.307917, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1494840049.307917, -------------- EV_SYN ------------

 

 

若問為何不直接用『libinput』設定乎??蓋因它以『仿射矩陣』

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

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

 

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

 

作變換也,正在查找閱讀啊☆

ubuntu wiki

Input Coordinate Transformation

Introduction

 

Recent X.org servers have incorporated a property for setting how input device events are translated to screen coordinates. This property can be used to ensure a touchscreen is not stretched across a multi-monitor setup or to rotate the touch screen input when you rotate the physical device.