Drawing a Line Segment From a Point on a Curve to a Line

eugbug shared this question 5 months ago

I'm dropping a line segment perpendicularly from a point on a parabola to the directrix.

I have used the segment command with the point P as one of the arguments and the other argument is an imaginary point on the directrix. (named "Directrix")

So I have g = segment (P, (x(P), y(Directrix))) but this doesn't work properly.

Then I tried to draw a line segment with a certain length because this is the other usage of the segment command. However how does the command know which direction to draw the line segment if only a point and length are the argument?

This is the syntax in the Wiki.

I have:

g = segment (P, y(P) - y(Directrix)) which doesn't work either.

Link attached:


Comments (2)


Maybe you are looking for this:

p=Segment(P, ClosestPoint(Directrix,P))

If you need the point on the Directrix explicit then

P_2= Point(p,1) or P_2 = ClosestPoint(Directrix, P)

Note: ClosestPoint() works also here


Thanks. Another alternative is mathmagic's suggestion here, drawing a line, using the resulting intersection point to give the two necessary points to draw a line segment , then hiding the line:


© 2020 International GeoGebra Institute