The principle of circle is not mentioned. If you go to Baidu or google, you should know it.
I am here to provide that if you use a program to obtain the point on the path of the circle
Struct YuanInfo
{
Point point; // Point coordinate on the circle
Float fDu; // The tangent angle of the Change Point on the circle
};
YuanInfo getPointByDu (Point point, float fR, float fAuToDu)
{
YunInfo info;
Int r = fR;
Int a = point. x;
Int B = point. y + fR;
Float fDushu = fAuToDu * M_PI/180.0;
Float k =-1.0/std: tan (fDushu );
Float fDu = std: atan (k) * 180.0f/M_PI;
If (fAuToDu> 0 & fAuToDu <180.0f)
{
FDu = 180.0f + fDu;
}
Float x = (a + r * std: cos (fDushu ));
Float y = (B + r * std: sin (fDushu ));
Info. point = Point (x, y );
Info. fDu = fDu * M_PI/180.0f;
Return info;
}
How can this be called?
Here I will first introduce the getPointByDu (Point point, float fR, float fAuToDu) Parameters
Point point: this value is a coordinate at the bottom of the circle.
Float fR: the radius of the circle
Float fAuToDu: This is the Rotation Degree of the radius.
In this way, as long as you keep changing float fAuToDu, This is the Rotation Degree of the radius, it is possible to return the point on the circle trajectory one by one, and the tangent angle