Problem with hypotenese Length

  • Thread starter Pin Head
  • Start date
  • Tags
    Length
In summary, the conversation discusses finding the angle and length of the hypotenuse in a right triangle using the adjacent and opposite sides. The correct formulas for finding the angle and length of the hypotenuse are provided. The conversation also addresses the issue of negative lengths and suggests using the Math.abs() function to avoid negative values.
  • #1
Pin Head
23
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

  • Untitled.jpg
    Untitled.jpg
    10.8 KB · Views: 430
Mathematics news on Phys.org
  • #2
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?
 
  • #3
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

  • Untitled1.jpg
    Untitled1.jpg
    11.6 KB · Views: 410
  • #4
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?
 
  • #5
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
 
  • #6
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)
 
  • #7
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

  • Untitled2.jpg
    Untitled2.jpg
    15.5 KB · Views: 406
  • #8
There's a little function called Math.abs() ... *wink wink*
 
  • #9
Hi,
I used Math.abs( y2 - y1 ) which gives me 200 instead of -200 but I still get the same
results anyway
 

FAQ: Problem with hypotenese Length

What is the problem with hypotenuse length?

The problem with hypotenuse length is that it is often misunderstood and used incorrectly in mathematical calculations involving right triangles.

How is hypotenuse length calculated?

Hypotenuse length is calculated using the Pythagorean theorem, which states that the square of the hypotenuse (the longest side of a right triangle) is equal to the sum of the squares of the other two sides.

What are the common mistakes made when dealing with hypotenuse length?

Common mistakes when dealing with hypotenuse length include using the wrong formula, forgetting to square the other two sides, and rounding the final answer too early.

Can hypotenuse length be negative?

No, hypotenuse length cannot be negative because it is a measurement of a physical distance and cannot have a negative value.

How can I avoid errors when dealing with hypotenuse length?

To avoid errors when dealing with hypotenuse length, it is important to double-check your calculations, use the correct formula, and be careful with rounding and significant figures.

Back
Top