I have the start and end point of the curve and the top point of the curve. I would like to know how i can get the control point with this ?
I have a graph with links. When a link is on a node, i want that the links dodge the nodes. So I recover the point that I would like to have as the top point.
let x = node.GetX + node.GetRadius * Math.sin(angle) + 10 * Math.sign(Math.sin(angle))
let y = node.GetY + node.GetRadius * Math.cos(angle) + 10 * Math.sign(Math.cos(angle))
I have the t too between 0 and 1
let t = Distance(link.GetFrom.GetX, link.GetFrom.GetY, perpendicular.x, perpendicular.y).distance / Distance(link.GetFrom.GetX, link.GetFrom.GetY, link.GetTo.GetX, link.GetTo.GetY).distance
I have too the point on the line between the start and end point.
let perpendicular = PerpendicularIntersection(link.GetFrom.GetPosition, link.GetTo.GetPosition,{x:node.GetX, y:node.GetY})
I tried different formula from this forum and gpt but nothing good. researchs
Thank you in advance for your help