summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-news.tex
blob: a36ade459be172a0a79589ce792f05fc88366ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
\section*{News and compatibility}

\subsection{With 4.2 version} % (fold)
\label{sub:with_4_2_version}

Some changes have been made to make the syntax more homogeneous and especially to distinguish the definition and search for coordinates from the rest, i.e. drawing, marking and labelling.
Now the definition macros are isolated, it will be easier to introduce a phase of coordinate calculations using \tkzimp{Lua}.

Here are some of the changes. 
\vspace{1cm}
 \begin{itemize}\setlength{\itemsep}{10pt} 
  

\item I recently discovered a problem when using the "scale" option. When plotting certain figures with certain tools, extensive use of |pgfmathreciprocal| involves small computational errors but can add up and render the figures unfit. Here is how to proceed to avoid these problems:
\begin{enumerate}
  
  \item On my side I introduced a patch proposed by Muzimuzhi that modifies 
|pgfmathreciprocal|;

\item  Another idea proposed by Muzimuzhi is to pass as an option for the |tikzpicture| environment this |/pgf/fpu/install only={reciprocal}| after loading of course the |fpu| library;

\item I have in the methods chosen to define my macros tried to avoid as much as possible the use of |pgfmathreciprocal|;

\item  There is still a foolproof method which consists in avoiding the use of |scale = ...|. It's quite easy if, like me, you only work with fixed points fixed at the beginning of your code. The size of your figure depends only on these fixed points so you just have to adapt the coordinates of these.
\end{enumerate}

\item Now |\tkzDefCircle| gives two points as results: the center of the circle and a point of the circle. When a point of the circle is known, it is enough to use |\tkzGetPoint| or |\tkzGetFirstPoint|
to get the center, otherwise |\tkzGetPoints| will give you the center and a point of the circle. You can always get the length of the radius with |\tkzGetLength|. I wanted to favor working with nodes and banish the appearance of numbers in the code.

\item  In order to isolate the definitions, I deleted or modified certain macros which are: |\tkzDrawLine|, |\tkzDrawTriangle|, |\tkzDrawCircle|, |\tkzDrawSemiCircle| and  |\tkzDrawRectangle|;

Thus |\tkzDrawSquare(A,B)| becomes |\tkzDefSquare(A,B)||\tkzGetPoints{C}{D}| then

 |\tkzDrawPolygon(A,B,C,D)|;

If you want to draw a circle, you can't do so |\tkzDrawCircle[R](A,1)|. First you have to define the point through which the circle passes, so you have to do 
|\tkzDefCircle[R](A,1)| |\tkzGetPoint{a}| and finally |\tkzDrawCircle(A,a)|. Another possibilty is to define a point on the circle |\tkzDefShiftPoint[A](1,O){a}|;


\item The following macros  |tkzDefCircleBy[orthogonal through]| and |\tkzDefCircleBy[orthogonal from]| become |tkzDefCircle[orthogonal through]| and |\tkzDefCircle[orthogonal from]| ;


\item |\tkzDefLine[euler](A,B,C)| is a macro that allows you to obtain the line of \tkzname{Euler} when possible. |\tkzDefLine[altitude](A,B,C)| is possible again, as well as |\tkzDefLine[tangent at=A](O)| and |\tkzDefLine[tangent from=P](O,A)| which did not works;


\item | \tkzDefTangent| is replaced by |\tkzDelLine[tangent from = ...]| or |\tkzDelLine[tangent at = ...]|;


\item I added the macro |\tkzPicAngle[tikz options](A,B,C)| for those who prefer to use  \TIKZ ;


\item The macro |\tkzMarkAngle| has been corrected;

\item The macro linked to the \tkzname{apollonius} option of the |\tkzDefCircle| command has been rewritten;

\item (4.23) The macro |\tkzDrawSemiCircle| has been corrected;

\item 
The order of the arguments of the macro \tkzcname{tkzDefPointOnCircle} has changed: now it is center, angle and point or radius.
I have added two options for working with radians which are \tkzname{through in rad} and \tkzname{R in rad}.


\item I added the option \tkzname{reverse} to the arcs paths. This allows to reverse the path and to reverse if necessary the arrows that would be present.


\item I have unified the styles for the labels. There is now only \tkzname{label style} left which is valid for points, segments, lines, circles and angles. I have deleted \tkzname{label seg style} \tkzname{label line style} and \tkzname{label angle style}

\item I added the macro |tkzFillAngles| to use several angles.

\item Correction option \tkzname{return} witk \tkzcname{tkzProtractor}

As a reminder, the following changes have been made previously:
  
 \item  |\tkzDrawMedian|, |\tkzDrawBisector|, |\tkzDrawAltitude|, |\tkzDrawMedians|, |\tkzDrawBisectors| et  |\tkzDrawAltitudes| do not exist anymore. The creation and drawing separation is not respected so it is preferable to first create the coordinates of these points with |\tkzDefSpcTriangle[median]| and then to choose the ones you are going to draw with |\tkzDrawSegments| or |\tkzDrawLines|;
 
\item |\tkzDrawTriangle| has been deleted.  |\tkzDrawTriangle[equilateral]| was handy but it is better to get the third point with |\tkzDefTriangle[equilateral]| and then draw with |\tkzDrawPolygon|; idem for |\tkzDrawSquare| and |\tkzDrawGoldRectangle|; 


\item The circle inversion was badly defined so I rewrote the macro. The input arguments are always the center and a point of the circle, the output arguments are the center of the image circle and a point of the image circle or two points of the image line if the antecedent circle passes through the pole of the inversion. If the circle passes the inversion center, the image is a straight line, the validity of the procedure depends on the choice of the point on the antecedent circle; 

\item Correct allocation for gold sublime and euclide triangles;


\item I added the option " next to" for the intersections LC and CC;


\item Correction option isoceles right;

\item (4.22 and 4.23) Correction of the macro |\tkzMarkAngle|;


\item |\tkzDefMidArc(O,A,B)| gives the middle of the arc center $O$ from $A$ to $B$; 

\item Good news : Some useful tools have been added. They are present on an experimental basis and will undoubtedly need to be improved;


\item The options "orthogonal from and through" depend now of \tkzcname{tkzDefCircleBy}

\begin{enumerate}
  
  \item |\tkzDotProduct(A,B,C)| computes the scalar product in an orthogonal reference system of the vectors $\overrightarrow{A,B}$ and $\overrightarrow{A,C}$. 
  
  |\tkzDotProduct(A,B,C)=aa'+bb' if vec{AB} =(a,b) and vec{AC} =(a',b')|
  
  
  \item |\tkzPowerCircle(A)(B,C)| power of point $A$ with respect to the circle of center $B$ passing through $C$;
  
  
  \item |\tkzDefRadicalAxis(A,B)(C,D)| Radical axis of two circles of center $A$ and $C$;


\item (4.23) The macro |tkzDefRadicalAxis| has been completed
  
  \item Some tests : |\tkzIsOrtho(A,B,C)| and |\tkzIsLinear(A,B,C)| The first indicates whether the lines $(A,B)$ and $(A,C)$ are orthogonal. The second indicates whether the points $A$, $B$ and $C$ are aligned;

 |\tkzIsLinear(A,B,C)| if $A$,$B$,$C$ are aligned then |\tkzLineartrue|
  you can use |\iftkzLinear| (idem for |\tkzIsOrtho|);

\item A style for vectors has been added that you can of course modify
|tikzset{vector style/.style={>=Latex,->}}|;


\item Now it's possible to add an arrow on a line or a circle with the option |tkz arrow|. 
\end{enumerate}
\end{itemize}

% subsection with_4_2_version (end)
\subsection{Changes with previous versions} % (fold)
\label{sub:changes_with_previous_versions}

\vspace{1cm}
 \begin{itemize}\setlength{\itemsep}{10pt} 

\item I remind you that an important  novelty is the recent replacement of the \tkzNamePack{fp} package by \tkzNamePack{xfp}.  This is to improve the calculations a little bit more and to make it easier to use;


\item First of all, you don’t have to deal with \TIKZ\ the size of the bounding box. Early versions of \tkzname{\tkznameofpack} did not control the size of the bounding box, The bounding box is now controlled in each macro (hopefully) to avoid the use of \tkzcname{tkzInit} followed by \tkzcname{tkzClip};

\item  With \tkzimp{tkz-euclide} loads all objects, so there's no need to place \tkzcname{usetkzobj\{all\}};

\item Added macros for the bounding box: \tkzcname{tkzSaveBB} \tkzcname{tkzClipBB} and so on;

\item  Logically most macros accept \TIKZ\ options. So I removed the "duplicate" options when possible thus the "label options" option is removed;

\item The unit is now the cm;

\item |\tkzCalcLength| |\tkzGetLength| gives result in cm;

\item  |\tkzMarkArc| and |\tkzLabelArc| are new macros;

\item Now |\tkzClipCircle| and |\tkzClipPolygon| have an option \tkzimp{out}. To use this option you must have a Bounding Box that contains the object on which the Clip action will be performed. This can be done by using an object that encompasses the figure or by using the macro \tkzcname{tkzInit};


\item The options \tkzname{end} and \tkzname{start} which allowed to give a label to a straight  line are removed. You now have to use the macro \tkzcname{tkzLabelLine};

\item Introduction of the libraries \NameLib{quotes} and \NameLib{angles}; it allows to give a label to a point, even if I am not in favour of this practice;

\item  The notion of vector disappears, to draw a vector just pass "->" as an option to \tkzcname{tkzDrawSegment};


\item |\tkzDefIntSimilitudeCenter| and |\tkzDefExtSimilitudeCenter|  do not exist anymore, now you need to use  |\tkzDefSimilitudeCenter[int]| or |\tkzDefSimilitudeCenter[ext]|;
  
\item |\tkzDefRandPointOn| is replaced by |\tkzGetRandPointOn|;


\item An option of the macro \tkzcname{tkzDefTriangle} has changed, in the previous version the option was "euclide" with an "e". Now it's "euclid";

\item Random points are now in \tkzname{\tkznameofpack} and the macro \tkzcname{tkzGetRandPointOn} is replaced by

 \tkzcname{tkzDefRandPointOn}. For homogeneity reasons, the points must be retrieved with \tkzcname{tkzGetPoint};

\item New macros have been added : \tkzcname{tkzDrawSemiCircles}, \tkzcname{tkzDrawPolygons}, \tkzcname{tkzDrawTriangles};


\item Option "isosceles right" is a new option of the macro \tkzcname{tkzDefTriangle};

\item Appearance of the macro \tkzcname{usetkztool} which allows to load new "tools";

\item The styles can be modified with the help of the following macros : \tkzcname{tkzSetUpPoint}, \tkzcname{tkzSetUpLine}, \tkzcname{tkzSetUpArc}, \tkzcname{tkzSetUpCompass}, \tkzcname{tkzSetUpLabel} and \tkzcname{tkzSetUpStyle}. The last one allows you to create a new style.
\end{itemize}
% subsection changes_with_previous_versions (end)

\endinput