You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


Math problem (a computer won't help)
05-30-2017, 12:25 PM (This post was last modified: 05-30-2017 12:27 PM by STxAxTIC.)
Post: #41
 (Print Post)
RE: Math problem (a computer won't help)
Heya bplus,

I'm at work right now so we only get a stealthy and under-thought version of my answer for now, but my first take on it is:

Recall from the PDF two equations (6) and (7), namely:

R = AD - BD
R = AC - CD

Adding these, I get:

2R = AD + AC - (BD + CD)
2R = AD + AC - BC

...which more-or-less satisfies what we were looking for (correct me if you mean something different, I'm going fast at the moment). Since only two numbers are needed to uniquely identify the right triangle, we might say, in conclusion:

2R = AD + AC - (AD^2 + AC^2)^.5

... where of course, R_(bigger circle) = .5 BC = .5 (AD^2 + AC^2)^.5
Find all posts by this user
Like Post
05-30-2017, 02:23 PM (This post was last modified: 05-30-2017 02:32 PM by bplus.)
Post: #42
 (Print Post)
RE: Math problem (a computer won't help)
Hey STxAXTIC,

From a little searching on Internet I found this that might be interesting. It does not get ri, the radius of the inscribed circle down to terms of our 2 legs of right triangle but might provide interesting material to look over as it hints that the ratio might be fairly simple expression specially for Pythagorean triples.
Code Snippet: [Select]
' ri over ro.bas SmallBASIC 0.12.9 (B+=MGA) 2017-05-30

'The ins and outs of scribes:

' ri = radius of the inscribed circle of ABC
' ro = radius of the outer circle that circumscribes ABC

'ri and ro formulas from
'https://opencurriculum.org/5492/circumscribed-and-inscribed-circles/
' in the last example from page
' there must be a typo because an s * (s-a) * (s-b) * (s-c) would cancel s in denominator
' so this is actual formula for ri and it agrees to their r = .645 for a=2, b=3, c=4
func ri(a, b, c)
 local s = 1/2 * (a + b + c)
 ri = ( (s-a)*(s-b)*(s-c)/s ) ^ .5
end

func ro(a, b, c)
 local s = 1/2 * (a + b + c)
 ro = a*b*c/( 4* ( s*(s-a)*(s-b)*(s-c) ) ^ .5 )
end

a = 2 : b = 3 : c = 4
'test function to their numbered examples for ro their "R" and ri their "r"
? "For a, b, c = ";a;", ";b;", ";c
? "ri(a, b, c) = ";ri(a, b, c)   'agrees to their .645 when a=2 : b=3 : c=4
? "ro(a, b, c) = ";ro(a, b, c)   'agrees to their 2.07 rounded! when a=2 : b=3 : c=4
? " ri / ro = ";ri(a, b, c)/ro(a, b, c)
?
a = 3 : b = 4 : c = 5  ' our famous 3-4-5 triangle which is right
? "For a, b, c = ";a;", ";b;", ";c
? "ri(a, b, c) = ";ri(a, b, c)
? "ro(a, b, c) = ";ro(a, b, c)
? " ri / ro = ";ri(a, b, c)/ro(a, b, c)  'wow looks like very simple constant
?

'now we know for a right triangle the 1/2 hypotenuse IS ro
? "For a, b, c = ";a;", ";b;", ";c
'find the hyp, the largest of a, b, c
if a > b then hyp = a else hyp = b
if hyp < c then hyp = c
? " ri / ro (using 1/2*hypotenuse for ro) = "; ri(a, b, c)/(.5*hyp)
?
? "Therefore, I submit for the general edification of the people,"
? "the ratio of ri / ro for right triangles = "
? " (( (s-a)*(s-b)*(s-c)/s ) ^ .5) / (.5*hyp)"
? " where s = .5*(a + b + c)"

pause


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post
05-30-2017, 08:31 PM (This post was last modified: 05-30-2017 08:35 PM by bplus.)
Post: #43
 (Print Post)
RE: Math problem (a computer won't help)
OK now I have hacked ri and ro into old Pythagorean Triples builder code for further exploration of ri and ro in Pythagorean Triples.

Code Snippet: [Select]
' Pyth triples and ri over ro.bas SmallBASIC 0.12.9 (B+=MGA) 2017-05-30
' mods with ri and ro and old code
' B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+
'
' Pythagorean Triples Builder.bas - posted Bpf 1/2/15 3.15 AM
' SmallBASIC 0.11.5
' Pythagorean Triple (P3) is 3 Integers A,B,C s.t. A^2+B^2=C^2
' working on Code Abby problem 54 to reverse engineer the sum of a triple start 12/31/14
'ie given 12 figure it is the 3, 4, 5 P3 and answer 25 is the square of the hypotenuse C
'ie given 30 figure it is the 5, 12, 13 P3 and answer back 169 (13^2)
'
' I still don't have a clue how to deconstruct the sum for very large numbers so I will
' construct ALL Pythagorean Triples using formulas:   (and see what comes up)
' a=m^2-n^2
' b=2*m*n
' c=m^2+n^2
'
' m&n rules:
' m>n
' m-n = odd
' m & n are coprime (GCD=1 Oh that again! lets find that on Bpf)
'
' B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+B+

func ri(a, b, c)
 local s = 1/2 * (a + b + c)
 ri = ( (s-a)*(s-b)*(s-c)/s ) ^ .5
end

func ro(a, b, c)
 local s = 1/2 * (a + b + c)
 ro = a*b*c/( 4* ( s*(s-a)*(s-b)*(s-c) ) ^ .5 )
end

n=1
repeat
 m=n+1
 repeat
    while (m-n) mod 2=0 or GCD(m,n)<>1
       m+=1
    wend
    a=m^2-n^2
    b=2*m*n
    c=m^2+n^2
    ?
    ? "a, b, c = ";a;", ";b;", ";c
    ? "Check a^2 + b^2 = ";a^2;" + ";b^2;" = ";a^2+b^2;"   and c^2 = ";c^2
    ? " ri = ";ri(a, b, c)
    ? " .5*c ro = ";.5*c;"  and ro(a, b, c) = ";ro(a, b, c)
    ? " ri / ro = ";ri(a, b, c)/(.5*c)
    input "press enter to continue, any + enter to quit ";cont
    if len(cont) then end
    m+=1
 until m>50
 'if n mod 50 =0 then print n 'progess report
 n+=1
until n>50

func GCD(p,q)
 local r
 repeat
   r=p mod q
   p=q
   q=r
 until r=0
 GCD=p
end

ri is acting very predictable an integer-ish with these triples! and of course ro is only half wrong as integer Wink


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Algeria Weather
QB64 Member Project - Domain
QB64 Member Project - Blokus
QB64 Member Project - Othello
QB64 Member Project - Quarto
QB64 Member Project - Dreamy Clock
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Spiro Roses
QB64 Member Project - Connect Four
QB64 Member Project - Input
QB64 Member Project - Splatter
QB64 Member Project - Martin Fractals version two
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - ARB Checkers
QB64 Member Project - Bowditch curve
QB64 Member Project - Color Triangles
QB64 Member Project - Color Rotating Text
QB64 Member Project - 9 Board
QB64 Member Project - Line Thickness
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Basic Dithering
QB64 Member Project - Dakapo
QB64 Member Project - Pivet version one
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Isolation
QB64 Member Project - Score 4
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Overboard
QB64 Member Project - Swirl
QB64 Member Project - Kings Court
QB64 Member Project - Touche
QB64 Member Project - Amazon
QB64 Member Project - Foursight
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Kings Vallery version two
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Rotating Background
QB64 Member Project - Kings Valley verion one
QB64 Member Project - Exit
QB64 Member Project - Point Blank
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Rubix's Magic
QB64 Member Project - Qubic
QB64 Member Project - Inside Moves
QB64 Member Project - Pivot version two
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Sabotage