Math problems with lines and circles
Alright, I''m trying to get ahead of calculus next year by begin studying some of it in the summer, and I know a lot of you don''t like answering "homework problems" but the thing is, this isn''t homework, so much as it is self study. Plus, I think it is important for me to know this stuff when I begin 2d graphics programming. Anyway here goes:
The problem says "Find the distance from the point (-2,1) to the line 3x+4y=8" and the answer for the problem is ''2''. But how can there be a finite distance from a point to a line? I mean, the distance between that point and the line depends on what point on the line you are measuring right? So how can there be a specific distance from one point to an entire line?
The second problem is "Find the equation of a circle through the points (1,5), (2,4) and (-2, 6)" I know the formula for a circle (x-h)^2+(y-k)^2=r^2 but I don''t know how to apply it to this problem, or even if it does apply. Any answers to any or both of these questions would be most appreciated.
--BioagentX
There are three types of people in this world, those who can count, and those who can't
The distance is from the point (P) to the NEAREST point (N) in the line ... of course. By symetry PN is PERPendicular to your line (with vector V). This means the dot product PN*V is null. Thus you get nearly the answer ... work a bit
Now the sphere. Again this is about hidden right angles you should be wise enough to detect. D, E, F belong to your circle C(center), R(adius). Well the right lines that cut DE and EF in two parts (perpendicular and cross the middle) each meet the center C BECAUSE D,E,F all belong to the circle. Thus you must intersect these two lines and you get C. Then just compute the length of CD for instance and you get R.
[edited by - Charles B on June 20, 2003 2:29:00 PM]
Now the sphere. Again this is about hidden right angles you should be wise enough to detect. D, E, F belong to your circle C(center), R(adius). Well the right lines that cut DE and EF in two parts (perpendicular and cross the middle) each meet the center C BECAUSE D,E,F all belong to the circle. Thus you must intersect these two lines and you get C. Then just compute the length of CD for instance and you get R.
[edited by - Charles B on June 20, 2003 2:29:00 PM]
"Coding math tricks in asm is more fun than Java"
for the first one: When referring to the distance between a point and a line, you take the _shortest_ distance, which is the distance to the point that is the ortgogonal projection of the point on the line. Look here for a more professionnal explanation.
As for the second question: Take the general circle formula and substitute the coordinates of the given points. You should have 3 equations with 3 variables. They should be solvable with some work.
Click NOW!
As for the second question: Take the general circle formula and substitute the coordinates of the given points. You should have 3 equations with 3 variables. They should be solvable with some work.
Click NOW!
quote:
So how can there be a specific distance from one point to an entire line?
What they mean is the perpendicular distance from the line to the point. That is, draw a line from the point to the line so it crosses at a perpangle. Now, I have checked and the distance is right (''2''). Try to solve it by yourself, then I''ll help.
/Mankind gave birth to God.
/Mankind gave birth to God.
In response to your first problem: whenever a problem is asking to find the distance from a point to a line, it is asking the for the shortest distance. In the case of a point to the line, the shortest distance will be the perpendicular to the line through the point. So, here''s the plan:
1) Find the equation of the perpendicular line
a) You know the slope of the original line if you put it into slope intercept form.
b) The slope of the perpendicular line will be the inverse reciprocal.
c) Once you have the new slope, you can find the equation of the line since you have a point and a slope.
2) Find the point where the two lines intersect. There are a variety of ways to do this, but if you have both equations in slope intercept form, then you can set them equal, and solve for x:
m1 * x + b1 = m2 * x + b2
3) Find the distance from the given point and the point of intersection:
distance = sqrt( (x1 - x2)^2 + (y1 - y2)^2 )
Hope this helps with the first problem.
1) Find the equation of the perpendicular line
a) You know the slope of the original line if you put it into slope intercept form.
b) The slope of the perpendicular line will be the inverse reciprocal.
c) Once you have the new slope, you can find the equation of the line since you have a point and a slope.
2) Find the point where the two lines intersect. There are a variety of ways to do this, but if you have both equations in slope intercept form, then you can set them equal, and solve for x:
m1 * x + b1 = m2 * x + b2
3) Find the distance from the given point and the point of intersection:
distance = sqrt( (x1 - x2)^2 + (y1 - y2)^2 )
Hope this helps with the first problem.
Wow, thanks guys. I love the fact that there are so many responses. I really appreciate it.

There are three types of people in this world, those who can count, and those who can't
@swsh
So you''re saying that to find the equation of the circle, I plug in all three points and use matrices or a sytem of equations in order to find the center (h,k)? Yes, I could do that and I think I will, however, my book that I''m using now hasn''t even talked about systems of equations or matrices. Is there some easier way to do it? I know systems of equations from precal last year but this book doesn''t go over them so I think there must be another way.
So you''re saying that to find the equation of the circle, I plug in all three points and use matrices or a sytem of equations in order to find the center (h,k)? Yes, I could do that and I think I will, however, my book that I''m using now hasn''t even talked about systems of equations or matrices. Is there some easier way to do it? I know systems of equations from precal last year but this book doesn''t go over them so I think there must be another way.
There are three types of people in this world, those who can count, and those who can't
Solve it by hand. Matrices are in this case just a more simple way to do it.
/Mankind gave birth to God.
/Mankind gave birth to God.
/Mankind gave birth to God.
Well, I think Charles B gave a faster solution that doesn''t invlove solving 3 quadratic equations. When the points are a, b, c. Then construct the line perpendicular to ab that intersects ab in the middle. Construct another line pependicular to ac that intersects ac in the middle and get the intersection point of the two lines you constructed. That will be the center of the circle. Once you have the center finding the distance is trivial.
I''m searching for more fancy ways of solving this.
Click NOW!
I''m searching for more fancy ways of solving this.
Click NOW!
Ok, you could avoid calculating the middle of ab and ac:
construct a line perpendicular to ab from point b. construct a line perpendicular to ac from point c. The intersection of these lines gives you another point d that lies on the circle exacly on the opposite than a, so the radius will be |ad| / 2 and the center of the circle will be the middle of ad.
Click NOW!
construct a line perpendicular to ab from point b. construct a line perpendicular to ac from point c. The intersection of these lines gives you another point d that lies on the circle exacly on the opposite than a, so the radius will be |ad| / 2 and the center of the circle will be the middle of ad.
Click NOW!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement