diff options
author | Karl Berry <karl@freefriends.org> | 2011-06-06 17:17:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-06-06 17:17:55 +0000 |
commit | 1116c441adede647c4931c6553046c8d9eb53e0c (patch) | |
tree | eecba89f578294208292dcfcc70db6b8fb3432e8 /Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-addpoints.tex | |
parent | 68598d9c664b3d4c11acabdd625b410e3f3d696a (diff) |
new graphics package tkz-euclide (5jun11)
git-svn-id: svn://tug.org/texlive/trunk@22830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-addpoints.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-addpoints.tex | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-addpoints.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-addpoints.tex new file mode 100644 index 00000000000..529040ecaf6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-addpoints.tex @@ -0,0 +1,159 @@ +% Copyright 2011 by Alain Matthes +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. + + +\def\fileversion{1.16 c} +\def\filedate{2011/06/01} + + +%<--------------------------------------------------------------------------–> +% Specific points +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +% barycentre +%<--------------------------------------------------------------------------–> +\def\tkzDefBarycentricPoint(#1){% + \path[coordinate] (barycentric cs:#1) coordinate (tkzPointResult); +} +\let\tkzDefBCPoint\tkzDefBarycentricPoint +%<--------------------------------------------------------------------------–> +% milieu de deux points %<--------------------------------------------------------------------------–> +% possible \coordinate (#3) at ($(#1)!0.5!(#2)$); +%<--------------------------------------------------------------------------–> +\def\tkzDefMidPoint(#1,#2){\path (#1) -- (#2) coordinate[pos=.5](tkzPointResult);}% +%<--------------------------------------------------------------------------–> + +%<--------------------------------------------------------------------------–> +% OrthoCenter +%<--------------------------------------------------------------------------–> +\def\tkzOrthoCenter(#1,#2,#3){% + \begingroup + \tkzUProjection(#1,#2)(#3)\tkzGetPoint{tkz@oca} + \tkzUProjection(#1,#3)(#2)\tkzGetPoint{tkz@ocb} + \tkzInterLL(#2,tkz@ocb)(#3,tkz@oca) + \endgroup +} +%<--------------------------------------------------------------------------–> +% GravityCenter +%<--------------------------------------------------------------------------–> +\def\tkzCentroid(#1,#2,#3){% + \begingroup + \tkzDefMidPoint(#3,#2)\tkzGetPoint{tkz@mida} + \tkzDefMidPoint(#1,#2)\tkzGetPoint{tkz@midb} + \tkzInterLL(#1,tkz@mida)(#3,tkz@midb)% + \endgroup +} +%<--------------------------------------------------------------------------–> +% CircumCenter +%<--------------------------------------------------------------------------–> +\def\tkzCircumCenter(#1,#2,#3){% + \begingroup + \tkzDefMediatorLine(#1,#2) + \tkzGetPoints{tkz@dir}{tkz@dil} + \tkzDefMediatorLine(#1,#3) + \tkzGetPoints{tkz@diir}{tkz@diil} + \tkzInterLL(tkz@dir,tkz@dil)(tkz@diir,tkz@diil)% + \endgroup +} +%<--------------------------------------------------------------------------–> +% InCenter +%<--------------------------------------------------------------------------–> +\def\tkzInCenter(#1,#2,#3){% +\begingroup + \tkzDefBisectorLine(#3,#1,#2) \tkzGetPoint{tkz@ia} + \tkzDefBisectorLine(#3,#2,#1)\tkzGetPoint{tkz@ib} + \tkzInterLL(#1,tkz@ia)(#2,tkz@ib) +\endgroup +} + +%<--------------------------------------------------------------------------–> +% EulerCenter +%<--------------------------------------------------------------------------–> +\def\tkzEulerCenter(#1,#2,#3){% +\begingroup + \tkzCircumCenter(#1,#2,#3) + \tkzGetPoint{tkz@ca} + \tkzOrthoCenter(#1,#2,#3) + \tkzGetPoint{tkz@cb} + \tkzDefMidPoint(tkz@ca,tkz@cb) + \tkzDrawPoint(tkzPointResult) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Apollonius center +%<--------------------------------------------------------------------------–> +\def\tkzApolloniusCenter(#1,#2){% +\begingroup + \tkz@VecK[\tkz@koeff/(1+\tkz@koeff)](#1,#2){tkzFirstPointResult} + \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2){tkzSecondPointResult} + \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Orthogonal center +%<--------------------------------------------------------------------------–> +\def\tkzOrthogonalCenter(#1,#2){% +\begingroup + \tkz@VecK[\tkz@koeff/(1+\tkz@koeff)](#1,#2){tkzFirstPointResult} + \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2){tkzSecondPointResult} + \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Internal Similitude center +%<--------------------------------------------------------------------------–> +\def\tkzIntSimilitudeCenter(#1,#2)(#3,#4){% +\begingroup +\path[coordinate] (barycentric cs:#1=#4,#3=#2) coordinate (tkzPointResult); +\endgroup +} +%<--------------------------------------------------------------------------–> +% External Similitude center +%<--------------------------------------------------------------------------–> +\def\tkzExtSimilitudeCenter(#1,#2)(#3,#4){% +\begingroup + \path[coordinate] (barycentric cs:#1=-#4,#3=#2) coordinate (tkzPointResult); +\endgroup +} +%<--------------------------------------------------------------------------–> +% equi points +%<--------------------------------------------------------------------------–> +% draw ? show ? + + +\pgfkeys{ + /tkzEquiPt/.cd, + from/.code = {\def\tkz@frompoint{#1}}, + dist/.code = {\def\tkz@equ@dist{#1}}, + show/.is if = tkz@equi@show, + show/.default = true, + /tkzEquiPt/.unknown/.code = {\let\searchname=\pgfkeyscurrentname + \pgfkeysalso{\searchname/.try=#1, + /compass/\searchname/.retry=#1, + /tikz/\searchname/.retry=#1}} + } + +\def\tkzDefEquiPoints{\pgfutil@ifnextchar[{\tkz@DefEquiPoints}{% + \tkz@DefEquiPoints[]}} +\def\tkz@DefEquiPoints[#1](#2,#3){% +\pgfkeys{/tkzEquiPt/.cd,dist = 2,show=false} +\pgfqkeys{/tkzEquiPt}{#1} +\begingroup + \tkzProjection(#2,#3)(\tkz@frompoint){tkzEQpoint} + \tkzVecKNorm[\tkz@equ@dist](tkzEQpoint,#2){tkzFirstPointResult} + \tkzVecKNorm[-\tkz@equ@dist](tkzEQpoint,#2){tkzSecondPointResult} + \iftkz@equi@show + \tkzCompass[#1](\tkz@frompoint,tkzFirstPointResult) + \tkzCompass[#1](\tkz@frompoint,tkzSecondPointResult) + \fi +\endgroup +} + +\endinput + + +% tkz@equi@show
\ No newline at end of file |