Home > Back-end >  Algorithm of arbitrary, position and size of the two circle a circle diameter of quadrilateral four
Algorithm of arbitrary, position and size of the two circle a circle diameter of quadrilateral four

Time:10-17

Delphi function prototype

The function GetRect (x1, y1, r1, x2, y2, r2) : TPointList
X1, y1, r1 first round center coordinates and radius
X2, y2, r2 second round the center coordinates and radius of

Return value only four vertex coordinate quadrilateral
Return value type and the way casual, can have four coordinates

CodePudding user response:

Four vertices quadrilateral is the diameter of the two endpoints, radius, circle, also asked not to come out, mainly is the diameter of which is optional, you know to know angles, such as horizontal, vertical, or how many degrees, so decided to quadrangle

CodePudding user response:

Problem is the Angle, this will only have the only rectangles

CodePudding user response:

Set up a coordinate for first, the x1=0, y1=0, y axis of quadrilateral corresponding to do two sides, this is not hard to
And then do the coordinate transformation, the coordinate transformation is also have the ready-made formula, translation + rotation

CodePudding user response:

Do first construct common tangent point A1, A2, B1, B2
Second circle do tangent point connection string A1A2 (circles) parallel COD, EOF
Construct and 4 (C, D and EF), and the four point coordinates
Can use the Pythagorean theorem, plus translation rotating,
  • Related