下載Python3.3.2

參考圖書:

Python:

1. 徹底研究Python科學計算 by 張若愚(著) 胡嘉璽(譯)

2. Computing for the Sciences Using Python, Part 1 [Kindle Edition] by  Christoph Hoffmann, Leah Hoffmann, Lukasz Ziarek

3. Computing for the Sciences Using Python, Part 2 [Kindle Edition] by Christoph Hoffmann, Leah Hoffmann, Lukasz Ziarek

4. 深入淺出Python by Paul Barry (蔣大偉 譯)

5 Python 3 程式庫參考手冊 by 陳建勳

VPython:

1. Vpython by Ronald Cohn Jesse Russell

=========================================================================

成績考量以課堂表現(30%,含Zuvio互動的表現)、課堂實習(30%,簡單的程式實作)和分組報告(40%,學期末每組約十五分鐘的報告)三項來評量學生成績。

第一週測試Zuvio來確定系統的可信度,將於第三週開始記錄學生的互動結果列入學期成績考量。

第三週應給老師分組名單,第六週應給老師各組要在學期末報告的內涵。

=========================================================================

授課內容

Python 部分原始版本取自Purdue大學理學院和商學院必修課程之教材,經本人修訂後之投影片。Math和VPython部分之教材若未註明出處則為本人所編撰,版權所有,請勿做營利用途。歡迎其他老師授課使用。

 週

Python

Math

VPython

1

a.      How to install Python?

b.      Python Basic: Programming Language, Numbers, Booleans, Python Grammar, Statement, Math Library.

c.       How to define Function? Function for CS vs. Function for Math?

d.      First function in Python (factorial)

2D平面與3D空間(多邊形表示法,右手規則)

函數與圖形(from wiki; 略)

 

簡單的3D幾何物件繪製

三軸的繪製

 

2

a.      Assignment

b.      Data Type: Numeric vs. String

c.       Function, Argument/variable, return.

 參數式

繪製曲線。

2D Curve

3D Curve

3

 Function again. Global and local variables

 

Bezier Curve (from wiki), and its matrix form

Tangent Field

for  (cos(q), sin(q))

for ((1-T2)/(1+T2), 2T/(1+T2)), where T=tan(q/2)

4

a. Booleans

b.      If statement

Hermit Curve, and its matrix form.

Conversion between curves.

繪製2D參數式曲線。繪製Bezier Curve

5

a. List

b. Loops

List and Matrix Offset Curve for parabola.

1. 劃出一條拋物線的offset curve(距離為0.1)

2. 或出十條拋物線的offset curve(距離從0.1到1.0)

6

Sequence

 

2D Geometry: Translation, Scaling and Rotation

3D Geometry

物件的放大縮小,平移和旋轉。

7

Matrix

parallel project vs. perspective projection

parallel projection, perspective projection.

8

Tree

moreTree

coordinates transformation (world coordinates to eye coordinates, w2e, and e2w), 2D and 3D w2e and e2w in 2D

9

Read from file vs. Write to file

Conversion between two Curves

 

10

Tree and Recursive

Library

Envolute

Envolute定理的驗證

11

Dragon Curve

3D Geometry: Rotation

 Hermit Curve端點與切線,Bezier Curve控制點之轉換

Hermit Curve繪 製

Curve 轉換

12

Dictionary,Tuple, Set  

 Animation (Bezier Curve)

13

 

Project Introduction

Proj1

Proj2

proj3

Proj4

Proj5

 

Morphing

14

 曲面z=f(x,y)

雙曲線

球體(sphere)的繪製

15

 

參數式曲面

Bezier Surface的繪製

16

 學生報告