Formula to find points on the circumference of a circle, given the center of the circle and the radius

南楼画角 提交于 2019-12-06 00:38:02

问题


I am working on code to find the points on the circumference of a circle. I have the center point of the circle and the radius and I need to draw a circle around it. This will help me define the boundary. Please help me with formula for finding the these points on the circumference.


回答1:


For a circle with origin (j, k) and radius r:

x(t) = r cos(t) + j
y(t) = r sin(t) + k

where you need to run this equation for t taking values within the range from 0 to 360, then you will get your x and y each on the boundary of the circle.

For more information: http://www.math.com/tables/geometry/circles.htm



来源:https://stackoverflow.com/questions/14829621/formula-to-find-points-on-the-circumference-of-a-circle-given-the-center-of-the

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!