Repeating a drawing and connecting them together to form one unit trial

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












in this question, I tried the following solution



documentclassbeamer
setbeamertemplatenavigation symbols
usepackagetikz
begindocument
beginminipagetextwidth
begintikzpicture[scale=.5, transform shape]
node [thin, black] (0,0) (origin)
([shift=(0.:1.2)]origin.center) node (txtu)
([shift=(-65.:4.)]origin.center) node (txtd)
([shift=(180.:7.)]txtd.center) node (txtds)
([shift=(180.:5.8)]txtds.center) node (txtdt)
([shift=(-90.:.4)]origin.center) node (od)
([shift=(180.:5.)]od.center) node (odsens)
([shift=(-90.:9.8)]odsens.center) node (odsensd)
([shift=(0.:.12)]od.center) node (odr)
([shift=(0.:3.)]od.center) node (odrr)
([shift=(180.:.12)]od.center) node (odl)
([shift=(180.:1.)]od.center) node (odll)
([shift=(180.:.2)]odll.center) node (odlll)
([shift=(-90.:.26)]odrr.center) node (odrrd)
([shift=(-90.:.12)]odll.center) node (odllc)
([shift=(-90.:.24)]odll.center) node (odlld)
([shift=(-90.:1.)]origin.center) node (originb)
([shift=(0.:1.2)]originb.center) node (txtub)
([shift=(-65.:4.)]originb.center) node (txtdb)
([shift=(180.:7.)]txtdb.center) node (txtdsb)
([shift=(180.:5.8)]txtdsb.center) node (txtdtb)
([shift=(-90.:.4)]originb.center) node (odb)
([shift=(180.:5.)]odb.center) node (odsensb)
([shift=(-90.:9.8)]odsensb.center) node (odsensdb)
([shift=(0.:.12)]odb.center) node (odrb)
([shift=(0.:3.)]odb.center) node (odrrb)
([shift=(180.:.12)]odb.center) node (odlb)
([shift=(180.:1.)]odb.center) node (odllb)
([shift=(-90.:.26)]odrrb.center) node (odrrdb)
([shift=(-90.:.12)]odllb.center) node (odllcb)
([shift=(-90.:.24)]odllb.center) node (odlldb)
([shift=(-90.:2.)]origin.center) node (originc)
([shift=(0.:1.2)]originc.center) node (txtuc)
([shift=(-65.:4.)]originc.center) node (txtdc)
([shift=(180.:7.)]txtdc.center) node (txtdsc)
([shift=(180.:5.8)]txtdsc.center) node (txtdtc)
([shift=(-90.:.4)]originc.center) node (odc)
([shift=(180.:5.)]odc.center) node (odsensc)
([shift=(-90.:9.8)]odsensc.center) node (odsensdc)
([shift=(0.:.12)]odc.center) node (odrc)
([shift=(0.:3.)]odc.center) node (odrrc)
([shift=(180.:.12)]odc.center) node (odlc)
([shift=(180.:1.)]odc.center) node (odllc)
([shift=(-90.:.26)]odrrc.center) node (odrrdc)
([shift=(-90.:.12)]odllc.center) node (odllcc)
([shift=(-90.:.24)]odllc.center) node (odlldc)
([shift=(180.:.2)]odlldc.center) node (odlldlc)
;
draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (odr.center) -- ([shift=(90.:.4)]odr.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odl.center) -- (odl.center)

(odrb.center) -- ([shift=(90.:.4)]odrb.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlb.center) -- (odlb.center)

(odrc.center) -- ([shift=(90.:.4)]odrc.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlc.center) -- (odlc.center)
;

draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odr.center) -- (odrr.center) -- (odrrd.center) -- (odlld.center) -- (odll.center) -- ([shift=(0.:.02)]odl.center);

draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrb.center) -- (odrrb.center) -- (odrrdb.center) -- (odlldb.center) -- (odllb.center) -- ([shift=(0.:.02)]odlb.center);

draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrc.center) -- (odrrc.center) -- (odrrdc.center) -- (odlldc.center) -- (odllc.center) -- ([shift=(0.:.02)]odlc.center);
endtikzpicture
endminipage
enddocument


