demo.py 251 B

123456789101112
  1. def get_trajectory_image(height, width=400):
  2. aspect = height / float(width)
  3. if height > 300:
  4. height = 300
  5. width = height / aspect
  6. return height, width
  7. height, width = get_trajectory_image(600, 300)
  8. print(height, width)