I've made this exercise to find the intersection point between a line and a plane.

enter image description here

With this code:

\tkzDefPoints{1/0/A, 6/0/B, 6/5/C, 1/5/D}

%%bepalen van lijstuk [ST]    
\tkzDefBarycentricPoint(A=1,D=2) \tkzGetPoint{K};
\tkzDefBarycentricPoint(E=1,F=-2.5) \tkzGetPoint{L};

\tkzDrawSegments(A,B B,C C,D D,A F,G G,H B,F D,H C,G K,L);
\tkzDrawSegments[dashed](A,E E,F E,H F,L);
\tkzDrawPolygon[fill=orange!40, opacity=.4](B,C,G,F);
\tkzLabelPoints[below](A,B,E,F);  \pause

%%% tekenen van het hulpvlak
\tkzDrawPolygon[color=green,thick](A,D,L); \pause
\tkzDrawPolygon[fill=green,opacity=0.1,thick](A,D,K,L); \pause

%%% tekenen van de snijlijn
\tkzInterLL(C,G)(D,K)  \tkzGetPoint{S1};
\tkzInterLL(A,L)(B,F)  \tkzGetPoint{S2};
\tkzLabelPoint[color=red,above](S1) {S$_1$}; \pause
\tkzLabelPoint[color=red,below](S2) {S$_2$}; \pause
\tkzDrawSegment[color=red,thick](S1,S2) \pause
\tkzInterLL(S1,S2)(L,D)  \tkzGetPoint{S} %%%% <<<< this works fine, but is not correct
%\tkzInterLL(S1,S2)(L,K)  \tkzGetPoint{S} %%%% <<<< this doesn't work fine, but is correct


As you can read in my code, the intersection between KL and S1S2 is not working. I've tested every other point (H,G,D,C,...) but the only thing that doesn't work is using KL. Strange enough but K and L are defined by

\tkzDefBarycentricPoint(A=1,D=2) \tkzGetPoint{K};

\tkzDefBarycentricPoint(E=1,F=-2.5) \tkzGetPoint{L};

I could define point K in a simple way, but I want to know why this is not working. (the error file says FP error: Division by zero!., makes no sense to me?)

1 Answer 1


The problem is that you redefine K by \tkzDefShiftPoint[L](90:5){K}; and so the lines (K,L) and (S1,S2) are parallel, so \tkzInterLL(S1,S2)(L,K) is undefined.

  • Great! I overlooked my code 100 times, and didn't saw the fault :-( Thanks for solving the problem after 2 years! It is still useful Commented Mar 28, 2018 at 6:13
  • 1
    I was looking for a problem of my own \tkzInterLL, so I arrived to your question 2 years later ;)
    – Kpym
    Commented Mar 28, 2018 at 6:34
  • 1
    Advise : always use \tkzDrawPoints at the end, so the points are drawn over the lines and you can see their "final" position.
    – Kpym
    Commented Mar 28, 2018 at 6:38

You must log in to answer this question.

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