Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- X, Y = map(float, input().split())
- lnx, lny, lvx, lvy, rvx, rvy, rnx, rny = map(float, input().split())
- Dx = lnx
- Dy = lny
- Sx = X / (rnx - lnx)
- Sy = Y / (rvx - rnx)
- Mt1 = [
- [1, 0, 0],
- [0, 1, 0],
- [Dx, Dy, 1]
- ]
- Mt2 = [
- [Sx, 0, 0],
- [0, Sy, 0],
- [0, 0, 1]
- ]
- Mt3 = [
- [0, 0, 0],
- [0, 0, 0],
- [0, 0, 0]
- ]
- for i in range(len(Mt1)):
- for j in range(len(Mt2[0])):
- for k in range(len(Mt2)):
- Mt3[i][j] += Mt1[i][k] * Mt2[k][j]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement