I'm writting small application to draw diagrams and I need to find points to draw bezier cu开发者_运维百科rve between two elements. Is there any efficient and simple way to calculate bending points ?? To better visualize my problem please take a look at this picture
As You can see I have two rectangles which I want to connect with bezier curve. It is obvious that I have two anchor points, but how can I calculate correctly bending points so that this line would look like at the picture.
On each end of the curve imagine a line perpendicular to the border through the anchor point. The curve points should be on that line. The farther away from the border these points lie the more vertical the center area of the curve is.
(I hope this is clear, it's at the limit of my english abilities)
精彩评论