Advertisement
Guest User

Complex

a guest
Aug 25th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. dom = [[1,1],[3,1],[1,3],[3,3],[2,5]]
  2.  
  3. pov = [1/2**0.5, 1/2**0.5]
  4.  
  5. dom_new = []
  6.  
  7. centr = [2,2]
  8.  
  9. for y in dom:
  10.     x = [y[0]-centr[0], y[1]-centr[1]]
  11.     dom_new.append([x[0]*pov[0] - x[1]*pov[1] + centr[0], x[0]*pov[1] + x[1]*pov[0]+centr[1]])
  12.  
  13. for i in dom_new:
  14.     print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement