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.
如果我们画一条弧线,我们如何获得弧线终点(最后一点)相对于中心的坐标。
见http://jsfiddle.net/5DdQt/
利用
function getPoint(c1,c2,radius,angle){ return [c1+Math.cos(angle)*radius,c2+Math.sin(angle)*radius]; }
c1
c2
radius
angle
弧度 = (degrees * Math.PI) / 180.
(degrees * Math.PI) / 180