Re: How to compute triangle base/altitude intersection



Balabek@xxxxxxxxx said:

Hi,

Hope you can help me solve this problem.

Suppose I have a triange ABC. I have altitude passing through vertice
C, and it intersects line AB or extension of line AB at point D.

Given coordinates of points A, B, and lengths of line segments AC, BC,
how would you calculate coordinates of point D?

Draw a circle of diameter AC about A. Draw a circle of diameter BC about B.
If the circles only touch each other tangentially, the triangle is actually
degenerate (it's just a line), and the point where they touch is D. If they
don't touch at all, there is no solution. Otherwise, they intersect at two
points, C1 and C2, and the coordinates of D are at

((C1.x + C2.x) / 2, (C1.y + C2.y) / 2)

I do have a way to compute it, but I just can't shake away this feeling
that it is not very efficient.

Measure. If your existing solution is fast *enough*, leave well alone.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • Re: For all the USA Haters out there!
    ... Draw a circle 1m in diameter. ... draw two straight line that intersects ...
    (microsoft.public.cert.exam.mcse)
  • Re: For all the USA Haters out there!
    ... Draw a circle 1m in diameter. ... that intersects both circles about 45-60 degrees apart. ...
    (microsoft.public.cert.exam.mcse)
  • Re: For all the USA Haters out there!
    ... Draw a circle 1m in diameter. ... that intersects both circles about 45-60 degrees apart. ...
    (microsoft.public.cert.exam.mcse)
  • Re: How to compute triangle base/altitude intersection
    ... Richard Heathfield wrote: ... Suppose I have a triange ABC. ... and it intersects line AB or extension of line AB at point D. ... As long as you are allowed to have AB parallel to the x-axis ...
    (comp.programming)
  • Re: 2D circle-triangle intersection test
    ... > could someone point me in the direction of a fast circle-triangle ... check if the circle's center is inside the triangle. ... the center is inside the triangle, be safe that the center intersects the ... then the circle does not intersect the sphere. ...
    (comp.graphics.algorithms)