Reproducible pitch

Jiameng Yu
12 December 2020

The idea

  • Calculating the length of hypotenuse © of isosceles right triangle.
  • This is where the two adjacents (A) are of the same length.
  • The length of hypotenuse should be the square root of the same of the square of the two adjacent.
  • C = (A2)½

The length of adjacent

## To illustrate this calculation, as step 1, we will simulate 100 randomly generated variables. 
## These variables represent the value the length of adjacent in a given isosceles triangle.
set.seed(334)
A<- abs(rnorm(100))*100
A
  [1] 209.180064 224.736911  77.512501  21.402371 173.937322   7.039009
  [7]  54.011380  16.114620  62.348414   2.441922 365.851263   7.573599
 [13]  22.799801  14.986772  88.000886  31.847398 292.232168  93.874567
 [19]  20.282984  62.103405  12.441802 170.700591 112.766212 134.304934
 [25] 102.337633  38.637671  62.349468  94.427483   0.891956  16.256333
 [31]  82.942672  57.887488  60.671981 144.284501 174.006160   8.776321
 [37]  20.116704 147.795872  56.179959   4.168746 101.452963  21.354251
 [43] 112.630126  59.588547 213.866944  71.804761 101.548238 191.480806
 [49]  42.750739 150.374616 100.979499 177.501336 120.578037  88.700710
 [55] 122.466125  13.930217 146.816875 145.492686   2.309504  60.796158
 [61]  99.237112 112.635074  12.558355 170.671150  37.085561  34.420688
 [67]  51.336430 145.156705  85.384122  63.018247  65.317000  95.224150
 [73]  59.180132 120.384320  44.156422 122.477733 112.603763   7.231103
 [79]  53.922051  67.989820 168.893836 214.659354  11.603609  26.532377
 [85]  93.859308 100.810368  52.921468 155.477107  71.565082  41.434192
 [91]  41.863913  43.900135 119.609473   7.909671  17.215913 128.709738
 [97]  63.748559  40.913114  82.156425 112.004621

Calculating of length of hypotenuse

## We then calculate the length of hypotenuse of each triangle.
C<- (A^2)^(1/2)
C
  [1] 209.180064 224.736911  77.512501  21.402371 173.937322   7.039009
  [7]  54.011380  16.114620  62.348414   2.441922 365.851263   7.573599
 [13]  22.799801  14.986772  88.000886  31.847398 292.232168  93.874567
 [19]  20.282984  62.103405  12.441802 170.700591 112.766212 134.304934
 [25] 102.337633  38.637671  62.349468  94.427483   0.891956  16.256333
 [31]  82.942672  57.887488  60.671981 144.284501 174.006160   8.776321
 [37]  20.116704 147.795872  56.179959   4.168746 101.452963  21.354251
 [43] 112.630126  59.588547 213.866944  71.804761 101.548238 191.480806
 [49]  42.750739 150.374616 100.979499 177.501336 120.578037  88.700710
 [55] 122.466125  13.930217 146.816875 145.492686   2.309504  60.796158
 [61]  99.237112 112.635074  12.558355 170.671150  37.085561  34.420688
 [67]  51.336430 145.156705  85.384122  63.018247  65.317000  95.224150
 [73]  59.180132 120.384320  44.156422 122.477733 112.603763   7.231103
 [79]  53.922051  67.989820 168.893836 214.659354  11.603609  26.532377
 [85]  93.859308 100.810368  52.921468 155.477107  71.565082  41.434192
 [91]  41.863913  43.900135 119.609473   7.909671  17.215913 128.709738
 [97]  63.748559  40.913114  82.156425 112.004621

Showing relationship between lengh of adhacent and hypotenuse

plot of chunk unnamed-chunk-3