Le point Phi est attendu à l'intersection du cercle rouge de centre d et de la droite G-D là où il est noté en bleu.

Le code suivant l'expose au point $O$ (centre du cercle noir).

Où est l'erreur?

alt text

\documentclass[a4paper,11pt,french,]{scrartcl}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{tikz,pgf}
\usetikzlibrary{intersections}
\usetikzlibrary{arrows,shapes,snakes,calc, angles,quotes,positioning,automata,shadows,patterns}
\usepackage[french]{babel}
\begin{document}
Le point $\Phi$ est attendu à l'intersection du cercle rouge de centre $d$, et de la droire
rouge G--D, là où il est noté en bleu.
Le code suivant l'expose au point $O$ (centre du cercle noir).
Où est l'erreur?
\begin{tikzpicture}[scale=0.25]
% % Cercle
\coordinate (H) at (0,10);
\coordinate (D) at (10,0);
\node[right] at (D) {$D$};
\coordinate (G) at (-10,0);
\node[left] at (G) {$G$};
\node at (0,0) {$O$};
\draw[very thick] (0,0) circle (10);
% % Carré:
\coordinate (X) at (-10,10);
\coordinate (Y) at (10,-10);
\draw[] (X) rectangle (D);
% %% centre d et cercle de rayon d-H:
\coordinate (d) at (5,0);
\draw[dotted,thick] (H) -- (d);
\node[above] at (d) {\tcbox[size=fbox,coltext=red,colframe=white]{$d$}};
\node[red] at (5,0) {\footnotesize |};
%%% Intersection Phi: (BUG)
\draw[name path=d,red] (5,0) circle (11.18);
\draw[name path=GD,red] (G) -- (D);
\node[thick,red,name intersections={of=d and GD}] (intersection-1) {\footnotesize |};
\node[thick,red,above,name intersections={of=d and GD}] (intersection-1) {$\Phi$};
%%% Par sa mesure:
\coordinate (Phi) at (-6.18,0); % TODO À TROUVER avec intersections
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Posée 09 Jui, 18:26

joseph-tux's gravatar image

joseph-tux
59933967
Taux d'acceptation : 5%

Modifiée 14 Jui, 01:09

Pathe's gravatar image

Pathe ♦♦
7.6k53211254


Pour une raison que j'ignore, les coordonnéees des points d'intersection semblent être divisées par 2 quand ils sont calculés via la commande \node. Dans l'exemple ci-dessous, je construis deux points d'intersection avec la commande \node et deux avec la commande \path :

  • ceux construits avec \path sont corrects : ce sont les points indiqués par Phi_ {p1} et Phi_ {p2};
  • ceux construits avec \node ne le sont pas : en multipliant les coordonnées du premier par 2, on arrive exactement sur le point Phi_ {n1}.

alt text

\documentclass{minimal} \usepackage{tikz} \usetikzlibrary{intersections,calc} \begin{document} \begin{tikzpicture}[scale=.5] \draw[name path=e,red] (2,0) circle (7); \draw[name path=GD,red] (-10,4) -- (10,4); \node at (0,0) {x}; \node[above,name intersections={of=GD and e}] at ($2*(intersection-1)$) {$\Phi_{n1}$}; \node[above,name intersections={of=GD and e}] at (intersection-2) {$\Phi_{n2}$}; \path[name intersections={of=GD and e}] (intersection-1) node[above]{$\Phi_{p1}$}; \path[name intersections={of=GD and e}] (intersection-2) node[above]{$\Phi_{p2}$}; \end{tikzpicture} \end{document}

Lien permanent

Publiée 10 Jui, 22:01

nmarkey's gravatar image

nmarkey
1.5k39
Taux d'acceptation : 48%

Modifiée 11 Jui, 08:44

Problème de syntaxe, je pense :

\path[name intersections={of=d and GD}]
(intersection-1) node[thick,red,above] {$\Phi$}; % TODO TROUVÉ avec intersections
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Lien permanent

Publiée 09 Jui, 19:18

nmarkey's gravatar image

nmarkey
1.5k39
Taux d'acceptation : 48%

Mes excuses, l'erreur est sur l' ECM, pas sur l'original. Je rectifie l' ECM, qui reproduit la même erreur (comme sur la ligne suivante, avec l'affichage du « | »)

(10 Jui, 11:16) joseph-tux joseph-tux's gravatar image

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 alt text

\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);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Lien permanent

Publiée 12 Jui, 11:26

joseph-tux's gravatar image

joseph-tux
59933967
Taux d'acceptation : 5%

Modifiée 12 Jui, 11:35

Mon Exemple Complet MAXIMUM ne compile pas ici, mais compile bien chez moi, avec le résultat affiché ci-dessus.

(12 Jui, 11:28) joseph-tux joseph-tux's gravatar image
Votre réponse
[Masquer l'aperçu]

Suivre cette question

Par courriel :

Une fois que vous serez enregistré, vous pourrez souscrire à n'importe quelle mise à jour ici

Par flux RSS :

Réponses

Réponses et commentaires

Mots-clés de la question :

×112
×3

Question posée : 09 Jui, 18:26

Question vue : 172 fois

Dernière mise à jour : 12 Jui, 11:35

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

×