Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 3

12 Jui, 11:35

joseph-tux's gravatar image

joseph-tux
59934168

Effectivement, c'est de la commande `\node` que vient le problème. Il faut 4 étapes, comme dans les exemples suivants: En utilisant `\path` avant `\node`, on peut déterminer l'intersection et l'utiliser avec `\node`. ![alt text][1] ![alt text][2] \documentclass[a4paper,14pt,french,landscape,DIV=18]{scrartcl} \usepackage{tcolorbox} \tcbsetforeverylayer{colback=white,colbacktitle=white,coltitle=black,colframe=gray,boxrule=0.2mm} \tcbuselibrary{skins,minted} \usepackage{tikz,pgf} \usetikzlibrary{intersections} \usetikzlibrary{arrows,shapes,snakes,calc, angles,quotes,positioning,automata,shadows,patterns} \usepackage[french]{babel} \begin{document} \section{Tests} \begin{tcblisting}{minted language=latex,listing only,title=Il faut 4 étapes,fontupper=\Large} %%% 1 on nomme 2 courbes: \draw[name path=D] (-1,2) -- (2,-1) ; \draw[name path=R] (-1,1) rectangle (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; % Les points trouvés avec intersections %%% 3 On nomme l'intersection: \coordinate [label=$C$] (I1) at (intersection-1); \coordinate [label=$C$] (I2) at (intersection-2); %%% 4 On utilise le point d'intersection: \end{tcblisting} \begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{2 droites}} \begin{tikzpicture} \draw[yellow] (-3,3) grid (3,-3); %%% 1 on nomme 2 courbes: \draw[name path=D,thin] (-1,2) -- (2,-1) ; \draw[name path=R,thin] (1,1) -- (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; %%% 3 On nomme l'intersection: \coordinate [label=above:$C$] (C) at (intersection-1); %%% 4 On utilise le point d'intersection: \draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!}; \end{tikzpicture} \end{tcblisting} %\end{tcolorbox} \begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{Une droite et un rectangle}} \begin{tikzpicture} \draw[yellow] (-3,3) grid (3,-3); %%% 1 on nomme 2 courbes: \draw[name path=D,thin] (-1,2) -- (2,-1) ; \draw[name path=R,thin] (-1,1) rectangle (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; % TODO TROUVÉ avec intersections %%% 3 On nomme l'intersection: \coordinate [label=above:$C$] (C) at (intersection-1); \coordinate [label=above:$C$] (c) at (intersection-2); %%% 4 On utilise le point d'intersection: \draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!}; \draw[green,thick,-latex] (0,0) -- (c) node[midway,left] {!}; \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{Un cercle et un rectangle}} \begin{tikzpicture} \draw[yellow] (-3,3) grid (3,-3); %%% 1 on nomme 2 courbes: \draw[name path=D,thin] (-1,2) circle (2) ; \draw[name path=R,thin] (-1,1) rectangle (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; % TODO TROUVÉ avec intersections %%% 3 On nomme l'intersection: \coordinate [label=above:$C$] (C) at (intersection-1); \coordinate [label=above:$C$] (c) at (intersection-2); %%% 4 On utilise le point d'intersection: \draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!}; \draw[green,thick,-latex] (0,0) -- (c) node[midway,left] {!}; \end{tikzpicture} \end{tcblisting} \end{document} [1]: https://texnique.fr/osqa/upfiles/Intersection.png [2]: https://texnique.fr/osqa/upfiles/IntersExemples_2.png
cliquez ici pour masquer/afficher la révision 2

12 Jui, 11:31

joseph-tux's gravatar image

joseph-tux
59934168

Il faut 4 étapes, comme dans les exemples suivants: ![alt text][1] ![alt text][2] \documentclass[a4paper,14pt,french,landscape,DIV=18]{scrartcl} \usepackage{tcolorbox} \tcbsetforeverylayer{colback=white,colbacktitle=white,coltitle=black,colframe=gray,boxrule=0.2mm} \tcbuselibrary{skins,minted} \usepackage{tikz,pgf} \usetikzlibrary{intersections} \usetikzlibrary{arrows,shapes,snakes,calc, angles,quotes,positioning,automata,shadows,patterns} \usepackage[french]{babel} \begin{document} \section{Tests} \begin{tcblisting}{minted language=latex,listing only,title=Il faut 4 étapes,fontupper=\Large} %%% 1 on nomme 2 courbes: \draw[name path=D] (-1,2) -- (2,-1) ; \draw[name path=R] (-1,1) rectangle (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; % Les points trouvés avec intersections %%% 3 On nomme l'intersection: \coordinate [label=$C$] (I1) at (intersection-1); \coordinate [label=$C$] (I2) at (intersection-2); %%% 4 On utilise le point d'intersection: \end{tcblisting} \begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{2 droites}} \begin{tikzpicture} \draw[yellow] (-3,3) grid (3,-3); %%% 1 on nomme 2 courbes: \draw[name path=D,thin] (-1,2) -- (2,-1) ; \draw[name path=R,thin] (1,1) -- (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; %%% 3 On nomme l'intersection: \coordinate [label=above:$C$] (C) at (intersection-1); %%% 4 On utilise le point d'intersection: \draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!}; \end{tikzpicture} \end{tcblisting} %\end{tcolorbox} \begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{Une droite et un rectangle}} \begin{tikzpicture} \draw[yellow] (-3,3) grid (3,-3); %%% 1 on nomme 2 courbes: \draw[name path=D,thin] (-1,2) -- (2,-1) ; \draw[name path=R,thin] (-1,1) rectangle (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; % TODO TROUVÉ avec intersections %%% 3 On nomme l'intersection: \coordinate [label=above:$C$] (C) at (intersection-1); \coordinate [label=above:$C$] (c) at (intersection-2); %%% 4 On utilise le point d'intersection: \draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!}; \draw[green,thick,-latex] (0,0) -- (c) node[midway,left] {!}; \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{Un cercle et un rectangle}} \begin{tikzpicture} \draw[yellow] (-3,3) grid (3,-3); %%% 1 on nomme 2 courbes: \draw[name path=D,thin] (-1,2) circle (2) ; \draw[name path=R,thin] (-1,1) rectangle (1,-2) ; %%% 2 on définit l'intersection (avec \path): \path[name intersections={of=R and D}]; % TODO TROUVÉ avec intersections %%% 3 On nomme l'intersection: \coordinate [label=above:$C$] (C) at (intersection-1); \coordinate [label=above:$C$] (c) at (intersection-2); %%% 4 On utilise le point d'intersection: \draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!}; \draw[green,thick,-latex] (0,0) -- (c) node[midway,left] {!}; \end{tikzpicture} \end{tcblisting} \end{document} [1]: https://texnique.fr/osqa/upfiles/Intersection.pnghttps://texnique.fr/osqa/upfiles/Intersection.png [2]: https://texnique.fr/osqa/upfiles/IntersExemples_2.png
cliquez ici pour masquer/afficher la révision 1

12 Jui, 11:26

joseph-tux's gravatar image

joseph-tux
59934168

C'est votre première visite ici ? Consultez la FAQ !

×