冬至

冬至

冬至,十一月中。終藏之氣至此而極也。 蚯蚓結。六陰寒極之時,蚯蚓交相結而如繩也。 麋角解。說見鹿角解下。 水泉動。水者,天一之陽所生,陽生而動,今一陽初生故云耳。

 

1280px-hk_lee_chun_food_seesame_tong_yuen_glutinous_rice_ball_8

 

 

 

 

 

 

 

 

 

L4K ︰小海龜繪圖《IV》

我們已經知道小海龜的狀態︰

S = [\vec{r} = (xcor , ycor) , \vec{\theta}] = [\vec{r} , \vec{\theta}]

以及用來改變狀態的指令︰

forward \vec{l} ,平移,記作 {\hat{T}}_{\vec{l}}

right \theta ,旋轉,記作 {\hat{R}}_{\theta}

left \theta = right {360}^{\circ} -\theta

back \vec{l} = forward - \vec{l}

 

或可援引物理學的

算符

物理學裏,算符(operator),又稱算子,作用於物理系統的狀態空間,使得物理系統從某種狀態變換為另外一種狀態。這變換可能相當複雜,需要用很多方程式來表明,假若能夠使用算符來代表 ,可以更為簡單扼要地表達論述。

對於很多案例,假若作用的對象有所迥異,算符的物理行為也會不同;但是,對於有些案例,算符的物理行為具有一般性,這時,就可以將論題抽象化,專注於研究算符的物理行為,不必顧慮到狀態的獨特性。這方法比較適用於一些像對稱性守恆定律的論題。因此,在經典力學裏,算符是很有用的工具。在量子力學裏,算符為理論表述不可或缺的要素。

對於更深奧的理論研究,可能會遇到很艱難的數學問題,算符理論(operator theory)能夠提供高功能的架構,使得數學推導更為簡潔精緻、易讀易懂,更能展現出內中物理涵意。

一般而言,在經典力學裏的算符大多作用於函數,這些函數的參數為各種各樣的物理量,算符將某函數映射為另一種函數。這種算符稱為「函數算符」。在量子力學裏的算符稱為「量子算符」,作用的對象是量子態。量子算符將某量子態映射為另一種量子態。

 

表示法,簡明描述小海龜之狀態變化與在平面上形成的軌跡。

如果用 {\hat{O}}_k 表示『平移』 {\hat{T}}_{\vec{l}} 或『旋轉』 {\hat{R}}_{\theta} 的算子,那麼小海龜之『行為程式』就可表為 \hat{O} = {\hat{O}}_n , \cdots , {\hat{O}}_2, {\hat{O}}_1 作用於『初始態』 S 。此處我們先看看一種有趣的情況︰

\hat{O} \cdot S = S

,『終止態』 \hat{O} \cdot S 等於『初始態』 S。這意味著

{\vec{l}}_n + \cdots + {\vec{l}}_2 + {\vec{l}}_1 = \vec{0}

{\theta}_n + \cdots +{\theta}_2 + {\theta}_1 = {360}^{\circ} \times integer

假使以邊長為 l 的『正 n 邊形』為例,藉著『向前』‧『轉向』

{\hat{O}}_k = {\hat{R}}_{\frac{{360}^{\circ}}{n}} \cdot {\hat{T}}_{\vec{l}

n 次,小海龜畫好此『正 n 邊形』,回到『原狀態』也。

如是當可知道『簡單重複』

repeat 『重複』□□ 動作,○○ 次。

 

實奧妙無比耶☆

turtle-art-ycor-holds-current-y-coordinate-value-of-the-turtle-can-be-used-in-place-of-a-number-block

 

也可揣想要是沒有『重複』 repeat 指令,果需人為『重複』

code-block

turtle-art-number-used-as-numeric-input-in-mathematic-operators

 

 

,寫程式當真苦差事乎★

turtle-art-xcor-holds-current-x-coordinate-value-of-the-turtle-can-be-used-in-place-of-a-number-block

 

 

 

 

 

 

 

 

 

 

L4K ︰小海龜繪圖《III》

小海龜之『狀態』 state 可由『位置』 position (xcor , ycor) 以及它的『朝向』 heading \vec{\theta} 角度所確定。在 Turtle Art 裡有一個『print』指令,能用來探究這個『狀態』的數值表示。

turtle-art-right-xcor-of-right-of-screen

 

因此我們可以知道『起始位置』位於畫布中央 (0, 0) ,且以 top, bottom, left, right 定出畫布大小。『朝向』是以『向上』為零度 0^{\circ} ,『向右』 順時鐘增至 {360}^{\circ} 。『向左』旋轉 \theta 角之方向,表示為 {360}^{\circ} - \theta

假設 S = [\vec{r} = (xcor , ycor) , \vec{\theta}] 是某一時刻小海龜之『狀態』, forward  dright  \vec{\alpha}left  \vec{\beta} ,將小海龜之『狀態』改變為 S^{'} = [\vec{r^{'}} = ({xcor}^{'} , {ycor}^{'}) , \vec{ {\theta}^{'}}] ,那麼 SS^{'} 間,會滿足如下的關係式︰

forward d

\vec{r^{'}} - \vec{r} = d \cdot \vec{\theta}

\vec{{\theta}^{'}} = \vec{\theta}

 

right \vec{\alpha}

\vec{r^{'}} - \vec{r} = \vec{0}

\vec{{\theta}^{'}} = \vec{\theta} + \vec{\alpha}

 

left \vec{\beta}

\vec{r^{'}} - \vec{r} = \vec{0}

\vec{{\theta}^{'}} = \vec{\theta} - \vec{\beta}

※ 註︰為簡化起見,角度計算未寫出 mod \ 360 以及負數需加上  360

 

不知是否足已彰顯小海龜『幾何學』之『仿射性』??

仿射幾何學

幾何上,仿射幾何是不涉及任何原點、長度或者角度概念的幾何 ,但是有兩點相減得到一個向量的概念。

它位於歐氏幾何射影幾何之間。它是在域 K 上任意維仿射空間的幾何。 K 為實數域的情況所包含的內容足夠使人了解其大部分思想 。

Affine geometry

In mathematics, affine geometry is what remains of Euclidean geometry, when not using (mathematicians often say “when forgetting”) the metric notions of distance and angle. As the notion of parallel lines is one of the main properties that is independent of any metric, affine geometry is often considered as the study of parallel lines. Therefore, Playfair’s axiom (given a line L and a point P not on L, there is exactly one line parallel to L that passes through P) is fundamental in affine geometry. Comparisons of figures in affine geometry are made with affine transformations, which are mappings that preserve alignment of points and parallelism of lines.

Affine geometry can be developed in two ways that are essentially equivalent.[1]

In synthetic geometry, an affine space is a set of points to which is associated a set of lines, which satisfy some axioms (such as Playfair’s axiom).

Affine geometry can also be developed on the basis of linear algebra. In this context an affine space is a set of points equipped with a set of transformations (that is bijective mappings), the translations, which forms a vector space (over a given field, commonly the real numbers), and such that for any given ordered pair of points there is a unique translation sending the first point to the second; the composition of two translations is their sum in the vector space of the translations.

In more concrete terms, this amounts to having an operation that associates to any ordered pair of points a vector and another operation that allows translation of a point by a vector to give another point; these operations are required to satisfy a number of axioms (notably that two successive translations have the effect of translation by the sum vector). By choosing any point as “origin”, the points are in one-to-one correspondence with the vectors, but there is no preferred choice for the origin; thus an affine space may be viewed as obtained from its associated vector space by “forgetting” the origin (zero vector).

Although this article only discusses affine spaces, the notion of “forgetting the metric” is much more general, and can be applied to arbitrary manifolds, in general. This extension of the notion of affine spaces to manifolds in general is developed in the article on the affine connection.

220px-translation_parallelogram-svg

In affine geometry, one uses Playfair’s axiom to find the line through C1 and parallel to B1B2, and to find the line through B2 and parallel to B1C1: their intersection C2 is the result of the indicated translation.

 

『向前』 forward 是『平移』,改變『位置』,不改變『朝向』;『向右』 right 、『向左』 left 是『旋轉』,改變『朝向』,不改變『位置』,唯參照『當下狀態』而施為的也!!

 

 

 

 

 

 

 

 

 

 

L4K ︰小海龜繪圖《II》

傳統上 Logo 的精神強調自己『動手作』,從經驗中學習『編程』。雖說作者不知為何畫 □

TO SQUARE

The traditional introduction to Logo has been to draw a square. Often times when running a workshop, I have the learners form a circle around one volunteer, the “turtle”, and invite them to instruct the turtle to draw a square. (I coach the volunteer beforehand to take every command literally, as does our graphical turtle.) Eventually the group converges on “go forward some number of steps”, “turn right (or left) 90 degrees”, “go forward some number of steps”, “turn right (or left) 90 degrees”, “go forward some number of steps”, “turn right (or left) 90 degrees”, “go forward some number of steps”. It is only on rare occasions that the group includes a final “turn right (or left) 90 degrees” in order to return the turtle to its original orientation. At this point I introduce the concept of “repeat” and then we start in with programming with Turtle Blocks.

 

turtle-art-number-used-as-numeric-input-in-mathematic-operators

 

成了『打招呼』 hello, world 的程式︰

一九七二年布萊恩‧柯林漢 Brian Wilson Kernighan  於貝爾實驗室撰寫《Introduction to the Language B》的內部技術文件時,寫了一個『hello, world』的範例程式。其後他與 丹尼斯‧里奇 Dennis M. Ritchie 合著的《The C Programming Language》也保留了這個範例程式。不知怎的這成了一個『傳統』,成了初學者所編寫的第一個程式。現今流行的寫法是『Hello, World!』,不知柯林漢會不會抱怨這是是那個嗎?它的原典是︰

hello, world

,裡頭所有字母全是小寫,『 , 』之後有一『空白』。

─── 摘自《Thue 之改寫系統《三》

 

但思如從『語言』的角度來看『積木』,要只是用

forward  向前

right  右轉

left  左轉

number   數值

 

堆積一次一次的『重複』︰

forward-100

right-90

 

未免無趣哉??如是畫 ☆ 以及於『正多邊形』之程式︰

Regular polygon

In Euclidean geometry, a regular polygon is a polygon that is equiangular (all angles are equal in measure) and equilateral (all sides have the same length). Regular polygons may be convex or star. In the limit, a sequence of regular polygons with an increasing number of sides becomes a circle, if the perimeter is fixed, or a regular apeirogon, if the edge length is fixed.

regular_star_polygons-svg

Regular convex and star polygons with 3 to 12 vertices labelled with their Schläfli symbols

……

Regular convex polygons

All regular simple polygons (a simple polygon is one that does not intersect itself anywhere) are convex. Those having the same number of sides are also similar.

An n-sided convex regular polygon is denoted by its Schläfli symbol {n}. For n < 3 we have two degenerate cases:

  • Monogon {1}: degenerate in ordinary space. (Most authorities do not regard the monogon as a true polygon, partly because of this, and also because the formulae below do not work, and its structure is not that of any abstract polygon.)
  • Digon {2}: a “double line segment”: degenerate in ordinary space. (Some authorities do not regard the digon as a true polygon because of this.)

In certain contexts all the polygons considered will be regular. In such circumstances it is customary to drop the prefix regular. For instance, all the faces of uniform polyhedra must be regular and the faces will be described simply as triangle, square, pentagon, etc.

Angles

For a regular convex n-gon, each interior angle has a measure of:

  \left(1-\frac{2}{n}\right)\times 180\,\,\, degrees, or equivalently(n-2)\times {\frac {180}{n}} degrees,
or {\frac {(n-2)\pi }{n}} radians,
or  {\frac {(n-2)}{2n}} full turns,

and each exterior angle (i.e. supplementary to the interior angle) has a measure of  {\tfrac {360}{n}} degrees, with the sum of the exterior angles equal to 360 degrees or 2π radians or one full turn.

Regular star polygons

A non-convex regular polygon is a regular star polygon. The most common example is the pentagram, which has the same vertices as a pentagon, but connects alternating vertices.

For an n-sided star polygon, the Schläfli symbol is modified to indicate the density or “starriness” m of the polygon, as {n/m}. If m is 2, for example, then every second point is joined. If m is 3, then every third point is joined. The boundary of the polygon winds around the center m times.

The (non-degenerate) regular stars of up to 12 sides are:

m and n must be coprime, or the figure will degenerate.

The degenerate regular stars of up to 12 sides are:

  • Square – {4/2}
  • Hexagons – {6/2}, {6/3}
  • Octagons – {8/2}, {8/4}
  • Enneagon – {9/3}
  • Decagons – {10/2}, {10/4} and {10/5}
  • Dodecagons – {12/2}, {12/3}, {12/4} and {12/6}
Two interpretations of {6/2}
Grünbaum
{6/2} or 2{3}[11]
Coxeter
2{3} or {6}[2{3}]{6}
Doubly wound hexagon.png Regular star figure 2(3,1).svg
Doubly-wound hexagon Hexagram as a compound
of two triangles

Depending on the precise derivation of the Schläfli symbol, opinions differ as to the nature of the degenerate figure. For example, {6/2} may be treated in either of two ways:

  • For much of the 20th century (see for example Coxeter (1948)), we have commonly taken the /2 to indicate joining each vertex of a convex {6} to its near neighbors two steps away, to obtain the regular compound of two triangles, or hexagram.
Coxeter clarifies this regular compound with a notation {kp}[k{p}]{kp} for the compound {p/k}, so the hexagram is represented as {6}[2{3}]{6}.[12] More compactly Coxeter also writes 2{n/2}, like 2{3} for a hexagram as compound as alternations of regular even-sided polygons, with italics on the leading factor to differentiate it from the coinciding interpretation.[13]
  • Many modern geometers, such as Grünbaum (2003),[11] regard this as incorrect. They take the /2 to indicate moving two places around the {6} at each step, obtaining a “double-wound” triangle that has two vertices superimposed at each corner point and two edges along each line segment. Not only does this fit in better with modern theories of abstract polytopes, but it also more closely copies the way in which Poinsot (1809) created his star polygons – by taking a single length of wire and bending it at successive points through the same angle until the figure closed.

 

,豈非鮮有驚豔,邯鄲學步的耶★☆故而將用從上到下  Top-Down 論此小海龜繪圖幾何學的乎!!

 

 

 

 

 

 

 

 

 

 

L4K ︰小海龜繪圖《I》

憑借重力和摩擦力,兒童自己就能由堆『積木』

Toy block

Toy blocks (also building bricks, building blocks, or simply blocks) are wooden, plastic or foam pieces of various shapes (square, cylinder, arch, triangle, etc.) and colors that are used as construction toys. Sometimes toy blocks depict letters of the alphabet.

220px-toyblocks

A set of blocks

 

習得形狀、顏色、平衡、美感、造型、…以及想像種種經驗。也許因是之故,『積木』代表『直覺』『容易』的吧!所以小海龜繪圖語言方會如此呈現乎?

turtle-art-start-connects-action-to-toolbar-run-buttons

 

不過以『顏色』為『群組』,『文字』作『說明』,『構型』當『導引』…,總帶點主觀性,跨『方言』時,還請留意哩︰

turtle-blocks-js-mozilla-firefox

 

說起 TurtleArt 使用手冊應當先閱讀

Activities/Turtle Art

What is Turtle Blocks (AKA Turtle Art)

Turtle Blocks is an activity with a Logo-inspired graphical “turtle” that draws colorful art based on snap-together visual programming elements. Its “low floor” provides an easy entry point for beginners. It also has “high ceiling” programming features which will challenge the more adventurous student.

Where to get Turtle Blocks

http://activities.sugarlabs.org/en-US/sugar/addon/4027

Note: There are two inter-compatible programs: Turtle Art and Turtle Blocks. Turtle Art, which closely parallels the Java version of Turtle Art maintained by Brian Silverman, offers a small subset of the functionality of Turtle Blocks. Sugar users probably want to use Turtle Blocks rather than Turtle Art. (Also see Turtle Confusion, a collection of programming challenges designed by Barry Newell; as well as the Activities/TurtleFlags, Activities/Tortuga de Mexico and Activities/Amazonas Tortuga variants.)

Debian (and Ubuntu) users can install Turtle Blocks from a repository maintained by Alan Aguiar (https://launchpad.net/~alanjas/+archive/turtleblocks):

  1. sudo add-apt-repository ppa:alanjas/turtleblocks
  2. sudo apt-get update
  3. sudo apt-get install turtleblocks

Fedora users can do:

  1. sudo yum install turtleblocks
  2. sudo yum install sugar-turtleart

For those of you who would like to use Turtle Blocks in a browser, there is a mostly compatible version at Turtle Blocks JS. See the Guide (en ES) for more details.

Finally, there is Music Blocks, a musical fork of Turtle Blocks. See the Guide for more details.

 

茲因與時變遷之緣故,最好同時參考

Turtle Art

About

_images/Activity-Turtle_Art.pngTurtle Art, also known as Turtle Blocks, is an activity with a Logo-inspired graphical “turtle” that draws colorful art based on snap-together visual programming elements. Its “low floor” provides an easy entry point for beginners. It also has “high ceiling” programming, graphics, mathematics, and Computer Science features which will challenge the more adventurous student.

Where to get Turtle Art

Is included in the OLPC image, and can be downloaded from the Sugarlabs Activities repository

Note

There are two inter-compatible programs: Turtle Art and Turtle Blocks. Turtle Art, which closely parallels the Java version of Turtle Art maintained by Brian Silverman, offers a small subset of the functionality of Turtle Blocks. Turtle Blocks is the version included in the Sugar distribution. Sugar users probably want to use Turtle Blocks rather than Turtle Art. (Also see Turtle Confusion, a collection of programming challenges designed by Barry Newell.)

Using Turtle Art

_images/300px-Screenshot_of_Turtle_Art_Activity_getting_started.pngStart by clicking on (or dragging) blocks from the Turtle palette. Use multiple blocks to create drawings; as the turtle moves under your control, colorful lines are drawn.

You add blocks to your program by clicking on or dragging them from the palette to the main area. You can delete a block by dragging it back onto the palette. Click anywhere on a “stack” of blocks to start executing that stack or by clicking in the Rabbit (fast) , Turtle (slow) or Bug (debug) buttons rabit-turtle on the Project Toolbar.

 

Using Turtle Art JS

Turtle Blocks Javascript is designed to run in a browser. Most of the development has been done in Chrome, but it should also work in Firefox. You can run it directly from index.html, from a server maintained by Sugar Labs, from the github repo, or by setting up a local server.

Once you’ve launched it in your browser, start by clicking on (or dragging) blocks from the Turtle palette. Use multiple blocks to create drawings; as the turtle moves under your control, colorful lines are drawn.

You add blocks to your program by clicking on or dragging them from the palette to the main area. You can delete a block by dragging it back onto the palette. Click anywhere on a “stack” of blocks to start executing that stack or by clicking on the rabbit (fast) or snail (slow) on the Main Toolbar. To maximize screen real estate, Turtle Blocks overlays the program elements (stacks of blocks) on top of the canvas. These blocks can be hidden at any time will running the program.

 

 Guide to Programming with Turtle Art

Turtle Blocks expands upon what children can do with Logo and how it can be used as the underlying motivator for “improving” programming languages and programmable devices.

In this guide, we illustrate this point by both walking the reader through numerous examples, but also by discussing some of our favorite explorations of Turtle Blocks, including multi-media, the Internet (both as a forum for collaboration and data collection), and a broad collection of sensors.

 

以免望著『積木』心嘆,不明所指的也※