Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
matplotlib を使用して Python で直角座標 (x、y) の代わりに極座標 (大きさと角度) から始まるベクトル/線を描画するにはどうすればよいですか? 私はほんの数日前にPythonを学び始めました。
次のようにして、極座標をデカルト座標に変換します。
x = magnitude*cos(angle) y = magnitude*sin(angle)
注: 度またはラジアンを使用しているかどうかを再確認してください。通常、cos と sin はラジアンを期待します。角度をラジアンに変換するには、 を掛け(2*pi)/360ます。ラジアンから角度に変換するには、 を掛け360/(2*pi)ます。
(2*pi)/360
360/(2*pi)