포인트에 더 가까워지고 싶다디를 사용하여 나침반 표시가 나타납니다 \tkzShowLine[orthogonal....]
. 불행하게도 다음 최소 예에서 볼 수 있듯이 이 옵션은 size=
아무런 효과가 없습니다.
미리 감사드립니다!
\documentclass{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,3/0/B,0/3/C, 1.5/1.5/D}
\tkzDefPointWith[orthogonal](D,B) \tkzGetPoint{E}
\tkzShowLine[orthogonal=through D,size=.5,color=orange,gap=-2](B,C)
\tkzShowLine[orthogonal=through D,size=2.5,color=red,gap=-3](B,C)
\tkzShowLine[orthogonal=through D,size=100,color=green,gap=-4](B,C)
\tkzDrawPolygon(A,B,C)
\tkzDrawPoints(A,B,C,E,D)
\tkzDrawLine[color=blue](A,E)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B,E)
\tkzLabelPoints[above left](C)
\tkzLabelPoints[below](D)
\end{tikzpicture}
\end{document}
답변1
이 그림에는 네 개의 나침반 표시가 있습니다. 를 사용하여 4개 표시의 길이를 수정할 수 있습니다 length
. 그런 다음 선(BC)에서 표시의 거리를 다음을 사용하여 수정할 수 있습니다. size
(안타깝게도 약간의 코드를 잊어버렸고 size
최신 버전에서도 작동하지 않습니다. 코드를 수정합니다. 오늘은 gap
D로 마지막 두 표시로 거리를 수정하는 옵션 입니다.
다음 코드는 새 버전으로 컴파일됩니다. 여기 CTAN에서번호 버전은 3.01c입니다. 아래 코드는 다음주 버전 3.02에 소개될 예정입니다. 계수를 잊어버렸어요\tkz@show@size
\documentclass{standalone}
\usepackage{tkz-euclide}
\makeatletter
\def\tkzShowOrthLine{\pgfutil@ifnextchar[{\tkz@ShowOrthLine}{\tkz@ShowOrthLine[]}}
\def\tkz@ShowOrthLine[#1](#2,#3)(#4){%
\begingroup
\pgfkeys{show/.cd,
ratio = .75,
length = 1,
gap = -1,
size = 1}
\pgfkeys{show/.cd,#1}
\tkzVecKOrth(#2,#3)
\pgfnodealias{tkz@OLtmp}{tkzPointResult}
\tkz@VecKCoLinear[1](#2,tkz@OLtmp,#4)
\pgfnodealias{tkzPointCo}{tkzPointResult}
\tkzInterLL(#2,#3)(#4,tkzPointCo)
\pgfnodealias{tkzPOpoint}{tkzPointResult}
\tkzCalcLength(#4,tkzPOpoint)
\tkzGetLength{tkz@mathLen}
\tkz@VecKNorm[1](#2,#3)
\pgfnodealias{PO@tmp}{tkzPointResult}
\tkz@VecKCoLinear[1](#2,PO@tmp,tkzPOpoint)
\pgfnodealias{PO@tmp2}{tkzPointResult}
\tkz@VecKCoLinear[-1](#2,PO@tmp,tkzPOpoint)
\pgfnodealias{PO@tmp1}{tkzPointResult}
\tkz@VecKCoLinear[\tkz@show@size](tkzPOpoint,PO@tmp1,tkzPOpoint)
\pgfnodealias{PO@1}{tkzPointResult}
\tkz@VecKCoLinear[\tkz@show@size](tkzPOpoint,PO@tmp2,tkzPOpoint)
\pgfnodealias{PO@2}{tkzPointResult}
\ifdim\tkz@mathLen pt>10 pt\relax
\tkz@VecKNorm[1](#4,tkzPOpoint)
\pgfnodealias{PO@tmp1}{tkzPointResult}
\else
\tkz@VecKOrthNorm[1](tkzPOpoint,PO@2)
\pgfnodealias{PO@tmp1}{tkzPointResult}
\fi
\tkz@VecKCoLinear[-\tkz@show@gap](PO@tmp1,tkzPOpoint,tkzPOpoint)
\pgfnodealias{PO@3}{tkzPointResult}
\tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@1)
\tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@2)
\tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](PO@1,PO@3)
\tkzCompass[#1,length=\tkz@show@length](PO@2,PO@3)
\endgroup
}
\makeatother
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,3/0/B,0/3/C, 1.5/1.5/D}
\tkzDefPointWith[orthogonal](D,B) \tkzGetPoint{E}
\tkzShowLine[orthogonal=through D,color=orange,length=.5,size=1,gap=-1](B,C)
\tkzShowLine[orthogonal=through D,color=green,length=.75,size=.5,gap=-.75](B,C)
\tkzDrawPolygon(A,B,C)
\tkzDrawPoints(A,B,C,E,D)
\tkzDrawLine[color=blue](A,E)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B,E)
\tkzLabelPoints[above left](C)
\tkzLabelPoints[below](D)
\end{tikzpicture}
\end{document}