Find the Circle that Runs through 3 Points,

25 views
Skip to first unread message

Bert Mariani

unread,
Jun 17, 2024, 10:41:34 AMJun 17
to The Ring Programming Language
Hello Mahmoud and ALL

Came across this interesting math problem:
Find the circle that runs through the points:    (5, 5), (4, 6),and (6, 2)
what is the Circle Center and Radius

  - MatrixThreePointsOnCircle.ring

Was able to solve it using a Matrix.
The matrix is generated/formatted as per the Points given
The resulting values are used to solve the circle equation.
The Solution generates the Circle Center and Radius 

===========================================
Find the circle that runs through the points
   (5, 5), (4, 6),and (6, 2)

Original Matrix U      MatrixPrint: 3x4
|  1, 5, 5,-50 |
|  1, 4, 6,-52 |
|  1, 6, 2,-40 |

Solved using RowReduceEchelonForm U => V       MatrixPrint: 3x4
|  1, 0, 0,-20 |
|  0, 1, 0,-2 |
|  0, 0, 1,-4 |

Circle Eq: c:20 gSqr:1 fSq:4 r: 5
Solution: Circle Center: 1,2  Radius: 5

=====================================
Find the circle that runs through the points
   (-6, 5), (-3, -4),and (2, 1)

Original Matrix U      MatrixPrint: 3x4
|  1,-6, 5,-61 |
|  1,-3,-4,-25 |
|  1, 2, 1,-5 |

Solved using RowReduceEchelonForm U => V       MatrixPrint: 3x4
|  1, 0, 0,-15 |
|  0, 1, 0, 6 |
|  0, 0, 1,-2 |

Circle Eq: c:15 gSqr:9 fSq:1 r: 5
Solution: Circle Center: -3,1  Radius: 5

=====================================
Find the circle that runs through the points
   (8, 7), (1, 8),and (0, 1)

Original Matrix U      MatrixPrint: 3x4
|  1, 8, 7,-113 |
|  1, 1, 8,-65 |
|  1, 0, 1,-1 |

Solved using RowReduceEchelonForm U => V       MatrixPrint: 3x4
|  1, 0, 0, 7 |
|  0, 1, 0,-8 |
|  0, 0, 1,-8 |

Circle Eq: c:-7 gSqr:16 fSq:16 r: 5
Solution: Circle Center: 4,4  Radius: 5

=====================================



CircleCenterRadius.png
MatrixThreePointsOnCircle.ring

Mahmoud Fayed

unread,
Jun 19, 2024, 5:03:11 AMJun 19
to The Ring Programming Language
Hello Bert

Thanks for sharing :D


Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages