Search code examples
mathgraphicsgeometrytrigonometrycomputational-geometry

Moving vertex along bisector to set a specific angle


I've got a three nodes A, B, C which create an angle α.

Question: how to find a position of B' (x,y coordinates) which is effectively a shift of B along α bisector, that AB'C angle is equal to α+5°

enter image description here


Solution

  • Here (with bisector) simpler solution is possible.

    Angle BCB' is 2.5 degrees

    Side BB' of triangle BCB' might be calculated using Law of Sines as

    Len(BB') = Len(BC) *  sin(2.5) / sin(alpha/2+2.5) 
    

    Unit bisector vector

    bis = BC/Len(BC) + BA/Len(BA)
    bis = bis / Len(bis)
    

    B' coordinates

    B' = B + bis * Len(BB')