Home > Software engineering >  Vc a great god help!!!
Vc a great god help!!!

Time:09-17

In the specified rectangle frame, use the mouse to select the entire frame, randomly generated five points, and the distance between the adjacent point straight line distance is the same,

CodePudding user response:

This can be understood as a rectangle is inscribed in a pentagon math, if known rectangular, the pentagon's side should be fixed (2 * * tan18 short side), the algorithm to baidu or thinking,

CodePudding user response:

reference 1st floor yxz_lp response:
this can be understood as a rectangle is inscribed in a pentagon math, if known rectangular, the pentagon should be fixed length (2 * * tan18 short side), or deciphering algorithm to baidu,

I asked randomly selected five points in the pentagon is not what you said, but from left to right or from right to left lined, could be a straight line may also be a curve

CodePudding user response:

Meaning there is only adjacent point distance required? This should be very simple, the first random points, each point set apart 5 pix, x=(0, 5) random value, y=SQRT (25 x ^ 2), and then determine whether within the rectangle, do remember x1, y1, again with the x1, x2 obtained by y1, y2, and so on,

CodePudding user response:

Write wrong, the first should be take rectangular left border to x - 5 * (right boundary point number) - 5 * count] [left, right
  • Related