Random Double Arc Endpoint AnglesRotate a node but not its content: the case of the ellipse decorationDrawing circular paths in random locations (TikZ)TikZ/ERD: node (=Entity) label on the insideHow to create a random string of random lengthMaking a random numberA random, smooth ellipse in TikZTikZ: Drawing an arc from an intersection to an intersectionLine up nested tikz enviroments or how to get rid of themRandom dots excluding certain values or range of valuesTikZ distinct random integers

New Math Formula?

Circular Reasoning for Epsilon-Delta Proof?

How to prevent clipped screen edges on my TV, HDMI-connected?

Compelling story with the world as a villain

How do I make my image comply with the requirements of this photography competition?

If two Lore Bards used the Cutting Words feature on an ability check or attack, would they stack?

Why is the UK so keen to remove the "backstop" when their leadership seems to think that no border will be needed in Northern Ireland?

How do the Etherealness and Banishment spells interact?

Why in most German places is the church the tallest building?

Another solution to create a set with two conditions

The No-Free-Lunch Theorem and K-NN consistency

“T” in subscript in formulas

If an earthquake can destroy buildings why it cant kill us according to physics?

Does an atom recoil when photon radiate?

Does this VCO produce a sine wave or square wave

Are there any elected officials in the U.S. who are not legislators, judges, or constitutional officers?

How long do you think advanced cybernetic implants would plausibly last?

How would a Creature that needs to be seen by Humans evolve?

Add newline to prompt if it's too long

Duplicate instruments in unison in an orchestra

Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?

Improving Performance of an XY Monte Carlo

Disambiguation of "nobis vobis" and "nobis nobis"

Why is 1. d4 Nf6 2. c4 e6 3. Bg5 almost never played?



Random Double Arc Endpoint Angles


Rotate a node but not its content: the case of the ellipse decorationDrawing circular paths in random locations (TikZ)TikZ/ERD: node (=Entity) label on the insideHow to create a random string of random lengthMaking a random numberA random, smooth ellipse in TikZTikZ: Drawing an arc from an intersection to an intersectionLine up nested tikz enviroments or how to get rid of themRandom dots excluding certain values or range of valuesTikZ distinct random integers






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















I am trying to add some randomness to a double arc using random steps. The top and bottom endpoints of the arc are not at the same angles as the same arc drawn normally.



Random double arc



documentclassarticle
usepackagetikz
usetikzlibrarydecorations.pathmorphing
tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
begindocument
begintikzpicture
draw[double distance=1cm, double=yellow, rough, color=red] (0,0) arc (0:90:3);
draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
endtikzpicture
enddocument


I want the following angles at the endpoints, with random steps in between:



smooth double arc



How do I make the double arc's endpoints perfectly horizontal and vertical (preferably in a way that works with any amplitude and segment length)?










share|improve this question





















  • 2





    Draw little extra and Use clip to crop it

    – nidhin
    Aug 12 at 14:57

















4















I am trying to add some randomness to a double arc using random steps. The top and bottom endpoints of the arc are not at the same angles as the same arc drawn normally.



Random double arc



documentclassarticle
usepackagetikz
usetikzlibrarydecorations.pathmorphing
tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
begindocument
begintikzpicture
draw[double distance=1cm, double=yellow, rough, color=red] (0,0) arc (0:90:3);
draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
endtikzpicture
enddocument


I want the following angles at the endpoints, with random steps in between:



smooth double arc



How do I make the double arc's endpoints perfectly horizontal and vertical (preferably in a way that works with any amplitude and segment length)?










share|improve this question





















  • 2





    Draw little extra and Use clip to crop it

    – nidhin
    Aug 12 at 14:57













4












4








4








I am trying to add some randomness to a double arc using random steps. The top and bottom endpoints of the arc are not at the same angles as the same arc drawn normally.



Random double arc



documentclassarticle
usepackagetikz
usetikzlibrarydecorations.pathmorphing
tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
begindocument
begintikzpicture
draw[double distance=1cm, double=yellow, rough, color=red] (0,0) arc (0:90:3);
draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
endtikzpicture
enddocument


I want the following angles at the endpoints, with random steps in between:



smooth double arc



How do I make the double arc's endpoints perfectly horizontal and vertical (preferably in a way that works with any amplitude and segment length)?










share|improve this question
















I am trying to add some randomness to a double arc using random steps. The top and bottom endpoints of the arc are not at the same angles as the same arc drawn normally.



Random double arc



documentclassarticle
usepackagetikz
usetikzlibrarydecorations.pathmorphing
tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
begindocument
begintikzpicture
draw[double distance=1cm, double=yellow, rough, color=red] (0,0) arc (0:90:3);
draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
endtikzpicture
enddocument


I want the following angles at the endpoints, with random steps in between:



smooth double arc



How do I make the double arc's endpoints perfectly horizontal and vertical (preferably in a way that works with any amplitude and segment length)?







tikz-pgf decorations random






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 12 at 16:46







anonymous_pigeon

















asked Aug 12 at 14:26









anonymous_pigeonanonymous_pigeon

898 bronze badges




898 bronze badges










  • 2





    Draw little extra and Use clip to crop it

    – nidhin
    Aug 12 at 14:57












  • 2





    Draw little extra and Use clip to crop it

    – nidhin
    Aug 12 at 14:57







2




2





Draw little extra and Use clip to crop it

– nidhin
Aug 12 at 14:57





Draw little extra and Use clip to crop it

– nidhin
Aug 12 at 14:57










2 Answers
2






active

oldest

votes


















6















One way is to draw little extra double arc and crop it using clip. In order to draw little longer double arc, polar coordinates are used.



draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);


A rectanglar cropping is done using clip.



clip (0,0) rectangle (4,4);


enter image description here



See MWE below.



documentclassarticle
usepackagetikz
usetikzlibrarydecorations.pathmorphing
tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
begindocument
begintikzpicture
beginscope[xshift=-3cm] % <-added
clip (0,0) rectangle (4,4); % <-added
draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);% <-changed
endscope
draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
endtikzpicture
enddocument


EDIT



Triangular clipping can be used for clipping other angle ranges.



Example:



clip (0:0) -- (10:6) -- (80:6)--cycle;


and



clip (0:0) -- (30:6) -- (60:6)--cycle;


produces following output.



enter image description here






share|improve this answer



























  • Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

    – anonymous_pigeon
    Aug 12 at 16:02






  • 1





    @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

    – nidhin
    Aug 12 at 16:07


















5















Just for fun: a reminder that one can switch on and off decorations along a path.



documentclassarticle
usepackagetikz
usetikzlibrarydecorations.pathmorphing
tikzsetrough/.style=decoration=random steps,segment length=6pt
begindocument
begintikzpicture
draw[red,fill=yellow, rough] (0.5,0) decorate arc (0:90:3.5)
-- ++(0,-1)
decorate arc(90:0:2.5) -- cycle ;
draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
endtikzpicture
enddocument


enter image description here






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',
    autoActivateHeartbeat: false,
    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%2f503927%2frandom-double-arc-endpoint-angles%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









    6















    One way is to draw little extra double arc and crop it using clip. In order to draw little longer double arc, polar coordinates are used.



    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);


    A rectanglar cropping is done using clip.



    clip (0,0) rectangle (4,4);


    enter image description here



    See MWE below.



    documentclassarticle
    usepackagetikz
    usetikzlibrarydecorations.pathmorphing
    tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
    begindocument
    begintikzpicture
    beginscope[xshift=-3cm] % <-added
    clip (0,0) rectangle (4,4); % <-added
    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);% <-changed
    endscope
    draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
    endtikzpicture
    enddocument


    EDIT



    Triangular clipping can be used for clipping other angle ranges.



    Example:



    clip (0:0) -- (10:6) -- (80:6)--cycle;


    and



    clip (0:0) -- (30:6) -- (60:6)--cycle;


    produces following output.



    enter image description here






    share|improve this answer



























    • Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

      – anonymous_pigeon
      Aug 12 at 16:02






    • 1





      @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

      – nidhin
      Aug 12 at 16:07















    6















    One way is to draw little extra double arc and crop it using clip. In order to draw little longer double arc, polar coordinates are used.



    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);


    A rectanglar cropping is done using clip.



    clip (0,0) rectangle (4,4);


    enter image description here



    See MWE below.



    documentclassarticle
    usepackagetikz
    usetikzlibrarydecorations.pathmorphing
    tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
    begindocument
    begintikzpicture
    beginscope[xshift=-3cm] % <-added
    clip (0,0) rectangle (4,4); % <-added
    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);% <-changed
    endscope
    draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
    endtikzpicture
    enddocument


    EDIT



    Triangular clipping can be used for clipping other angle ranges.



    Example:



    clip (0:0) -- (10:6) -- (80:6)--cycle;


    and



    clip (0:0) -- (30:6) -- (60:6)--cycle;


    produces following output.



    enter image description here






    share|improve this answer



























    • Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

      – anonymous_pigeon
      Aug 12 at 16:02






    • 1





      @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

      – nidhin
      Aug 12 at 16:07













    6














    6










    6









    One way is to draw little extra double arc and crop it using clip. In order to draw little longer double arc, polar coordinates are used.



    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);


    A rectanglar cropping is done using clip.



    clip (0,0) rectangle (4,4);


    enter image description here



    See MWE below.



    documentclassarticle
    usepackagetikz
    usetikzlibrarydecorations.pathmorphing
    tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
    begindocument
    begintikzpicture
    beginscope[xshift=-3cm] % <-added
    clip (0,0) rectangle (4,4); % <-added
    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);% <-changed
    endscope
    draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
    endtikzpicture
    enddocument


    EDIT



    Triangular clipping can be used for clipping other angle ranges.



    Example:



    clip (0:0) -- (10:6) -- (80:6)--cycle;


    and



    clip (0:0) -- (30:6) -- (60:6)--cycle;


    produces following output.



    enter image description here






    share|improve this answer















    One way is to draw little extra double arc and crop it using clip. In order to draw little longer double arc, polar coordinates are used.



    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);


    A rectanglar cropping is done using clip.



    clip (0,0) rectangle (4,4);


    enter image description here



    See MWE below.



    documentclassarticle
    usepackagetikz
    usetikzlibrarydecorations.pathmorphing
    tikzsetrough/.style=decorate,decoration=random steps,segment length=6pt
    begindocument
    begintikzpicture
    beginscope[xshift=-3cm] % <-added
    clip (0,0) rectangle (4,4); % <-added
    draw[double distance=1cm, double=yellow, rough, color=red] (-10:3) arc (-10:100:3);% <-changed
    endscope
    draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
    endtikzpicture
    enddocument


    EDIT



    Triangular clipping can be used for clipping other angle ranges.



    Example:



    clip (0:0) -- (10:6) -- (80:6)--cycle;


    and



    clip (0:0) -- (30:6) -- (60:6)--cycle;


    produces following output.



    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 12 at 18:14

























    answered Aug 12 at 15:43









    nidhinnidhin

    4,6221 gold badge10 silver badges27 bronze badges




    4,6221 gold badge10 silver badges27 bronze badges















    • Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

      – anonymous_pigeon
      Aug 12 at 16:02






    • 1





      @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

      – nidhin
      Aug 12 at 16:07

















    • Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

      – anonymous_pigeon
      Aug 12 at 16:02






    • 1





      @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

      – nidhin
      Aug 12 at 16:07
















    Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

    – anonymous_pigeon
    Aug 12 at 16:02





    Thank you for this solution! Is it possible to cleanly clip the arc in a way that works for other angle ranges (-30:30 degrees for example)?

    – anonymous_pigeon
    Aug 12 at 16:02




    1




    1





    @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

    – nidhin
    Aug 12 at 16:07





    @anonymous_pigeon yes. In that case clipping path has to be changed from rectangle to required shape (double arc).

    – nidhin
    Aug 12 at 16:07













    5















    Just for fun: a reminder that one can switch on and off decorations along a path.



    documentclassarticle
    usepackagetikz
    usetikzlibrarydecorations.pathmorphing
    tikzsetrough/.style=decoration=random steps,segment length=6pt
    begindocument
    begintikzpicture
    draw[red,fill=yellow, rough] (0.5,0) decorate arc (0:90:3.5)
    -- ++(0,-1)
    decorate arc(90:0:2.5) -- cycle ;
    draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
    endtikzpicture
    enddocument


    enter image description here






    share|improve this answer





























      5















      Just for fun: a reminder that one can switch on and off decorations along a path.



      documentclassarticle
      usepackagetikz
      usetikzlibrarydecorations.pathmorphing
      tikzsetrough/.style=decoration=random steps,segment length=6pt
      begindocument
      begintikzpicture
      draw[red,fill=yellow, rough] (0.5,0) decorate arc (0:90:3.5)
      -- ++(0,-1)
      decorate arc(90:0:2.5) -- cycle ;
      draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
      endtikzpicture
      enddocument


      enter image description here






      share|improve this answer



























        5














        5










        5









        Just for fun: a reminder that one can switch on and off decorations along a path.



        documentclassarticle
        usepackagetikz
        usetikzlibrarydecorations.pathmorphing
        tikzsetrough/.style=decoration=random steps,segment length=6pt
        begindocument
        begintikzpicture
        draw[red,fill=yellow, rough] (0.5,0) decorate arc (0:90:3.5)
        -- ++(0,-1)
        decorate arc(90:0:2.5) -- cycle ;
        draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
        endtikzpicture
        enddocument


        enter image description here






        share|improve this answer













        Just for fun: a reminder that one can switch on and off decorations along a path.



        documentclassarticle
        usepackagetikz
        usetikzlibrarydecorations.pathmorphing
        tikzsetrough/.style=decoration=random steps,segment length=6pt
        begindocument
        begintikzpicture
        draw[red,fill=yellow, rough] (0.5,0) decorate arc (0:90:3.5)
        -- ++(0,-1)
        decorate arc(90:0:2.5) -- cycle ;
        draw[line width=0.01cm] (0,0) arc (0:90:3) -- (-3,0) -- cycle;
        endtikzpicture
        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 12 at 23:35







        user121799





































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f503927%2frandom-double-arc-endpoint-angles%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

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form