如何计算一个圆的周长的一个点? [英] How do I calculate a point on a circle’s circumference?

查看:134
本文介绍了如何计算一个圆的周长的一个点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何才能下面的函数在不同的语言实现的?

How can the following function be implemented in various languages?

计算(X,Y)点上圆的周长,对给定的输入值:

Calculate the (x,y) point on the circumference of a circle, given input values of:

  • 在半径
  • 角度
  • 在原产地(可选参数,如果由语言支持)

推荐答案

参数方程的一个圆

x = cx + r * cos(a)
y = cy + r * sin(a)

其中的研究的是半径, CX,CY 的起源,和的的的从0..2PI弧度或0角.. 360度。

Where r is the radius, cx,cy the origin, and a the angle from 0..2PI radians or 0..360 degrees.

这是pretty的容易适应与基本三角函数任何语言。

That's pretty easy to adapt into any language with basic trig functions.

这篇关于如何计算一个圆的周长的一个点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