TransWikia.com

tkz-euclide drawing compass-mark like for Arc construction

TeX - LaTeX Asked on March 13, 2021

i would like the arcs to appeared only on points I and J
(with dash or not like in the manual example) but not as on the first tex-output. the long lines of circles are not needed. i just would like to show how to get I and J points to determine the Cm point on triangle.

here is my code :

   documentclass{standalone}
   usepackage{tkz-euclide}
   begin{document}

   begin{tikzpicture}[scale=2]

    %triangle
    tkzDefPoint(4,2){A}
    tkzDefPoint(8,3){B}
    tkzDefPoint(6,5){C}
    tkzDrawPolygon(A,B,C)
    tkzDrawPoints(A,B,C)

    %point Cm
    %intersect circles
    tkzInterCC(A,B)(B,A) tkzGetPoints{I}{J}
    %median line
    tkzDrawLine[color=green!50!black,dashed, add=.04 and .04](I,J)

    %test arcs (type compass)
    tkzSetUpCompass[color=blue] %blue don't show up :-(
    tkzDrawArc[delta=10](A,B)(I)
    tkzDrawArc[delta=8](B,I)(A)
    tkzDrawArc[delta=10](B,A)(J)
    tkzDrawArc[delta=8](A,J)(B)
    
    %label points
    tkzLabelPoints[below left](A)
    tkzLabelPoints[below right](B) 
    tkzLabelPoints[above right=2mm](C)
    tkzLabelPoint[above left, red](I){$I$}
    tkzLabelPoint[below right, red](J){$J$}
    tkzDrawPoints(I,J)

    %spec signs
    node[magenta] at ($(A)!0.25!(B)$){$/$};
    node[magenta] at ($(A)!0.75!(B)$){$/$};    
    
    %median line C-Cm
    coordinate (Cm) at ($1/2*(A)+1/2*(B)$);
    tkzDrawPoint(Cm)
    tkzDrawLine[dashed, color=red, add=.1 and .15](C,Cm)
    tkzLabelPoints[below right=2mm, magenta](Cm){$C_m$}

    end{tikzpicture}
    end{document}

enter image description here
enter image description here

One Answer

Rather then tkzDrawArc you need to use tkzCompass, tkzCompass[length=1](A,I) add an arc of compass with length of 1, the center is A and passes through I.

documentclass{standalone}
usepackage{tkz-euclide}
begin{document}

begin{tikzpicture}[scale=2]

%triangle
tkzDefPoint(4,2){A}
tkzDefPoint(8,3){B}
tkzDefPoint(6,5){C}
tkzDrawPolygon(A,B,C)
tkzDrawPoints(A,B,C)

%point Cm
%intersect circles
tkzInterCC(A,B)(B,A) tkzGetPoints{I}{J}
%median line
tkzDrawLine[color=green!50!black,dashed, add=.04 and .04](I,J)

%test arcs (type compass)
tkzSetUpCompass[color=blue] %blue don't show up :-(
tkzCompass[length=1](A,I)
tkzCompass[length=1](B,I)
tkzCompass[length=1](A,J)
tkzCompass[length=1](B,J)    
%tkzDrawArc[delta=10](A,B)(I)
%tkzDrawArc[delta=8](B,I)(A)
%tkzDrawArc[delta=10](B,A)(J)
%tkzDrawArc[delta=8](A,J)(B)

%label points
tkzLabelPoints[below left](A)
tkzLabelPoints[below right](B) 
tkzLabelPoints[above right=2mm](C)
tkzLabelPoint[above left, red](I){$I$}
tkzLabelPoint[below right, red](J){$J$}
tkzDrawPoints(I,J)

%spec signs
node[magenta] at ($(A)!0.25!(B)$){$/$};
node[magenta] at ($(A)!0.75!(B)$){$/$};    

%median line C-Cm
coordinate (Cm) at ($1/2*(A)+1/2*(B)$);
tkzDrawPoint(Cm)
tkzDrawLine[dashed, color=red, add=.1 and .15](C,Cm)
tkzLabelPoints[below right=2mm, magenta](Cm){$C_m$}

end{tikzpicture}
end{document}

 

Correct answer by Salim Bou on March 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP