Fehler in tkz-euclide? \tkzInterLL(S1,S2)(L,K) funktioniert nicht, wenn Punkte durch \tkzDefBarycentricPoint(A=1,D=2) \tkzGetPoint{K} definiert sind

Fehler in tkz-euclide? \tkzInterLL(S1,S2)(L,K) funktioniert nicht, wenn Punkte durch \tkzDefBarycentricPoint(A=1,D=2) \tkzGetPoint{K} definiert sind

Ich habe diese Übung gemacht, um den Schnittpunkt zwischen einer Linie und einer Ebene zu finden.

Bildbeschreibung hier eingeben

Mit diesem Code:

\documentclass[9pt,handout]{beamer}
\usepackage{tkz-base}
\usepackage{pgf,tkz-euclide}
\usetkzobj{all}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{frame}
\begin{center}
\begin{tikzpicture}
\tkzInit[ymax=7,xmax=9]
\tkzDefPoints{1/0/A, 6/0/B, 6/5/C, 1/5/D}
\tkzDefShiftPoint[A](30:2.5){E};
\tkzDefShiftPoint[B](30:2.5){F};
\tkzDefShiftPoint[C](30:2.5){G};
\tkzDefShiftPoint[D](30:2.5){H};

%%bepalen van lijstuk [ST]    
\tkzDefBarycentricPoint(A=1,D=2) \tkzGetPoint{K};
\tkzDrawPoints(K)
\tkzLabelPoints[left](K)
\tkzDefBarycentricPoint(E=1,F=-2.5) \tkzGetPoint{L};
\tkzDrawPoints(L)
\tkzLabelPoints[above](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);
%\tkzDrawPoints(A,B,C,D,E,F,G,H);
\tkzLabelPoints[above](C,D,G,H);
\tkzLabelPoints[below](A,B,E,F);  \pause

%%% tekenen van het hulpvlak
\tkzDrawPolygon[color=green,thick](A,D,L); \pause
\tkzDefShiftPoint[L](90:5){K};
\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};
\tkzDrawPoint[color=red,size=8,fill=red](S1);
\tkzLabelPoint[color=red,above](S1) {S$_1$}; \pause
\tkzDrawPoint[color=red,size=8,fill=red](S2);
\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
\tkzDrawPoint[color=red,size=10,fill=red](S)
\tkzLabelPoints[color=red,right](S) 
\end{tikzpicture}
\end{center}
\end{frame}

\end{document} 

Wie Sie in meinem Code lesen können, funktioniert die Schnittmenge zwischen KLund S1S2nicht. Ich habe alle anderen Punkte (H, G, D, C, ...) getestet, aber das einzige, was nicht funktioniert, ist die Verwendung von KL. Seltsamerweise sind K und L definiert durch

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

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

Ich könnte den Punkt auf einfache Weise definieren K, möchte aber wissen, warum das nicht funktioniert. (in der Fehlerdatei steht FP error: Division by zero!.: „Ergibt das für mich keinen Sinn?“)

Antwort1

Das Problem besteht darin, dass Sie Kdurch neu definieren \tkzDefShiftPoint[L](90:5){K};und daher die Linien (K,L)und (S1,S2)parallel sind, sodass \tkzInterLL(S1,S2)(L,K)undefiniert ist.

verwandte Informationen