STEM 隨筆︰古典力學︰模擬術【可視化】 A

絕句‧杜甫

兩個黄鸝鳴翠柳,
一行白鷺上青天。
窗含西嶺千秋雪,
門泊東吳萬里船。

詩聖杜甫七言絕句有四首

堂西長筍别開門,塹北行椒卻背村。
梅熟許同朱老吃,松高擬對阮生論。

欲作魚梁雲複湍,因驚四月雨聲寒。
青溪先有蛟龍窟,竹石如山不敢安。

兩個黄鸝鳴翠柳,一行白鷺上青天。
窗含西嶺千秋雪,門泊東吳萬里船。

藥條藥甲潤青青,色過棕亭入草亭。
苗滿空山慚取譽,根居隙地怯成形。

,何必特舉其三說?難悟實相金剛義!娑婆世界有情多,純量造化色菩提☆★

……

不空強空成頑空,空空不空有時盡,

一念大悲觀自在,人間哪處非紅塵!!??

─── 《GOPIGO 小汽車︰格點圖像算術《彩色世界》詩說

 

也曾因著所謂『一圖勝千言』,

樂觀的想,視覺闡釋周遭環境,潛意識補足推理所需,

Visual perception is the ability to interpret the surrounding environment by processing information that is contained in visible light. The resulting perception is also known as eyesight, sight, or vision (adjectival form: visual, optical, or ocular). The various physiological components involved in vision are referred to collectively as the visual system, and are the focus of much research in psychology, cognitive science, neuroscience, and molecular biology, collectively referred to as vision science.

Leonardo da Vinci (1452–1519) is believed to be the first to recognize the special optical qualities of the eye. He wrote “The function of the human eye … was described by a large number of authors in a certain way. But I found it to be completely different.” His main experimental finding was that there is only a distinct and clear vision at the line of sight—the optical line that ends at the fovea. Although he did not use these words literally he actually is the father of the modern distinction between foveal and peripheral vision.[citation needed]

220px-Eye_Line_of_sight

Leonardo da Vinci: The eye has a central line and everything that reaches the eye through this central line can be seen distinctly.

Fovea centralis

The fovea centralis (the term fovea comes from the Latin, meaning pit or pitfall) is a small, central pit composed of closely packed cones in the eye. It is located in the center of the macula lutea of the retina.[1][2]

The fovea is responsible for sharp central vision (also called foveal vision), which is necessary in humans for activities where visual detail is of primary importance, such as reading and driving. The fovea is surrounded by the parafovea belt, and the perifovea outer region.[2] The parafovea is the intermediate belt, where the ganglion cell layer is composed of more than five rows of cells, as well as the highest density of cones; the perifovea is the outermost region where the ganglion cell layer contains two to four rows of cells, and is where visual acuity is below the optimum. The perifovea contains an even more diminished density of cones, having 12 per 100 micrometres versus 50 per 100 micrometres in the most central fovea. This, in turn, is surrounded by a larger peripheral area that delivers highly compressed information of low resolution following the pattern of compression in foveated imaging.

Approximately half of the nerve fibers in the optic nerve carry information from the fovea, while the remaining half carry information from the rest of the retina. The parafovea extends to a radius of 1.25 mm from the central fovea, and the perifovea is found at a 2.75 mm radius from the fovea centralis.[3]

Schematic_diagram_of_the_human_eye_en.svg

Schematic diagram of the human eye, with the fovea at the bottom. It shows a horizontal section through the right eye.

Unconscious inference

Main article: Unconscious inference

Hermann von Helmholtz is often credited with the first study of visual perception in modern times. Helmholtz examined the human eye and concluded that it was, optically, rather poor. The poor-quality information gathered via the eye seemed to him to make vision impossible. He therefore concluded that vision could only be the result of some form of unconscious inferences: a matter of making assumptions and conclusions from incomplete data, based on previous experiences.[citation needed]

Inference requires prior experience of the world.

Examples of well-known assumptions, based on visual experience, are:

  • light comes from above
  • objects are normally not viewed from below
  • faces are seen (and recognized) upright.[6]
  • closer objects can block the view of more distant objects, but not vice versa
  • figures (i.e., foreground objects) tend to have convex borders

The study of visual illusions (cases when the inference process goes wrong) has yielded much insight into what sort of assumptions the visual system makes.

Another type of the unconscious inference hypothesis (based on probabilities) has recently been revived in so-called Bayesian studies of visual perception.[7] Proponents of this approach consider that the visual system performs some form of Bayesian inference to derive a perception from sensory data. Models based on this idea have been used to describe various visual perceptual functions, such as the perception of motion, the perception of depth, and figure-ground perception.[8][9] The “wholly empirical theory of perception” is a related and newer approach that rationalizes visual perception without explicitly invoking Bayesian formalisms.

Gestalt theory

Main article: Gestalt psychology

Gestalt psychologists working primarily in the 1930s and 1940s raised many of the research questions that are studied by vision scientists today.

The Gestalt Laws of Organization have guided the study of how people perceive visual components as organized patterns or wholes, instead of many different parts. “Gestalt” is a German word that partially translates to “configuration or pattern” along with “whole or emergent structure”. According to this theory, there are eight main factors that determine how the visual system automatically groups elements into patterns: Proximity, Similarity, Closure, Symmetry, Common Fate (i.e. common motion), Continuity as well as Good Gestalt (pattern that is regular, simple, and orderly) and Past Experience.

 

,恰是『視覺』『直覺』之『完備』與『不足』的乎??!!

格式塔學派德語Gestalttheorie)是心理學重要流派之一,興起於20世紀初的德國,又稱為完形心理學[1]。由馬科斯·韋特墨(1880-1943)、沃爾夫岡·苛勒(1887-1967)和科特·考夫卡(1886-1941)三位德國心理學家在研究似動現象的基礎上創立。格式塔是德文Gestalt的譯音,意即「模式、形狀、形式」等,意思是指「動態的整體(dynamic wholes)」。

格式塔學派主張人腦的運作原理是整體的,「整體不同於其部件的總和」。例如,我們對一朵花的感知,並非純粹單單從對花的形狀 、顏色、大小等感官資訊而來,還包括我們對花過去的經驗和印象 ,加起來才是我們對一朵花的感知[2]

260px-Reification

 

 

260px-Multistability.svg

 

 

 

260px-Invariance

具體化

具體化(Reification)是知覺的「建設性」的或「生成性的」方面,這種知覺經驗,比起其所基於的感覺刺激,包括了更多外在的空間信息。例如,圖形A可以被知覺為三角形,儘管在事實上並未畫三角形。圖形C可以被視為三維球體,事實上也沒有畫三維球體。

組織性

「組織性」(Multistability或「組織性知覺」multistable perception)是趨勢模糊知覺經驗,不穩定地在兩個或兩個以上不同解釋之間往返。例如左圖所示「內克爾立方體」和「魯賓圖/花瓶幻覺」。

恆常性

恆常性(Invariance) 知覺認可的簡單幾何組件,形成獨立的旋轉,平移、大小以及其他一些變化(如彈性變形,不同的燈光和不同的組件功能)。例如圖例’A’在圖中都立即確認為相 同的基本形式,立即有別於’B’的形式。在彈性變形的’C’,描繪時使用不同的圖形元素,如’D’類。 產生「具體化」、「多重穩定性」、「不變性」和「不可分模塊單獨進行建模」,它們是不同方面的統一機制。

 

一朵活生生之『玫瑰花』是一『整體』,一枝已離株的『玫瑰花』難免凋零。不知誰說︰就算將之『解析』為根、莖、葉、…… 終究沒了『生命』★不過假使不『解析』,它果能活的長久嗎☆

─── 摘自《光的世界︰幾何光學七

 

為何今日臨文

viz

Introduction

The viz package in pydy is designed to facilitate browser based animations for PyDy framework.

Typically the plugin is used to generate animations for multibody systems. The systems are defined with sympy.physics.mechanics, solved numerically with the codegen package and scipy, and then visualized with this package. But the required data for the animations can theorectically be generated by other methods and passed into a Scene object.

The frontend is based on three.js, a popular interface to the WebGraphics Library (WegGL). The package provides a Python wrapper for some basic functionality for Three.js i.e Geometries, Lights, Cameras etc.

 

心遲疑呢?或許等待樹莓派 之 vc4/drm 

OpenGL performance reduced on Raspbian Stretch #79

XECDesign commented on Sep 4

After a bit of testing, it does look like this is an issue which affects software OpenGL rendering in general, not just glxgears. However, the change of behaviour comes from upstream Debian packages and software opengl rendering is not something we’ve ever touched or claimed to support. I would recommend enabling vc4 fkms in raspi-config for proper OpenGL support.

 

證之,果然矣︰

pi@raspberrypi:~ glxinfo | grep -i opengl libGL error: failed to authenticate magic 3 libGL error: failed to load driver: i965 OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits) OpenGL core profile version string: 3.3 (Core Profile) Mesa 13.0.6 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.0 Mesa 13.0.6 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 13.0.6 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions: pi@raspberrypi:~

 

然而目前樹莓派 G1 GL

 

還很挑 HDMI 顯示器才開機哩!故置疑焉?

─ 摘自《【鼎革‧革鼎】︰ RASPBIAN STRETCH 《六之 D 》

 

實用化已太久矣!

既然仍需測試,又將進入 4K/5G 的時代,何不直指 Raspberry-Pi 最新的 3B+ 乎?

pi@raspberrypi:~ cat /proc/version  Linux version 4.14.34-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1110 SMP Mon Apr 16 15:18:51 BST 2018  pi@raspberrypi:~ cat /proc/cpuinfo 
processor	: 0
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 89.60
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 1
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 89.60
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 2
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 89.60
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 3
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 89.60
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

Hardware	: BCM2835
Revision	: a020d3
Serial		: 00000000e08b738d
pi@raspberrypi:~ </pre>    <span style="color: #666699;">幸而藉著修改</span>  <span style="color: #ff9900;">去掉 --disable-gpu-compositing ︰</span> <pre class="lang:default decode:true">pi@raspberrypi:~ more /etc/chromium-browser/customizations/00-rpi-vars 
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --disable-quic --enable-tcp-fast-open --disabl
e-gpu-compositing --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer
.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version="

 

第一步成功的哩!◎

https://get.webgl.org/