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,所以你将如何用那种语言编写代码留给读者作为练习。:)