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.
赤い点の位置を見つけるにはどうすればよいですか?
その赤い点のx、yを見つけたい...
これをjavascriptで行いたいのですが、キャンバスの場合、特定の点から一方向に線を引きたい(そして角度があります)...
あなたはなにか考えはありますか?
数学的には、r が「幅」と呼ばれるものであり、ø が角度である場合、次のようになります。
x = r * cos(ø)
y = r * sin(φ)
私は JavaScript を知らないので、その言語でこれをどのようにコーディングするかは、読者の課題として残されています。:)