I know that \tkzDrawLine(A,B) tkz-euclide draws a line between points A and B. However, I need to draw a ray that starts at A and goes through B. How can I do this?

  • You can do that with -> in the option for drawing a segment. The code below doesn't have the arrow (to indicate the ray) you want. Replace the line in Brent's code drawing the segment with \tkzDrawSegment[->](A,C)
    – DJP
    Nov 6, 2016 at 16:00

2 Answers 2


Strictly speaking, I think, a ray is semi-infinite, and so impossible to draw. As an approximation, you can extend your line segment to a third point, and draw the 'truncated ray' thus:

\tkzDefPointBy[homothety=center A ratio 1.5](B) \tkzGetPoint{C}

image of output


Simple manner, without tkzeuclide only using [pos = x] to set the position of the point on a path

enter image description here



\node[draw,circle,label={A}] (A) at (0,0){};
\node[draw,circle,label={B}] (B) at (2,-3){};
\node[draw,circle,label={C}] (C) at (3,1){};

\draw (A) -- (C)  coordinate[pos=1.8](ff2) -- (ff2);
\path (A) -- (B) coordinate[pos=-0.5](dd) coordinate[pos=1.8](ff);
\draw (dd) -- (ff);


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .