I have a trapezoid with all the coordinates A(x1,y1), B(x2,y2), C(x3,y3), D(x4,y4) along with Widths W1,W2 and Lengths L1,L2. So what I need is, if I increase width W2 then I should get new coordinates N(xn,yn) with same angle ADC. Point C will become N. Even if ABCD is in clockwise or anticlockwise the coordinates should be accurate.
//values of trapezopid are
A(1026.5718, 441.5417)
B(1023.2499, 401.6799)
C(855.8303, 415.6316)
D(859.1521, 455.4934)
W1 = 40, W2 = 40, L1 = 168, L2 varies according to the W2 changed.
I used the below formula but it didn't give accurate values. In the above case it failed.
Nx = X4 + (W2/W1) * (X2 - X1)
Ny = Y4 + (W2/W1) * (Y2 - Y1)