Problem with hypotenese Length

  • Level: High School 
  • Thread starter Pin Head
  • Start date
  • Tags Tags
    Length
8 replies · 2K views · last reply
Pin Head
Messages
23
Reaction score
0
sideA = adjacent
sideB = opposite
sideC = hypotenese

Find Angle

angle = inverse tan = sideA / sideB

Find side

find the X component
sideC = cos( angle ) * sideA

find the Y Component
sideC = sin( angle ) * sideB

So my question is is how or why is my hypotenese line being displayed shorter than
 
Attachments
  • Screenshot of a Java Protractor window showing a right triangle with its right angle at bottom right, labelled Side A (bottom), Side B (vertical right side) and Side C (hypotenuse), with the hypotenuse drawn shorter than the other two sides.
    Untitled.jpg
    10.8 KB · Views: 501
Pin Head said:
sideA = adjacent
sideB = opposite
sideC = hypotenese

Find Angle

angle = inverse tan = sideA / sideB

Find side

find the X component
sideC = cos( angle ) * sideA

find the Y Component
sideC = sin( angle ) * sideB

So my question is is how or why is my hypotenese line being displayed shorter than

Your definitions of the angle and the cos() and sin() are wrong.

Try again?
 
sideA = adjacent
sideB = opposite
sideC = hypotenese

Find Angle

angle = inverse tan = sideB / sideA

Find side

find the X component
sideC = sideA / cos( angle )

find the Y Component
sideC = sideB / sin( angle )


I think I got the formula wrote the wrong way but now my Image looks like this
 
Attachments
  • Screenshot of a Java Protractor window showing a right triangle with its base labelled Side a, vertical side labelled Side b, and hypotenuse labelled Side c, with the hypotenuse extending past the top vertex.
    Untitled1.jpg
    11.6 KB · Views: 466
Pin Head said:
sideA = adjacent
sideB = opposite
sideC = hypotenese

Find Angle

angle = inverse tan = sideB / sideA

Find side

find the X component
sideC = sideA / cos( angle )

find the Y Component
sideC = sideB / sin( angle )


I think I got the formula wrote the wrong way but now my Image looks like this

Your equations look correct now. How are you generating the figure?
 
Hi,
I don't no what you mean by figure?
but here is what I have done

sideA = x2 - x1 which equals 200pixels
sideB = y2 - y1 which equals -200pixels

angle = inverse tan = sideB / sideA

angle is -0.7853981633974483 in radians

find the X component
sideC = sideA / cos( angle )
sideC equals 282.84271247461896

find the Y Component
sideC = sideB / sin( angle )
sideC equals 282.842712474619
 
Pin Head said:
Hi,
I don't no what you mean by figure?
but here is what I have done

sideA = x2 - x1 which equals 200pixels
sideB = y2 - y1 which equals -200pixels

angle = inverse tan = sideB / sideA

angle is -0.7853981633974483 in radians

find the X component
sideC = sideA / cos( angle )
sideC equals 282.84271247461896

find the Y Component
sideC = sideB / sin( angle )
sideC equals 282.842712474619

Why is sideB negative in length?

(the figure I refer to is your drawing of the triange)
 
hi,
because in Java programming the x coordinates travel across the screen and the y coordinates travel down the screen so when I use the formula y2 - y1 then we are travelling
up the screen which gives us negative 200
 
Attachments
  • Screenshot of a Java Protractor window showing a right triangle with side a horizontal along the bottom, side b vertical on the right, and hypotenuse side c, with coordinates labelled at the vertices and y2 - y1 = -200 written above.
    Untitled2.jpg
    15.5 KB · Views: 462
There's a little function called Math.abs() ... *wink wink*
 
Hi,
I used Math.abs( y2 - y1 ) which gives me 200 instead of -200 but I still get the same
results anyway