Problem with hypotenese Length

  • Context: High School 
  • Thread starter Thread starter Pin Head
  • Start date Start date
  • Tags Tags
    Length
Click For Summary

Discussion Overview

The discussion revolves around the calculation of the hypotenuse in a right triangle using trigonometric functions, specifically focusing on the discrepancies in the displayed length of the hypotenuse in a graphical representation. Participants are exploring the relationships between the sides of the triangle and the angles involved, as well as the implications of coordinate systems in programming.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants propose using the inverse tangent function to find the angle based on the ratio of the sides, but there is disagreement on the correct formulation of the angle.
  • There are conflicting definitions of how to calculate the hypotenuse, with some suggesting that the formulas for the X and Y components are incorrect initially.
  • One participant mentions that the negative value for sideB arises from the coordinate system used in Java programming, where the Y-axis increases downwards.
  • Another participant suggests using the absolute value function to address the negative length issue, but notes that it does not change the results of the calculations.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct approach to calculating the hypotenuse or the implications of the negative length for sideB. Multiple competing views remain regarding the definitions and calculations involved.

Contextual Notes

There are unresolved assumptions regarding the coordinate system and its impact on the calculations, as well as the accuracy of the trigonometric functions used in the context of programming.

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

  • Untitled.jpg
    Untitled.jpg
    10.8 KB · Views: 478
Mathematics news on Phys.org
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

  • Untitled1.jpg
    Untitled1.jpg
    11.6 KB · Views: 439
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

  • Untitled2.jpg
    Untitled2.jpg
    15.5 KB · Views: 437
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
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
46
Views
7K