Risposte nei forum create
-
AutoreRisposte
-
::
ho il sospetto (ma non prove certe ) che la colpa sia di beamer
infatti togliendo nell’immagine i suoi comandi il disegno compare
`
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage{default}
\usepackage{times}\usepackage{tikz}
\usetikzlibrary{calc}
%\usetikzlibrary{shapes,arrows,trees,positioning}
\usetikzlibrary{shapes,arrows,trees,positioning,through,intersections,fadings}
%\usetikzlibrary{shapes.gates.logic.US,shapes.gates.logic.IEC}\usetheme{Torino}
\begin{document}\begin{frame}[t]{scaleno, isoscele, equilatero}
\begin{center}
% % \begin{figure}
\scalebox{0.5}{
\begin{tikzpicture}\tikzstyle{etichetta} = [draw,node distance=.5, text centered, very thick,text width=50,minimum size=10]
% %\tikzstyle{etichetta} = [draw,outer sep=0,inner sep=1,minimum size=10,node distance=1]
\tikzstyle{etichetta2} = [etichetta,node distance=55, color=red, text width=50]
\tikzstyle{etichetta3} = [etichetta,node distance=80,color=red]
\tikzstyle{etichetta4} = [etichetta,node distance=70,text width=70]
\tikzstyle{linea} = [thick]
\tikzstyle{linea2} = [thick,-triangle 90]
% \onslide<1>{
\coordinate (a) at (0,0);
\coordinate (b) at (6,0);
\coordinate (c) at (9,6);\draw[linea] (a)–(b)–(c)–cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clip (a)++(-0.5,-0.5) rectangle($(c) + (1,1)$);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node(A)[label=$A$] at (a) {$\bullet$};
\node(B)[label=50:$B$] at (b) {$\bullet$};
\node(C)[label=$C$] at (c) {$\bullet$};
% }
%isoscele
% \onslide<2>{
\coordinate (a) at (0,0);
\coordinate (b) at (6,0);
\node(m1) at ($(a)!0.5!(b)$) {};
\node(c1) at (m1)[circle through=(b)] {};
\node(c2) at (a)[circle through=(b)] {};
\node(c3) at (b)[circle through=(a)] {};
\coordinate (ct) at (intersection 2 of c3 and c2);
\coordinate (c) at (intersection of ct–m1 and c1);
\node(A)[label=$A$] at (a) {$\bullet$};
\node(B)[label=50:$B$] at (b) {$\bullet$};
\node(C)[label=$C$] at (c) {$\bullet$};\draw[linea] (a)–(b)–(c) –cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clip (a)++(-0.5,-0.5) rectangle($(c) + (4,5)$);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node(m1)at ($(a)!0.5!(c)$) {$\backslash\backslash$ };
\node(m2)at ($(c)!0.5!(b)$) {$//$ };
% }
% \onslide<3>{
%equilatero
\coordinate (a) at (0,0);
\coordinate (b) at (6,0);
\node(c1) at (a)[circle through=(b)] {};
\node(c2) at (b)[circle through=(a)] {};
\coordinate (c) at (intersection 2 of c1 and c2);\draw[linea] (a)–(b)–(c) –cycle;
\node(A)[label=$A$] at (a) {$\bullet$};
\node(B)[label=50:$B$] at (b) {$\bullet$};
\node(C)[label=$C$] at (c) {$\bullet$};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clip (a)++(-0.5,-0.5) rectangle($(c) + (1,1)$);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node(m1)at ($(a)!0.5!(c)$) {$\backslash\backslash$ };
\node(m2)at ($(c)!0.5!(b)$) {$//$ };
\node(m3)at ($(a)!0.5!(b)$) {$//$ };
% }
\end{tikzpicture}
}
\end{center}
\begin{itemize}
\item<1> Triangolo scaleno
\item<2> Triangolo isoscele
\item<3> Triangolo equilatero
\end{itemize}\end{frame}
\end{document}
`
claudio
::
ho trovato anche questa documentazione che mi sembra interessante
http://math.et.info.free.fr/TikZ/bdd/TikZ-Impatient.pdf
ciao
claudio
::
la conoscevo
solo che non mi va di rimparare tutto 🙂
mi accontento di molto di meno
in
http://www.guit.sssup.it/downloads/TikZxGuit2.pdf
si parla per esempio di $((a)!(b)!(c))$
dove si trova la documentazione per questa macro?
claudio
::
rispolvero questo post
non esiste una documentazione orientata alla costruzione geometrica più approfondita di http://www.guit.sssup.it/downloads/TikZxGuit2.pdf
grazie
claudio
::
Grazie per la risposta
mi hai ispirato questo codice che crea un effetto di persistenza
e di volatilità`
\begin{tikzpicture}
\tikzstyle{etichetta} = [draw,node distance=.5, text centered, very thick,text width=50]
% %\tikzstyle{etichetta} = [draw,outer sep=0,inner sep=1,minimum size=10,node distance=1]
\tikzstyle{etichetta2} = [etichetta,node distance=55, color=red, text width=30]
\tikzstyle{etichetta3} = [etichetta,node distance=80,color=blue]
\tikzstyle{etichetta4} = [etichetta,node distance=70]
\tikzstyle{linea} = [thick]
\tikzstyle{linea2} = [thick,-triangle 90]
\coordinate (a) at (0,0);
\coordinate (b) at (6,0);
\coordinate (c) at (9,6);
\draw[linea] (a)–(b);
\draw[linea](a)–(c);
\draw [linea](c)–(b);\node(A)[label=$A$] at (a) {$\bullet$};
\node(B)[label=50:$B$] at (b) {$\bullet$};
\node(C)[label=$C$] at (c) {$\bullet$};
\onslide<1->{
\coordinate(m1) at ($(a)!0.5!(b)$);
\coordinate(m2) at ($(b)!0.5!(c)$);
\coordinate (m3) at ($(c)!0.5!(a)$);
\node(M1)[label=$M_1$] at (m1) {$\bullet$};
\node(M2)[label=$M_2$] at (m2) {$\bullet$};
\node(M3)[label=0:$M_3$] at (m3) {$\bullet$};
%inizio punto medio
}
\onslide<1>{
\node[etichetta2,below of= m1](M1e){Punto medio};
\node[etichetta2, right of= m2](M2e){Punto medio};
\node[etichetta2,above of= m3](M3e){Punto medio};
\draw[linea2] (M1e)–(m1);
\draw[linea2](M3e)–(m3);
\draw [linea2](M2e)–(m2);
}
%fine punto medio
\onslide<2->{
%inizio mediane
\draw[linea] (a)–(m2);
\draw[linea](b)–(m3);
\draw [linea](c)–(m1);
}
\onslide<2>{
\coordinate (Bar) at (intersection of a–m2 and c–m1);
\coordinate(med1) at ($(c)!0.5!(Bar)$);
\coordinate(med2) at ($(a)!0.5!(Bar)$);
\coordinate(med3) at ($(b)!0.5!(Bar)$);
\node [etichetta4, above of=med1](mediana1){Mediana};
\draw[linea2](mediana1)–(med1);
\node [etichetta4, above left of=med2](mediana2){Mediana};
\draw[linea2](mediana2)–(med2);
\node [etichetta4, right of=med3](mediana3){Mediana};
\draw[linea2](mediana3)–(med3);
}%inizio baricentro
\onslide<3->{
\node(Bar1) at (Bar) {$\bullet$};
}
\onslide<3>{
\node[etichetta3, above left of= Bar](Bar1){Baricentro};
\draw [linea2](Bar1)–(Bar);
%finebaricento
}
\end{tikzpicture}
`
per l’indentatura scusami ma io mi perdo sempre una graffa chiusa o aperta senza indentare
claudio
::
forse ho risolto
non mi pare elegante ma credo che funzioni
`
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}\usepackage{animate}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\begin{document}
\begin{animateinline}[
begin={
\begin{tikzpicture}[scale=0.6]\clip (-0.6,-0.2) rectangle (15.5,7);
},
end={\end{tikzpicture}},controls,timeline=time2.txt]{1}
\fill[black] node at (0,3) {$\bullet$};
\fill[black] node at (2,6) {$\bullet$};
\fill[black] node at (2,0) {$\bullet$};
%1
\draw (0,3) — (2,6) — (2,0) — cycle;
%6
\fill[black] node at (9,0) {$\bullet$};
\fill[black] node at (15,0) {$\bullet$};
\fill[black] node at (12,2) {$\bullet$};
\draw (9,0) — (15,0) — (12,2) — cycle;
\newframe
\draw (3,3) — (5,0) — (5,6) — cycle;
\newframe
\fill[white] (-0.6,-0.2) rectangle (15.5,7);
\fill[black] node at (0,3) {$\bullet$};
\fill[black] node at (2,6) {$\bullet$};
\fill[black] node at (2,0) {$\bullet$};
%1
\draw (0,3) — (2,6) — (2,0) — cycle;
%6
\fill[black] node at (9,0) {$\bullet$};
\fill[black] node at (15,0) {$\bullet$};
\fill[black] node at (12,2) {$\bullet$};
\draw (9,0) — (15,0) — (12,2) — cycle;
\draw (6,3) — (8,0) — (8,6) — cycle;
\newframe
\fill[white] (-0.6,-0.2) rectangle (15.5,7);
\fill[black] node at (0,3) {$\bullet$};
\fill[black] node at (2,6) {$\bullet$};
\fill[black] node at (2,0) {$\bullet$};
%1
\draw (0,3) — (2,6) — (2,0) — cycle;
%6
\fill[black] node at (9,0) {$\bullet$};
\fill[black] node at (15,0) {$\bullet$};
\fill[black] node at (12,2) {$\bullet$};
\draw (9,0) — (15,0) — (12,2) — cycle;
\draw (9,3) — (15,3) — (12,5) — cycle;
\newframe
\fill[white] (-0.6,-0.2) rectangle (15.5,7);
\fill[black] node at (0,3) {$\bullet$};
\fill[black] node at (2,6) {$\bullet$};
\fill[black] node at (2,0) {$\bullet$};
%1
\draw (0,3) — (2,6) — (2,0) — cycle;
%6
\fill[black] node at (9,0) {$\bullet$};
\fill[black] node at (15,0) {$\bullet$};
\fill[black] node at (12,2) {$\bullet$};
\draw (9,0) — (15,0) — (12,2) — cycle;
\draw (9,1) — (15,1) — (12,3) — cycle;
\newframe
\fill[white] (-0.6,-0.2) rectangle (15.5,7);
\fill[black] node at (0,3) {$\bullet$};
\fill[black] node at (2,6) {$\bullet$};
\fill[black] node at (2,0) {$\bullet$};
%1
\draw (0,3) — (2,6) — (2,0) — cycle;
%6
\fill[black] node at (9,0) {$\bullet$};
\fill[black] node at (15,0) {$\bullet$};
\fill[black] node at (12,2) {$\bullet$};\draw (9,0) — (15,0) — (12,2) — cycle;
\end{animateinline}
\end{document}
`
per un’animazione semplice così si tratta di ripetere poche righe di codice ma se la scena è più complessa come si fa?in pratica bisognerebbe definire un nuovo comando che ridisegni la scena di base
[code]
\inizio
\disegna_scena_sfondo
\newframe
\disegna_scena_sfondo
\disegna_elemento_in_movimento
\newframe
\disegna_scena_sfondo
\disegna_elemento_in_movimento
\newframe
\disegna_scena_sfondo
\disegna_elemento_in_movimento
\newframe
…..
…
\fine
[\code]in pratica come si definiscono i comandi in tikz?
::
ecco il codice
`
\documentclass[10pt,a4paper]{article}
\usepackage{animate}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\begin{document}
\begin{animateinline}[
begin={
\begin{tikzpicture}[scale=0.6]\clip (-0.6,-0.2) rectangle (15.5,7);
},
end={\end{tikzpicture}},controls,timeline=time2.txt]{1}
\fill[black] node at (0,3) {$\bullet$};
\fill[black] node at (2,6) {$\bullet$};
\fill[black] node at (2,0) {$\bullet$};
%1
\draw (0,3) — (2,6) — (2,0) — cycle;
%6
\fill[black] node at (9,0) {$\bullet$};
\fill[black] node at (15,0) {$\bullet$};
\fill[black] node at (12,2) {$\bullet$};
\draw (9,0) — (15,0) — (12,2) — cycle;
\newframe
\draw (3,3) — (5,0) — (5,6) — cycle;
\newframe
\draw (3,3) — (5,0) — (5,6) — cycle;
\draw (6,3) — (8,0) — (8,6) — cycle;
\newframe
\draw (6,3) — (8,0) — (8,6) — cycle;
\draw (9,3) — (15,3) — (12,5) — cycle;
\newframe
\draw (9,3) — (15,3) — (12,5) — cycle;
\draw (9,1) — (15,1) — (12,3) — cycle;
\newframe
\draw (9,1) — (15,1) — (12,3) — cycle;
\draw (9,0) — (15,0) — (12,2) — cycle;
\end{animateinline}
\end{document}`
il file time2.txt è questo
`
::0x0
::1×0
::2×0
::3×0
::4×0
::5×0
`
::
vediamo se ho capito qualcosa
`
\begin{frame}
\frametitle{Postulati di appartenenza della retta:}
\begin{columns}
\begin{column}{0.4\textwidth}
\begin{tikzpicture}[auto,scale=0.5]
%1
\coordinate (C) at (1,2);
\coordinate (D) at (-1,-2);
\fill[black] node at (D) {$\bullet$};
\onslide<2->\fill[black] node at (C) {$\bullet$};
\onslide<3->\draw (-2,-4) — (2,4);
%2
\onslide<5->\draw(4,4)–(-1,-6);
\coordinate (E) at (2,0);
\coordinate (F) at (1,-2);
\onslide<6->\fill[black] node at (E) {$\bullet$};
\onslide<7->\fill[black] node at (F) {$\bullet$};
%3
\onslide<9->\draw (-0.5,-7) — (4,2);
\onslide<10->\fill[black] node at (4,-2) {$\bullet$};
\end{tikzpicture}
\end{column}
\begin{column}{0.4\textwidth}
\begin{itemize}
\item<1-> Per due punti distinti passa una ed una sola retta
\item<4-> Su una retta ci sono almeno due punti
\item<8-> Per ogni retta del piano esiste almeno un punto del piano che non gli appartiene
\end{itemize}
\end{column}
\end{columns}
\end{frame}
`
ho fatto bene?
ciao
claudio
-
AutoreRisposte