Generic Symmetric Drawing











up vote
5
down vote

favorite












I'm trying to prove something and I need a clear drawing to be able to derive the angles and so on. So I thought why not draw it LaTeX !



Okay so my drawing is as suchenter image description here



Those are the cases of 8/6 and 6/4 I need to get up to higher orders with accurate drawings. The ones labeled with red are the ones to be always aligned in all the drawings.



Can someone help me create something generic or at least a sample for me to start from so that I could reach 12/8 , 16/14 and so on ? Some cases like 6/8 are to be considered as well.










share|improve this question


























    up vote
    5
    down vote

    favorite












    I'm trying to prove something and I need a clear drawing to be able to derive the angles and so on. So I thought why not draw it LaTeX !



    Okay so my drawing is as suchenter image description here



    Those are the cases of 8/6 and 6/4 I need to get up to higher orders with accurate drawings. The ones labeled with red are the ones to be always aligned in all the drawings.



    Can someone help me create something generic or at least a sample for me to start from so that I could reach 12/8 , 16/14 and so on ? Some cases like 6/8 are to be considered as well.










    share|improve this question
























      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      I'm trying to prove something and I need a clear drawing to be able to derive the angles and so on. So I thought why not draw it LaTeX !



      Okay so my drawing is as suchenter image description here



      Those are the cases of 8/6 and 6/4 I need to get up to higher orders with accurate drawings. The ones labeled with red are the ones to be always aligned in all the drawings.



      Can someone help me create something generic or at least a sample for me to start from so that I could reach 12/8 , 16/14 and so on ? Some cases like 6/8 are to be considered as well.










      share|improve this question













      I'm trying to prove something and I need a clear drawing to be able to derive the angles and so on. So I thought why not draw it LaTeX !



      Okay so my drawing is as suchenter image description here



      Those are the cases of 8/6 and 6/4 I need to get up to higher orders with accurate drawings. The ones labeled with red are the ones to be always aligned in all the drawings.



      Can someone help me create something generic or at least a sample for me to start from so that I could reach 12/8 , 16/14 and so on ? Some cases like 6/8 are to be considered as well.







      circles line






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 at 18:04









      Hasan Hammoud

      883




      883






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          7
          down vote



          accepted










          pics are very powerful tikz components, because they accept input arguments besides being treated the same way as nodes (small differences though).



          documentclass[tikz,border=2pt]{standalone}

          begin{document}

          tikzset{
          pics/numcirc/.style args={#1/#2}{
          code = {
          draw circle (1);
          foreach i in {1,...,#1}
          draw (90+i*360/#1:1) -- (90+i*360/#1:1.5);
          foreach i in {1,...,#2}
          draw (90+i*360/#2:0) -- (90+i*360/#2:0.5);
          }}}

          begin{tikzpicture}

          draw pic at(0,0) {numcirc=8/6};
          draw pic at(4,0) {numcirc=6/4};
          draw pic at(8,0) {numcirc=12/8};

          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer






























            up vote
            5
            down vote













            Here is a starting point. The idea is to use polar coordinates (I love polar coordinates) given by (angle:radius).





            documentclass{report}
            usepackage{tikz}

            begin{document}
            begin{tikzpicture}[thick]
            foreach a in {0,45,...,315}{
            draw (a:2)--(a:3);
            }
            foreach a in {0,60,...,300}{
            draw[red] (0,0)--(90+a:1.8);
            }

            draw (0,0) circle (2cm);
            end{tikzpicture}
            end{document}


            Some improvements: thanks for @AboAmmar



            enter image description here



            documentclass[margin=3mm]{standalone}
            usepackage{tikz}
            defnumA{}
            defnumB{}
            newcommand{target}[2]{%
            renewcommand{numA}{#1}
            renewcommand{numB}{#2}
            begin{tikzpicture}[thick]
            foreach i in {1,...,numA}{%
            draw (i*360/numA:2) -- (i*360/numA:3);
            }
            foreach i in {1,...,numB}{%
            draw[red] (0,0) -- (90+i*360/numB:1.7);
            }

            draw (0,0)node[below=3cm]{Large$numA/numB$} circle (2cm);
            end{tikzpicture}
            }

            begin{document}
            target{8}{6}target{6}{4}target{12}{6}
            end{document}





            share|improve this answer























              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: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              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%2f460796%2fgeneric-symmetric-drawing%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              7
              down vote



              accepted










              pics are very powerful tikz components, because they accept input arguments besides being treated the same way as nodes (small differences though).



              documentclass[tikz,border=2pt]{standalone}

              begin{document}

              tikzset{
              pics/numcirc/.style args={#1/#2}{
              code = {
              draw circle (1);
              foreach i in {1,...,#1}
              draw (90+i*360/#1:1) -- (90+i*360/#1:1.5);
              foreach i in {1,...,#2}
              draw (90+i*360/#2:0) -- (90+i*360/#2:0.5);
              }}}

              begin{tikzpicture}

              draw pic at(0,0) {numcirc=8/6};
              draw pic at(4,0) {numcirc=6/4};
              draw pic at(8,0) {numcirc=12/8};

              end{tikzpicture}

              end{document}


              enter image description here






              share|improve this answer



























                up vote
                7
                down vote



                accepted










                pics are very powerful tikz components, because they accept input arguments besides being treated the same way as nodes (small differences though).



                documentclass[tikz,border=2pt]{standalone}

                begin{document}

                tikzset{
                pics/numcirc/.style args={#1/#2}{
                code = {
                draw circle (1);
                foreach i in {1,...,#1}
                draw (90+i*360/#1:1) -- (90+i*360/#1:1.5);
                foreach i in {1,...,#2}
                draw (90+i*360/#2:0) -- (90+i*360/#2:0.5);
                }}}

                begin{tikzpicture}

                draw pic at(0,0) {numcirc=8/6};
                draw pic at(4,0) {numcirc=6/4};
                draw pic at(8,0) {numcirc=12/8};

                end{tikzpicture}

                end{document}


                enter image description here






                share|improve this answer

























                  up vote
                  7
                  down vote



                  accepted







                  up vote
                  7
                  down vote



                  accepted






                  pics are very powerful tikz components, because they accept input arguments besides being treated the same way as nodes (small differences though).



                  documentclass[tikz,border=2pt]{standalone}

                  begin{document}

                  tikzset{
                  pics/numcirc/.style args={#1/#2}{
                  code = {
                  draw circle (1);
                  foreach i in {1,...,#1}
                  draw (90+i*360/#1:1) -- (90+i*360/#1:1.5);
                  foreach i in {1,...,#2}
                  draw (90+i*360/#2:0) -- (90+i*360/#2:0.5);
                  }}}

                  begin{tikzpicture}

                  draw pic at(0,0) {numcirc=8/6};
                  draw pic at(4,0) {numcirc=6/4};
                  draw pic at(8,0) {numcirc=12/8};

                  end{tikzpicture}

                  end{document}


                  enter image description here






                  share|improve this answer














                  pics are very powerful tikz components, because they accept input arguments besides being treated the same way as nodes (small differences though).



                  documentclass[tikz,border=2pt]{standalone}

                  begin{document}

                  tikzset{
                  pics/numcirc/.style args={#1/#2}{
                  code = {
                  draw circle (1);
                  foreach i in {1,...,#1}
                  draw (90+i*360/#1:1) -- (90+i*360/#1:1.5);
                  foreach i in {1,...,#2}
                  draw (90+i*360/#2:0) -- (90+i*360/#2:0.5);
                  }}}

                  begin{tikzpicture}

                  draw pic at(0,0) {numcirc=8/6};
                  draw pic at(4,0) {numcirc=6/4};
                  draw pic at(8,0) {numcirc=12/8};

                  end{tikzpicture}

                  end{document}


                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 19 at 18:44

























                  answered Nov 19 at 18:39









                  AboAmmar

                  31.5k22781




                  31.5k22781






















                      up vote
                      5
                      down vote













                      Here is a starting point. The idea is to use polar coordinates (I love polar coordinates) given by (angle:radius).





                      documentclass{report}
                      usepackage{tikz}

                      begin{document}
                      begin{tikzpicture}[thick]
                      foreach a in {0,45,...,315}{
                      draw (a:2)--(a:3);
                      }
                      foreach a in {0,60,...,300}{
                      draw[red] (0,0)--(90+a:1.8);
                      }

                      draw (0,0) circle (2cm);
                      end{tikzpicture}
                      end{document}


                      Some improvements: thanks for @AboAmmar



                      enter image description here



                      documentclass[margin=3mm]{standalone}
                      usepackage{tikz}
                      defnumA{}
                      defnumB{}
                      newcommand{target}[2]{%
                      renewcommand{numA}{#1}
                      renewcommand{numB}{#2}
                      begin{tikzpicture}[thick]
                      foreach i in {1,...,numA}{%
                      draw (i*360/numA:2) -- (i*360/numA:3);
                      }
                      foreach i in {1,...,numB}{%
                      draw[red] (0,0) -- (90+i*360/numB:1.7);
                      }

                      draw (0,0)node[below=3cm]{Large$numA/numB$} circle (2cm);
                      end{tikzpicture}
                      }

                      begin{document}
                      target{8}{6}target{6}{4}target{12}{6}
                      end{document}





                      share|improve this answer



























                        up vote
                        5
                        down vote













                        Here is a starting point. The idea is to use polar coordinates (I love polar coordinates) given by (angle:radius).





                        documentclass{report}
                        usepackage{tikz}

                        begin{document}
                        begin{tikzpicture}[thick]
                        foreach a in {0,45,...,315}{
                        draw (a:2)--(a:3);
                        }
                        foreach a in {0,60,...,300}{
                        draw[red] (0,0)--(90+a:1.8);
                        }

                        draw (0,0) circle (2cm);
                        end{tikzpicture}
                        end{document}


                        Some improvements: thanks for @AboAmmar



                        enter image description here



                        documentclass[margin=3mm]{standalone}
                        usepackage{tikz}
                        defnumA{}
                        defnumB{}
                        newcommand{target}[2]{%
                        renewcommand{numA}{#1}
                        renewcommand{numB}{#2}
                        begin{tikzpicture}[thick]
                        foreach i in {1,...,numA}{%
                        draw (i*360/numA:2) -- (i*360/numA:3);
                        }
                        foreach i in {1,...,numB}{%
                        draw[red] (0,0) -- (90+i*360/numB:1.7);
                        }

                        draw (0,0)node[below=3cm]{Large$numA/numB$} circle (2cm);
                        end{tikzpicture}
                        }

                        begin{document}
                        target{8}{6}target{6}{4}target{12}{6}
                        end{document}





                        share|improve this answer

























                          up vote
                          5
                          down vote










                          up vote
                          5
                          down vote









                          Here is a starting point. The idea is to use polar coordinates (I love polar coordinates) given by (angle:radius).





                          documentclass{report}
                          usepackage{tikz}

                          begin{document}
                          begin{tikzpicture}[thick]
                          foreach a in {0,45,...,315}{
                          draw (a:2)--(a:3);
                          }
                          foreach a in {0,60,...,300}{
                          draw[red] (0,0)--(90+a:1.8);
                          }

                          draw (0,0) circle (2cm);
                          end{tikzpicture}
                          end{document}


                          Some improvements: thanks for @AboAmmar



                          enter image description here



                          documentclass[margin=3mm]{standalone}
                          usepackage{tikz}
                          defnumA{}
                          defnumB{}
                          newcommand{target}[2]{%
                          renewcommand{numA}{#1}
                          renewcommand{numB}{#2}
                          begin{tikzpicture}[thick]
                          foreach i in {1,...,numA}{%
                          draw (i*360/numA:2) -- (i*360/numA:3);
                          }
                          foreach i in {1,...,numB}{%
                          draw[red] (0,0) -- (90+i*360/numB:1.7);
                          }

                          draw (0,0)node[below=3cm]{Large$numA/numB$} circle (2cm);
                          end{tikzpicture}
                          }

                          begin{document}
                          target{8}{6}target{6}{4}target{12}{6}
                          end{document}





                          share|improve this answer














                          Here is a starting point. The idea is to use polar coordinates (I love polar coordinates) given by (angle:radius).





                          documentclass{report}
                          usepackage{tikz}

                          begin{document}
                          begin{tikzpicture}[thick]
                          foreach a in {0,45,...,315}{
                          draw (a:2)--(a:3);
                          }
                          foreach a in {0,60,...,300}{
                          draw[red] (0,0)--(90+a:1.8);
                          }

                          draw (0,0) circle (2cm);
                          end{tikzpicture}
                          end{document}


                          Some improvements: thanks for @AboAmmar



                          enter image description here



                          documentclass[margin=3mm]{standalone}
                          usepackage{tikz}
                          defnumA{}
                          defnumB{}
                          newcommand{target}[2]{%
                          renewcommand{numA}{#1}
                          renewcommand{numB}{#2}
                          begin{tikzpicture}[thick]
                          foreach i in {1,...,numA}{%
                          draw (i*360/numA:2) -- (i*360/numA:3);
                          }
                          foreach i in {1,...,numB}{%
                          draw[red] (0,0) -- (90+i*360/numB:1.7);
                          }

                          draw (0,0)node[below=3cm]{Large$numA/numB$} circle (2cm);
                          end{tikzpicture}
                          }

                          begin{document}
                          target{8}{6}target{6}{4}target{12}{6}
                          end{document}






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 19 at 18:59

























                          answered Nov 19 at 18:16









                          Sigur

                          23.4k354135




                          23.4k354135






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460796%2fgeneric-symmetric-drawing%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              404 Error Contact Form 7 ajax form submitting

                              How to know if a Active Directory user can login interactively

                              Refactoring coordinates for Minecraft Pi buildings written in Python