IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Tableaux - Graphiques - Images - Flottants Discussion :

Beamer Tikz Construction de 2 figures à la suite impossible !


Sujet :

Tableaux - Graphiques - Images - Flottants

  1. #1
    Invité
    Invité(e)
    Par défaut Beamer Tikz Construction de 2 figures à la suite impossible !
    Bonjour,
    Je ne suis pas certain d'avoir initié cette discussion dans le bon forum, j'ai vu que celles sur tikz sont ici, mais il me semble après réflexion que j'aurai du la placer dans le forum Beamer. Je vous prie de bien vouloir m'excuser pour cette erreur.

    Je cherche à créer une présentation Beamer qui montre l'effet de la symétrie orthogonale sur deux figures mises côtes à côtes sur la même diapositive.
    Pour ce faire, j'utilise l'environnement \scope, mais ce dernier a un effet inattendu. En effet, la deuxième figure est d'abord montrée comme étant terminée comme montré sur cette capture d'écran (la partie bleue est construite par symétrie à partir de la grise) :


    Puis lorsque l'on fait défiler la présentation, la deuxième figure se "déconstruit" pour se reconstruire.
    Or, je voudrais qu'au départ, cette deuxième figure apparaisse vide et se construise après la première.
    Je n'y arrive pas.
    Le code est le suivant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    % ****************** Début du préambule ******************
     
    \documentclass[hyperref={pdfpagemode=FullScreen,colorlinks=true},xcolor=table,16pt]{beamer}  % Présentation générale et mise en page
     
    % --------------------------------------
    % Packages et réglages indispensables
    % --------------------------------------
     
    % Marges de la page
    %\setlength{\parindent}{0mm}             % pas de retrait de paragraphe
     
    \usepackage[utf8]{inputenc}             % Encodage des caractères accentués
    \usepackage{xspace}						% espaces après les guillemets
    \usepackage{amsmath, amsfonts, amssymb} % Spécial maths 
    \usepackage{pgf,tikz}
    \usepackage{tkz-base}
    \usepackage{tkz-euclide}
    \usetkzobj{all} % on charge tous les objets
    \usetikzlibrary{arrows.meta}
    \usetikzlibrary{decorations.pathreplacing} % décorations des noeuds
    \usetikzlibrary{positioning} % positionement fin des points
    \usetikzlibrary{shapes}			% noeud en ellipse
    \usepackage{xcolor}
     
    \usetheme{Warsaw}
    \usecolortheme{crane}
    \title[La symétrie orthogonale] {Pliage et découpage}
     
    \usepackage[french]{babel}     % Règles françaises de typographie
     
    \begin{document}
    \begin{frame}{Pliage et découpage}
    \begin{center}
    \begin{tikzpicture}[scale=0.5]
    \begin{scope}
    \tkzDefPoint(0,-1){x}
    \tkzDefPoint(0,10){y}
    \tkzDefPoint(0,9){A}
    \tkzDefPoint(2,7){B}
    \tkzDefPoint(1,6){C}
    \tkzDefPoint(2,5){D}
    \tkzDefPoint(3,5){E}
    \tkzDefPoint(3,4){F}
    \tkzDefPoint(2,4){G}
    \tkzDefPoint(2,3){H}
    \tkzDefPoint(0,1){I}
    \clip (-4,-0.5) rectangle (4,10);
    \draw[very thick](x)--(y);
    \filldraw[very thick, color=gray] (A)--(B)--(C)--(D)--(E)--(F)--(G)--(H)--(I);
    \draw [ black, thin] (-3,0) grid (3,9); % fond quadrillé
    \foreach \p in {A,B,...,I}{
    \tkzDefPointBy[reflection = over x--y](\p) \tkzGetPoint{\p'}};
    \pause
    \tkzDrawSegment[thick](A',B')
    \pause
    \tkzDrawSegment[thick](B',C')
    \pause
    \tkzDrawSegment[thick](C',D')
    \pause
    \tkzDrawSegment[thick](D',E')
    \pause
    \tkzDrawSegment[thick](E',F')
    \pause
    \tkzDrawSegment[thick](F',G')
    \pause
    \tkzDrawSegment[thick](G',H')
    \pause
    \tkzDrawSegment[thick](H',I')
    \tkzFillPolygon[blue,opacity = 0.5](A',B',C',D',E',F',G',H',I')
    \pause
    \end{scope}
    \begin{scope}[shift={(8,4)}]
    \tkzDefPoint(0,-6){x}
    \tkzDefPoint(0,6){y}
    \tkzDefPoint(-4,0){z}
    \tkzDefPoint(4,0){t}
    \tkzDefPoint(0,5){A}
    \tkzDefPoint(1,4){B}
    \tkzDefPoint(2,5){C}
    \tkzDefPoint(2,3){D}
    \tkzDefPoint(3,3){E}
    \tkzDefPoint(3,2){F}
    \tkzDefPoint(2,2){G}
    \tkzDefPoint(1,0){H}
    \tkzDefPoint(0,0){O}
    \clip (-4,-6) rectangle (4,6);
    \draw[very thick](x)--(y);
    \draw[very thick](z)--(t);
    \filldraw[very thick, color=gray] (A)--(B)--(C)--(D)--(E)--(F)--(G)--(H)--(O);
    \draw [black, thin] (-3,-5) grid (3,5); % fond quadrillé
    \pause
    \foreach \p in {A,B,...,H}{
    \tkzDefPointBy[reflection = over x--y](\p) \tkzGetPoint{\p'}};
    \pause
    \tkzDrawSegment[thick](A',B')
    \pause
    \tkzDrawSegment[thick](B',C')
    \pause
    \tkzDrawSegment[thick](C',D')
    \pause
    \tkzDrawSegment[thick](D',E')
    \pause
    \tkzDrawSegment[thick](E',F')
    \pause
    \tkzDrawSegment[thick](F',G')
    \tkzDrawSegment[thick](G',H')
    \tkzFillPolygon[blue,opacity = 0.5](A',B',C',D',E',F',G',H',O)
    \pause
    \foreach \p in {A,B,...,H}{
    \tkzDefPointBy[reflection = over z--t](\p) \tkzGetPoint{\p_1}};
    \tkzDrawPolygon[thick](O,H_1,G_1,F_1,E_1,D_1,C_1,B_1,A_1)
    \tkzFillPolygon[blue,opacity = 0.5](O,H_1,G_1,F_1,E_1,D_1,C_1,B_1,A_1)
    \pause
    \foreach \p in {A_1,..._1,H_1}{
    \tkzDefPointBy[reflection = over x--y](\p) \tkzGetPoint{\p'}};
    \tkzDrawPolygon[thick](A_1',B_1',C_1',D_1',E_1',F_1',G_1',H_1',O)
    \tkzFillPolygon[blue,opacity = 0.5](A_1',B_1',C_1',D_1',E_1',F_1',G_1',H_1',O)
    \end{scope}
    \end{tikzpicture}
    \end{center}
    \end{frame}
     
    \end{document}
    Tout fonctionne si je fais les deux figures sur deux diapos différentes, mais lorsque je les place sur la même diapo, cela ne va pas du tout.
    Avez-vous une piste pour que les symétriques se construisent dans l'ordre :
    - au départ, aucune construction (seule les parties grises sont visibles)
    - puis construction des symétriques pour la figure de gauche (partie bleue)
    - et pour finir construction de la figure de droite (partie bleue)
    Merci de votre aide
    Dernière modification par Invité ; 03/03/2016 à 08h41.

  2. #2
    Invité
    Invité(e)
    Par défaut
    J'ai trouvé, il suffit d'ajouter une commande \visible (ou \onslide ou \uncover cela a le même effet ici) pour la deuxième figure.

    Mais cela n'a pas suffit dans le code précédent, il y avait des commandes \pause en trop dans le code, en les enlevant tout fonctionne.
    Le code corrigé est le suivant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    % ****************** Début du préambule ******************
     
    \documentclass[hyperref={pdfpagemode=FullScreen,colorlinks=true},xcolor=table,16pt]{beamer}  % Présentation générale et mise en page
     
    % --------------------------------------
    % Packages et réglages indispensables
    % --------------------------------------
     
    % Marges de la page
    %\setlength{\parindent}{0mm}             % pas de retrait de paragraphe
     
    \usepackage[utf8]{inputenc}             % Encodage des caractères accentués
    \usepackage{xspace}						% espaces après les guillemets
    \usepackage{amsmath, amsfonts, amssymb} % Spécial maths 
    \usepackage{pgf,tikz}
    \usepackage{tkz-base}
    \usepackage{tkz-euclide}
    \usetkzobj{all} % on charge tous les objets
    \usetikzlibrary{arrows.meta}
    \usetikzlibrary{decorations.pathreplacing} % décorations des noeuds
    \usetikzlibrary{positioning} % positionement fin des points
    \usetikzlibrary{shapes}			% noeud en ellipse
    \usepackage{xcolor}
     
    \usetheme{Warsaw}
    \usecolortheme{crane}
    \setbeamertemplate{navigation symbols}{}
    \title[La symétrie orthogonale] {Pliage et découpage}
     
    \usepackage[french]{babel}     % Règles françaises de typographie
     
    \begin{document}
    \begin{frame}{Pliage et découpage}
    \begin{center}
    \begin{tikzpicture}[scale=0.5]
    \begin{scope}
    \tkzDefPoint(0,-1){x}
    \tkzDefPoint(0,10){y}
    \tkzDefPoint(0,9){A}
    \tkzDefPoint(2,7){B}
    \tkzDefPoint(1,6){C}
    \tkzDefPoint(2,5){D}
    \tkzDefPoint(3,5){E}
    \tkzDefPoint(3,4){F}
    \tkzDefPoint(2,4){G}
    \tkzDefPoint(2,3){H}
    \tkzDefPoint(0,1){I}
    \clip (-4,-0.5) rectangle (4,10);
    \draw[very thick](x)--(y);
    \draw [black, thin] (-3,0) grid (3,9); % fond quadrillé
    \tkzDrawPolygon[thick,fill=black,opacity = 0.5](A,B,C,D,E,F,G,H,I)
    \foreach \p in {A,B,...,I}{
    \tkzDefPointBy[reflection = over x--y](\p) \tkzGetPoint{\p'}};
    \pause
    \tkzDrawSegment[thick](A',B')
    \pause
    \tkzDrawSegment[thick](B',C')
    \pause
    \tkzDrawSegment[thick](C',D')
    \pause
    \tkzDrawSegment[thick](D',E')
    \pause
    \tkzDrawSegment[thick](E',F')
    \pause
    \tkzDrawSegment[thick](F',G')
    \pause
    \tkzDrawSegment[thick](G',H')
    \pause
    \tkzDrawSegment[thick](H',I')
    \tkzFillPolygon[blue,opacity = 0.5](A',B',C',D',E',F',G',H',I')
    \end{scope}
     
    \begin{scope}[shift={(8,4)}]
    \tkzDefPoint(0,-6){x}
    \tkzDefPoint(0,6){y}
    \tkzDefPoint(-4,0){z}
    \tkzDefPoint(4,0){t}
    \tkzDefPoint(0,5){A}
    \tkzDefPoint(1,4){B}
    \tkzDefPoint(2,5){C}
    \tkzDefPoint(2,3){D}
    \tkzDefPoint(3,3){E}
    \tkzDefPoint(3,2){F}
    \tkzDefPoint(2,2){G}
    \tkzDefPoint(1,0){H}
    \tkzDefPoint(0,0){O}
    \clip (-4,-6) rectangle (4,6);
    \draw[very thick](x)--(y);
    \draw[very thick](z)--(t);
    \filldraw[very thick, color=gray] (A)--(B)--(C)--(D)--(E)--(F)--(G)--(H)--(O);
    \draw [black, thin] (-3,-5) grid (3,5); % fond quadrillé
    \visible<9->{
    \foreach \p in {A,B,...,H}{
    \tkzDefPointBy[reflection = over x--y](\p) \tkzGetPoint{\p'}};
    \tkzDrawSegment[thick](A',B')
    \pause
    \tkzDrawSegment[thick](B',C')
    \pause
    \tkzDrawSegment[thick](C',D')
    \pause
    \tkzDrawSegment[thick](D',E')
    \pause
    \tkzDrawSegment[thick](E',F')
    \pause
    \tkzDrawSegment[thick](F',G')
    \tkzDrawSegment[thick](G',H')
    \tkzFillPolygon[blue,opacity = 0.5](A',B',C',D',E',F',G',H',O)
    \pause
    \foreach \p in {A,B,...,H}{
    \tkzDefPointBy[reflection = over z--t](\p) \tkzGetPoint{\p_1}};
    \tkzDrawPolygon[thick,fill=blue,opacity = 0.5](O,H_1,G_1,F_1,E_1,D_1,C_1,B_1,A_1)
    \pause
    \foreach \p in {A_1,..._1,H_1}{
    \tkzDefPointBy[reflection = over x--y](\p) \tkzGetPoint{\p'}};
    \tkzDrawPolygon[thick,fill=blue,opacity = 0.5](A_1',B_1',C_1',D_1',E_1',F_1',G_1',H_1',O)
    }
    \end{scope}
     
    \end{tikzpicture}
    \end{center}
    \end{frame}
     
    \end{document}

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. plugin vim latex-suite : impossible de saisir la lettre "é" (eacute)
    Par OlaffGrossBaff dans le forum Administration système
    Réponses: 0
    Dernier message: 08/06/2014, 14h22
  2. Réponses: 2
    Dernier message: 19/03/2009, 22h38
  3. [BEAMER] probleme de numerotation des figures
    Par clement.rey dans le forum Beamer
    Réponses: 2
    Dernier message: 25/08/2008, 11h56
  4. numéros des figures et tableau (beamer)
    Par RO_student dans le forum Beamer
    Réponses: 0
    Dernier message: 06/06/2008, 10h14
  5. [Beamer] Figure et bloc
    Par dinver dans le forum Beamer
    Réponses: 3
    Dernier message: 19/02/2007, 20h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo