2012年12月17日 星期一

日文50音苦學法

拿一本國語作業簿

將50音從あ い う え お か き く け こ な ね ぬ ね の は ひ ふ へ ほ や ゆ よ ら り る れ ろ 從頭抄到尾

母音 a i u e o

子音 a k s t n h m r

將子母音配起來
あ か さ た な は ま ら
い き し ち に ひ み り
う く す つ ぬ ふ む る
え け せ て ね へ め れ
お こ そ と の ほ も ろ

將這五行倒著抄 正著抄


あ(安) か(加) さ(左散樣) た(太) な(奈) は(波) ま(未) ら(和)
い(以) き(幾) し(之)         ち(知) に(仁) ひ(比) み(武) り(利)
う(宇) く(久) す(吋)         つ(川) ぬ(奴) ふ(不) む(美) る(留)
え(衣) け(計) せ(世)         て(天) ね(祿) へ(部) め(女) れ(禮)
お(於) こ(己) そ(曾)         と(止) の(乃) ほ(保) も(毛) ろ(呂)




2012年12月11日 星期二

程式語言學習心得

    程式語言的學習 有如英文 日文的學習
有其自身的學習曲線
我是從C語言入門,剛入門的那半年,好像在地獄中煎熬,
從array  if else if switch case等等,皆是一個寶貴的經驗,
當你熬過前2年,你就成功取得程式獵人執照

WebGL筆記(1)

-->
WebGL筆記
N=N1+N2
WebGL model數個參數
例如colortexture
webgl buffer種類
1.attribute
2.uniform
3.varying
shader有兩種
vertex shaderfragment shader
lights material → uniform
Normal attribute → vertex normal
vertex attribute → vertex coordinate
Shading & lightinginterchanged ambiguous
相關連的
physical principle of light reflection
光的反射物理準則
Lambertian reflection model
Phong reflection model
Lambertian reflectance
Specular reflection
attribute 用於vertex shaderapplication之間
uniform的值valueobject being processed物件處理中不改變其值
varying linkage a vertex shader a fragment shader
const->compile time constant
alpha透明度
vFinalColor[3]=1.0
vFinalColor.a=1.0
vFinalColor.w=1.0
vec3 vec43個與4element元素
Goraud shading with Lambertian reflection

3D 電腦圖學筆記(1)


3D Computer Graphics—Alan Watt

mathematical or geometric數學和幾何的graphics model – into 可視化—two-dimensional projection




Transformation是重要的工具in generating 3D scenes

2D view of the environment表示物件的方法是
polygon mesh model

3D geometry affine transformation




V'=Vt*D translation平移
V'=S*V scaling 縮小放大
V'=R*V rotation 旋轉

translation
v'=Tv
x' [1 0 0 Tx] [x]
[y']=[0 1 0 Ty] [y]
z' [0 0 1 Tz] [z]
1 [0 0 0 1] [1]

x'=x+Tx
y'=y+Ty
z'=z+Tz

scaling
v'=sv

s=[ Sx 0 0 0]
[ 0 Sy 0 0]
[ 0 0 Sz 0]
[ 0 0 0 1]

x'=Sx*x
y'=Sy*y
z'=Sz*z
Rx=[ 1 0 0 0 ]
[ 0 cosθ -sinθ 0]
[0 sinθ cosθ 0]
[0 0 0 1]

Ry=[ cosθ 0 sinθ 0 ]
[ 0 1 0 0]
[-sinθ 0 cosθ 0]
[ 0 0 0 1]

Rz=[cosθ -sinθ 0 0]
[sinθ cosθ 0 0]
[0 0 1 0]
[0 0 0 1]




z軸旋轉
x'=xcosθ-ysinθ
y'=xsinθ+ycosθ
z'=z

M3=M2M1

先旋轉後平移Rotation followed by translation

Vt*R


local coordinate system
1)平移至原點 T2
2)利用所需軸旋轉 R
3)平移物件至他的原點 T1

T2RT1=
[ 1 0 0 -Tx][cosθ -sinθ 0 0][1 0 0 Tx]
[ 0 1 0 -Ty][sinθ cosθ 0 0][0 1 0 Ty]
[ 0 0 1 0 ][0 0 1 0][0 0 1 0]
[ 0 0 0 1 ][0 0 0 1][0 0 0 1]


[cosθ -sinθ 0 -Txcosθ+Tysinθ+Tx]
[sinθ cosθ 0 -Txsinθ-Tycosθ+Ty]
[0 0 1 0 ]
[0 0 0 1 ]