which gave me the following drawing



enter image description here



How can I avoid the elongated rounded shapes to make it look like this



enter image description here










share|improve this question

























    up vote
    1
    down vote

    favorite
    1












    in this question, I tried the following solution



    documentclassbeamer
    setbeamertemplatenavigation symbols
    usepackagetikz
    begindocument
    beginminipagetextwidth
    begintikzpicture[scale=.5, transform shape]
    node [thin, black] (0,0) (origin)
    ([shift=(0.:1.2)]origin.center) node (txtu)
    ([shift=(-65.:4.)]origin.center) node (txtd)
    ([shift=(180.:7.)]txtd.center) node (txtds)
    ([shift=(180.:5.8)]txtds.center) node (txtdt)
    ([shift=(-90.:.4)]origin.center) node (od)
    ([shift=(180.:5.)]od.center) node (odsens)
    ([shift=(-90.:9.8)]odsens.center) node (odsensd)
    ([shift=(0.:.12)]od.center) node (odr)
    ([shift=(0.:3.)]od.center) node (odrr)
    ([shift=(180.:.12)]od.center) node (odl)
    ([shift=(180.:1.)]od.center) node (odll)
    ([shift=(180.:.2)]odll.center) node (odlll)
    ([shift=(-90.:.26)]odrr.center) node (odrrd)
    ([shift=(-90.:.12)]odll.center) node (odllc)
    ([shift=(-90.:.24)]odll.center) node (odlld)
    ([shift=(-90.:1.)]origin.center) node (originb)
    ([shift=(0.:1.2)]originb.center) node (txtub)
    ([shift=(-65.:4.)]originb.center) node (txtdb)
    ([shift=(180.:7.)]txtdb.center) node (txtdsb)
    ([shift=(180.:5.8)]txtdsb.center) node (txtdtb)
    ([shift=(-90.:.4)]originb.center) node (odb)
    ([shift=(180.:5.)]odb.center) node (odsensb)
    ([shift=(-90.:9.8)]odsensb.center) node (odsensdb)
    ([shift=(0.:.12)]odb.center) node (odrb)
    ([shift=(0.:3.)]odb.center) node (odrrb)
    ([shift=(180.:.12)]odb.center) node (odlb)
    ([shift=(180.:1.)]odb.center) node (odllb)
    ([shift=(-90.:.26)]odrrb.center) node (odrrdb)
    ([shift=(-90.:.12)]odllb.center) node (odllcb)
    ([shift=(-90.:.24)]odllb.center) node (odlldb)
    ([shift=(-90.:2.)]origin.center) node (originc)
    ([shift=(0.:1.2)]originc.center) node (txtuc)
    ([shift=(-65.:4.)]originc.center) node (txtdc)
    ([shift=(180.:7.)]txtdc.center) node (txtdsc)
    ([shift=(180.:5.8)]txtdsc.center) node (txtdtc)
    ([shift=(-90.:.4)]originc.center) node (odc)
    ([shift=(180.:5.)]odc.center) node (odsensc)
    ([shift=(-90.:9.8)]odsensc.center) node (odsensdc)
    ([shift=(0.:.12)]odc.center) node (odrc)
    ([shift=(0.:3.)]odc.center) node (odrrc)
    ([shift=(180.:.12)]odc.center) node (odlc)
    ([shift=(180.:1.)]odc.center) node (odllc)
    ([shift=(-90.:.26)]odrrc.center) node (odrrdc)
    ([shift=(-90.:.12)]odllc.center) node (odllcc)
    ([shift=(-90.:.24)]odllc.center) node (odlldc)
    ([shift=(180.:.2)]odlldc.center) node (odlldlc)
    ;
    draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (odr.center) -- ([shift=(90.:.4)]odr.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odl.center) -- (odl.center)

    (odrb.center) -- ([shift=(90.:.4)]odrb.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlb.center) -- (odlb.center)

    (odrc.center) -- ([shift=(90.:.4)]odrc.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlc.center) -- (odlc.center)
    ;

    draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odr.center) -- (odrr.center) -- (odrrd.center) -- (odlld.center) -- (odll.center) -- ([shift=(0.:.02)]odl.center);

    draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrb.center) -- (odrrb.center) -- (odrrdb.center) -- (odlldb.center) -- (odllb.center) -- ([shift=(0.:.02)]odlb.center);

    draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrc.center) -- (odrrc.center) -- (odrrdc.center) -- (odlldc.center) -- (odllc.center) -- ([shift=(0.:.02)]odlc.center);
    endtikzpicture
    endminipage
    enddocument


    which gave me the following drawing



    enter image description here



    How can I avoid the elongated rounded shapes to make it look like this



    enter image description here










    share|improve this question























      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      in this question, I tried the following solution



      documentclassbeamer
      setbeamertemplatenavigation symbols
      usepackagetikz
      begindocument
      beginminipagetextwidth
      begintikzpicture[scale=.5, transform shape]
      node [thin, black] (0,0) (origin)
      ([shift=(0.:1.2)]origin.center) node (txtu)
      ([shift=(-65.:4.)]origin.center) node (txtd)
      ([shift=(180.:7.)]txtd.center) node (txtds)
      ([shift=(180.:5.8)]txtds.center) node (txtdt)
      ([shift=(-90.:.4)]origin.center) node (od)
      ([shift=(180.:5.)]od.center) node (odsens)
      ([shift=(-90.:9.8)]odsens.center) node (odsensd)
      ([shift=(0.:.12)]od.center) node (odr)
      ([shift=(0.:3.)]od.center) node (odrr)
      ([shift=(180.:.12)]od.center) node (odl)
      ([shift=(180.:1.)]od.center) node (odll)
      ([shift=(180.:.2)]odll.center) node (odlll)
      ([shift=(-90.:.26)]odrr.center) node (odrrd)
      ([shift=(-90.:.12)]odll.center) node (odllc)
      ([shift=(-90.:.24)]odll.center) node (odlld)
      ([shift=(-90.:1.)]origin.center) node (originb)
      ([shift=(0.:1.2)]originb.center) node (txtub)
      ([shift=(-65.:4.)]originb.center) node (txtdb)
      ([shift=(180.:7.)]txtdb.center) node (txtdsb)
      ([shift=(180.:5.8)]txtdsb.center) node (txtdtb)
      ([shift=(-90.:.4)]originb.center) node (odb)
      ([shift=(180.:5.)]odb.center) node (odsensb)
      ([shift=(-90.:9.8)]odsensb.center) node (odsensdb)
      ([shift=(0.:.12)]odb.center) node (odrb)
      ([shift=(0.:3.)]odb.center) node (odrrb)
      ([shift=(180.:.12)]odb.center) node (odlb)
      ([shift=(180.:1.)]odb.center) node (odllb)
      ([shift=(-90.:.26)]odrrb.center) node (odrrdb)
      ([shift=(-90.:.12)]odllb.center) node (odllcb)
      ([shift=(-90.:.24)]odllb.center) node (odlldb)
      ([shift=(-90.:2.)]origin.center) node (originc)
      ([shift=(0.:1.2)]originc.center) node (txtuc)
      ([shift=(-65.:4.)]originc.center) node (txtdc)
      ([shift=(180.:7.)]txtdc.center) node (txtdsc)
      ([shift=(180.:5.8)]txtdsc.center) node (txtdtc)
      ([shift=(-90.:.4)]originc.center) node (odc)
      ([shift=(180.:5.)]odc.center) node (odsensc)
      ([shift=(-90.:9.8)]odsensc.center) node (odsensdc)
      ([shift=(0.:.12)]odc.center) node (odrc)
      ([shift=(0.:3.)]odc.center) node (odrrc)
      ([shift=(180.:.12)]odc.center) node (odlc)
      ([shift=(180.:1.)]odc.center) node (odllc)
      ([shift=(-90.:.26)]odrrc.center) node (odrrdc)
      ([shift=(-90.:.12)]odllc.center) node (odllcc)
      ([shift=(-90.:.24)]odllc.center) node (odlldc)
      ([shift=(180.:.2)]odlldc.center) node (odlldlc)
      ;
      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (odr.center) -- ([shift=(90.:.4)]odr.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odl.center) -- (odl.center)

      (odrb.center) -- ([shift=(90.:.4)]odrb.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlb.center) -- (odlb.center)

      (odrc.center) -- ([shift=(90.:.4)]odrc.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlc.center) -- (odlc.center)
      ;

      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odr.center) -- (odrr.center) -- (odrrd.center) -- (odlld.center) -- (odll.center) -- ([shift=(0.:.02)]odl.center);

      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrb.center) -- (odrrb.center) -- (odrrdb.center) -- (odlldb.center) -- (odllb.center) -- ([shift=(0.:.02)]odlb.center);

      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrc.center) -- (odrrc.center) -- (odrrdc.center) -- (odlldc.center) -- (odllc.center) -- ([shift=(0.:.02)]odlc.center);
      endtikzpicture
      endminipage
      enddocument


      which gave me the following drawing



      enter image description here



      How can I avoid the elongated rounded shapes to make it look like this



      enter image description here










      share|improve this question













      in this question, I tried the following solution



      documentclassbeamer
      setbeamertemplatenavigation symbols
      usepackagetikz
      begindocument
      beginminipagetextwidth
      begintikzpicture[scale=.5, transform shape]
      node [thin, black] (0,0) (origin)
      ([shift=(0.:1.2)]origin.center) node (txtu)
      ([shift=(-65.:4.)]origin.center) node (txtd)
      ([shift=(180.:7.)]txtd.center) node (txtds)
      ([shift=(180.:5.8)]txtds.center) node (txtdt)
      ([shift=(-90.:.4)]origin.center) node (od)
      ([shift=(180.:5.)]od.center) node (odsens)
      ([shift=(-90.:9.8)]odsens.center) node (odsensd)
      ([shift=(0.:.12)]od.center) node (odr)
      ([shift=(0.:3.)]od.center) node (odrr)
      ([shift=(180.:.12)]od.center) node (odl)
      ([shift=(180.:1.)]od.center) node (odll)
      ([shift=(180.:.2)]odll.center) node (odlll)
      ([shift=(-90.:.26)]odrr.center) node (odrrd)
      ([shift=(-90.:.12)]odll.center) node (odllc)
      ([shift=(-90.:.24)]odll.center) node (odlld)
      ([shift=(-90.:1.)]origin.center) node (originb)
      ([shift=(0.:1.2)]originb.center) node (txtub)
      ([shift=(-65.:4.)]originb.center) node (txtdb)
      ([shift=(180.:7.)]txtdb.center) node (txtdsb)
      ([shift=(180.:5.8)]txtdsb.center) node (txtdtb)
      ([shift=(-90.:.4)]originb.center) node (odb)
      ([shift=(180.:5.)]odb.center) node (odsensb)
      ([shift=(-90.:9.8)]odsensb.center) node (odsensdb)
      ([shift=(0.:.12)]odb.center) node (odrb)
      ([shift=(0.:3.)]odb.center) node (odrrb)
      ([shift=(180.:.12)]odb.center) node (odlb)
      ([shift=(180.:1.)]odb.center) node (odllb)
      ([shift=(-90.:.26)]odrrb.center) node (odrrdb)
      ([shift=(-90.:.12)]odllb.center) node (odllcb)
      ([shift=(-90.:.24)]odllb.center) node (odlldb)
      ([shift=(-90.:2.)]origin.center) node (originc)
      ([shift=(0.:1.2)]originc.center) node (txtuc)
      ([shift=(-65.:4.)]originc.center) node (txtdc)
      ([shift=(180.:7.)]txtdc.center) node (txtdsc)
      ([shift=(180.:5.8)]txtdsc.center) node (txtdtc)
      ([shift=(-90.:.4)]originc.center) node (odc)
      ([shift=(180.:5.)]odc.center) node (odsensc)
      ([shift=(-90.:9.8)]odsensc.center) node (odsensdc)
      ([shift=(0.:.12)]odc.center) node (odrc)
      ([shift=(0.:3.)]odc.center) node (odrrc)
      ([shift=(180.:.12)]odc.center) node (odlc)
      ([shift=(180.:1.)]odc.center) node (odllc)
      ([shift=(-90.:.26)]odrrc.center) node (odrrdc)
      ([shift=(-90.:.12)]odllc.center) node (odllcc)
      ([shift=(-90.:.24)]odllc.center) node (odlldc)
      ([shift=(180.:.2)]odlldc.center) node (odlldlc)
      ;
      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (odr.center) -- ([shift=(90.:.4)]odr.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odl.center) -- (odl.center)

      (odrb.center) -- ([shift=(90.:.4)]odrb.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlb.center) -- (odlb.center)

      (odrc.center) -- ([shift=(90.:.4)]odrc.center) .. controls (40:1.2) and (140:1.2) .. ([shift=(90.:.4)]odlc.center) -- (odlc.center)
      ;

      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odr.center) -- (odrr.center) -- (odrrd.center) -- (odlld.center) -- (odll.center) -- ([shift=(0.:.02)]odl.center);

      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrb.center) -- (odrrb.center) -- (odrrdb.center) -- (odlldb.center) -- (odllb.center) -- ([shift=(0.:.02)]odlb.center);

      draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] ([shift=(180.:.02)]odrc.center) -- (odrrc.center) -- (odrrdc.center) -- (odlldc.center) -- (odllc.center) -- ([shift=(0.:.02)]odlc.center);
      endtikzpicture
      endminipage
      enddocument


      which gave me the following drawing



      enter image description here



      How can I avoid the elongated rounded shapes to make it look like this



      enter image description here







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 39 mins ago









      Hany

      804314




      804314




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          You're using the same exact control points for all three shapes. That is, when you do



          .. controls (40:1.2) and (140:1.2) ..


          (40:1.2) and (140:2) are in the same position, they're not relative to the previous point on the path. To solve this, use relative coordinates as in



          .. controls +(40:1.2) and +(140:1.2) ..


          FYI, if I remember correctly, when you do



          (a_x, a_y) .. controls +(x1,y1) and +(x2,y2) .. (b_x, b_y)


          the two control points will be placed at (a_x+x1, a_y+y1) and (b_x+x2, b_y+y2), respectively.



          Addendum



          Depending on your needs, a different approach to drawing those shapes might be easier to handle. You could for example use a pic like this:



          documentclass[border=5mm]standalone
          usepackagetikz
          tikzset
          myshape/.pic=
          draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (0,0)

          begindocument

          begintikzpicture
          foreach y in 0,1,2
          pic at (0,0.65*y) myshape;
          endtikzpicture

          enddocument


          enter image description here



          This particular version doesn't exactly reproduce your diagram, but it's much easier to change, as you only need to change the definition of the pic and all three instances of it change.






          share|improve this answer






















          • It's also possible to add named coordinates to the pic, which can be referenced.
            – Torbjørn T.
            5 mins ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456100%2frepeating-a-drawing-and-connecting-them-together-to-form-one-unit-trial%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          You're using the same exact control points for all three shapes. That is, when you do



          .. controls (40:1.2) and (140:1.2) ..


          (40:1.2) and (140:2) are in the same position, they're not relative to the previous point on the path. To solve this, use relative coordinates as in



          .. controls +(40:1.2) and +(140:1.2) ..


          FYI, if I remember correctly, when you do



          (a_x, a_y) .. controls +(x1,y1) and +(x2,y2) .. (b_x, b_y)


          the two control points will be placed at (a_x+x1, a_y+y1) and (b_x+x2, b_y+y2), respectively.



          Addendum



          Depending on your needs, a different approach to drawing those shapes might be easier to handle. You could for example use a pic like this:



          documentclass[border=5mm]standalone
          usepackagetikz
          tikzset
          myshape/.pic=
          draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (0,0)

          begindocument

          begintikzpicture
          foreach y in 0,1,2
          pic at (0,0.65*y) myshape;
          endtikzpicture

          enddocument


          enter image description here



          This particular version doesn't exactly reproduce your diagram, but it's much easier to change, as you only need to change the definition of the pic and all three instances of it change.






          share|improve this answer






















          • It's also possible to add named coordinates to the pic, which can be referenced.
            – Torbjørn T.
            5 mins ago














          up vote
          2
          down vote



          accepted










          You're using the same exact control points for all three shapes. That is, when you do



          .. controls (40:1.2) and (140:1.2) ..


          (40:1.2) and (140:2) are in the same position, they're not relative to the previous point on the path. To solve this, use relative coordinates as in



          .. controls +(40:1.2) and +(140:1.2) ..


          FYI, if I remember correctly, when you do



          (a_x, a_y) .. controls +(x1,y1) and +(x2,y2) .. (b_x, b_y)


          the two control points will be placed at (a_x+x1, a_y+y1) and (b_x+x2, b_y+y2), respectively.



          Addendum



          Depending on your needs, a different approach to drawing those shapes might be easier to handle. You could for example use a pic like this:



          documentclass[border=5mm]standalone
          usepackagetikz
          tikzset
          myshape/.pic=
          draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (0,0)

          begindocument

          begintikzpicture
          foreach y in 0,1,2
          pic at (0,0.65*y) myshape;
          endtikzpicture

          enddocument


          enter image description here



          This particular version doesn't exactly reproduce your diagram, but it's much easier to change, as you only need to change the definition of the pic and all three instances of it change.






          share|improve this answer






















          • It's also possible to add named coordinates to the pic, which can be referenced.
            – Torbjørn T.
            5 mins ago












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          You're using the same exact control points for all three shapes. That is, when you do



          .. controls (40:1.2) and (140:1.2) ..


          (40:1.2) and (140:2) are in the same position, they're not relative to the previous point on the path. To solve this, use relative coordinates as in



          .. controls +(40:1.2) and +(140:1.2) ..


          FYI, if I remember correctly, when you do



          (a_x, a_y) .. controls +(x1,y1) and +(x2,y2) .. (b_x, b_y)


          the two control points will be placed at (a_x+x1, a_y+y1) and (b_x+x2, b_y+y2), respectively.



          Addendum



          Depending on your needs, a different approach to drawing those shapes might be easier to handle. You could for example use a pic like this:



          documentclass[border=5mm]standalone
          usepackagetikz
          tikzset
          myshape/.pic=
          draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (0,0)

          begindocument

          begintikzpicture
          foreach y in 0,1,2
          pic at (0,0.65*y) myshape;
          endtikzpicture

          enddocument


          enter image description here



          This particular version doesn't exactly reproduce your diagram, but it's much easier to change, as you only need to change the definition of the pic and all three instances of it change.






          share|improve this answer














          You're using the same exact control points for all three shapes. That is, when you do



          .. controls (40:1.2) and (140:1.2) ..


          (40:1.2) and (140:2) are in the same position, they're not relative to the previous point on the path. To solve this, use relative coordinates as in



          .. controls +(40:1.2) and +(140:1.2) ..


          FYI, if I remember correctly, when you do



          (a_x, a_y) .. controls +(x1,y1) and +(x2,y2) .. (b_x, b_y)


          the two control points will be placed at (a_x+x1, a_y+y1) and (b_x+x2, b_y+y2), respectively.



          Addendum



          Depending on your needs, a different approach to drawing those shapes might be easier to handle. You could for example use a pic like this:



          documentclass[border=5mm]standalone
          usepackagetikz
          tikzset
          myshape/.pic=
          draw[thick, purple!60!black, top color=red, bottom color=red, middle color=red!60, opacity=.4] (0,0)

          begindocument

          begintikzpicture
          foreach y in 0,1,2
          pic at (0,0.65*y) myshape;
          endtikzpicture

          enddocument


          enter image description here



          This particular version doesn't exactly reproduce your diagram, but it's much easier to change, as you only need to change the definition of the pic and all three instances of it change.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 6 mins ago

























          answered 20 mins ago









          Torbjørn T.

          152k13244429




          152k13244429











          • It's also possible to add named coordinates to the pic, which can be referenced.
            – Torbjørn T.
            5 mins ago
















          • It's also possible to add named coordinates to the pic, which can be referenced.
            – Torbjørn T.
            5 mins ago















          It's also possible to add named coordinates to the pic, which can be referenced.
          – Torbjørn T.
          5 mins ago




          It's also possible to add named coordinates to the pic, which can be referenced.
          – Torbjørn T.
          5 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456100%2frepeating-a-drawing-and-connecting-them-together-to-form-one-unit-trial%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery