Advertisement
Guest User

Hyrule Map Calculations

a guest
Jul 4th, 2016
1,119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.06 KB | None | 0 0
  1. import math
  2.  
  3. #ladder calculations
  4.  
  5. link_h = 1.7 # link's height in meters
  6.  
  7. link_ladder_step_h = 4 # how many ladder steps is link
  8.  
  9. ladder_step_h = link_h/(link_ladder_step_h - 1) # the distance between two ladder steps. Since link is 4 ladder steps tall, he is 3 "in-between" tall. That's why I subtracted 1 here.
  10.  
  11. ladder_steps = 45 # the number of ladder steps
  12.  
  13. ladder_h = (ladder_steps - 1) * ladder_step_h # Ladder Height.(I'm counting the in-between of the ladder steps which should be 1 less the total ladder number)
  14.  
  15. print "Ladder Lenght:", ladder_h, "m"
  16.  
  17. #temple side-wall/length calculations
  18. #the lines I'm refering to is the temple side wall picture
  19.  
  20. red_line = ladder_h
  21. yellow_side_angle = math.radians(23.69)
  22. blue_side_angle = math.radians(45)
  23.  
  24. yellow_side = red_line/math.tan(yellow_side_angle)
  25. blue_side = red_line/math.tan(blue_side_angle)
  26.  
  27. print "Yellow Line: ",yellow_side, "m"
  28. print "Blue Line:", blue_side, "m"
  29.  
  30. temple_l = blue_side + yellow_side # the length of the side-wall or we could just call it the the temple length
  31.  
  32. print "Temple Length: ", temple_l, "m"
  33.  
  34. #temple width calculation
  35. #the lines I'm referring to is the temple map picture
  36. red_line2 = temple_l
  37. blue_side2_angle = math.radians(61.04)
  38. temple_w = red_line2/math.tan(blue_side2_angle) # lenght of the front side of the temple or we could just call the temple length
  39.  
  40. print "Temple Width:", temple_w, "m"
  41.  
  42.  
  43.  
  44. tof_area_m = temple_l * temple_w #the area of temple of time
  45.  
  46.  
  47. # map area calculations
  48. #pic1 is the map picture with just the great platue
  49. #pic2 is the map picture with surrounding areas of the platue and the great platue itself
  50. #pic3 is the map picture without the great platue
  51.  
  52. print "Temple of Time Area: ",tof_area_m,"m^2"
  53.  
  54. tof_l_px = 35 # temple of time length in pixels in pic1
  55. tof_w_px = 20 # temple of time width in pixels in pic1
  56. tof_area_px = tof_l_px * tof_w_px
  57.  
  58. print "Temple of Time Area: ",tof_area_px,"px"
  59.  
  60. pic1_l = 658    # pic1 length
  61. pic1_w = 528    # pic1 width
  62.  
  63. pic1_area_px = pic1_l * pic1_w
  64.  
  65. print "Great Platue Area: ",pic1_area_px, "px"
  66.  
  67. pic1_area_km = ((tof_area_m * pic1_area_px)/tof_area_px)/1000**2 # I directly converted m^2 to km^2
  68.  
  69. print "Great Platue Area: ",pic1_area_km, "km^2"
  70.  
  71. pic2_gp_l = 104 # great platue length in pic2 in pixels
  72. pic2_gp_w = 81  # great platue width in pic2 in pixels
  73.  
  74. pic2_gp_area_px = pic2_gp_l * pic2_gp_w
  75.  
  76. pic2_l = 960
  77.  
  78. pic2_w = 282
  79.  
  80. pic2_area_px = pic2_l * pic2_w
  81.  
  82. print 'The "Map with Great Platue" Area:', pic2_area_px, "px"
  83.  
  84. pic2_area_km = (pic1_area_km*pic2_area_px)/pic2_gp_area_px
  85.  
  86. print 'The "Map with Great Platue" Area:', pic2_area_km, "km^2"
  87.  
  88. pic3_l = 960
  89.  
  90. pic3_w = 530
  91.  
  92. pic3_area_px = pic3_l * pic3_w
  93.  
  94. print 'The "Map without Great Platue" Area:', pic3_area_px, "px"
  95.  
  96. pic3_area_km = (pic1_area_km*pic3_area_px)/pic2_gp_area_px
  97.  
  98. print 'The "Map without Great Platue" Area:', pic3_area_km, "km^2"
  99.  
  100. total_map = pic2_area_km + pic3_area_km
  101.  
  102. print "Total Map Size:", total_map, "km^2"
  103.  
  104. #P.S: Forgive me for the bad names.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement