MATLAB Answers

circle with three points

22 views (last 30 days)
CaiX
CaiX on 1 Dec 2019
Answered: Image Analyst on 1 Dec 2019
Im writing a program that accepts three points (𝑥, 𝑦) on a circle in a 2- dimensional Cartesian plane as input and returns the center, radius, and vectors ABC from the general equation of a circle 𝑥^2 + 𝑦^2 + A𝑥 + B𝑦 + C = 0. I know that one can systems of linear equations to solve for ABC however, I don't know how to do it. I started with the program below:
x1 = input('\nEnter first X coordinate: ');
y1 = input('\nEnter first Y coordinate: ');
x2 = input('\nEnter second X coordinate: ');
y2 = input('\nEnter second Y coordinate: ');
x3 = input('\nEnter third X coordinate: ');
y3 = input('\nEnter third Y coordinate: ');
eq1 = x1D + y1E + F == -(x1*2)+(y1*2);
eq2 = x2D + y2E + F == -(x2*2)+(y2*2);
eq3 = x3D + y3E + F == -(x3*2)+(y3*2);
I'd appreciate any help and suggestion. Thank you very much :)

  1 Comment

Stephane
Stephane on 1 Dec 2019
An answer here (File Exchange entry) ?

Sign in to comment.

Answers (2)

Jim Riggs
Jim Riggs on 1 Dec 2019

  0 Comments

Sign in to comment.


Image Analyst
Image Analyst on 1 Dec 2019

  0 Comments

Sign in to comment.

Sign in to answer this question.