直角座標、極座標之轉換


x = radius * cos(angle)
y = radius * sin(angle)

angle = atan(y/x)
radius = sqrt(x*x+y*y)  

atan : 反正切
sqrt : 平方根值

帶入以上公式即可作兩個座標系之轉換

留言

這個網誌中的熱門文章

C# 調用 C/C++ DLL 資料型態之對應

在Ubuntu上安裝EZ100PU晶片讀卡機