What was used to draw the rope?











up vote
17
down vote

favorite
6












I came across the following to draw a rope connecting two points. Is this a custom-made object, or is this something that came from a package?



If it is custom-made, what is the best way of constructing something like this without the code being overly convoluted?



enter image description here










share|improve this question


















  • 1




    What makes you think that this was drawn with TikZ?
    – Henri Menke
    Oct 9 at 11:42






  • 6




    Questions asking us to recommend or find a package, font, tool, book or other off-site resource are off-topic as they usually do not revolve around an abstract issue. Instead, describe the problem and what has been done so far to solve it or, if applicable, ask on Software Recommendations SX.
    – Henri Menke
    Oct 9 at 11:42






  • 6




    I'm voting to reopen this question. The question itself may not show any effort, but the answer is great and useful for many things. It would be a waste to hide it under a question put on hold.
    – samcarter
    Oct 9 at 21:06















up vote
17
down vote

favorite
6












I came across the following to draw a rope connecting two points. Is this a custom-made object, or is this something that came from a package?



If it is custom-made, what is the best way of constructing something like this without the code being overly convoluted?



enter image description here










share|improve this question


















  • 1




    What makes you think that this was drawn with TikZ?
    – Henri Menke
    Oct 9 at 11:42






  • 6




    Questions asking us to recommend or find a package, font, tool, book or other off-site resource are off-topic as they usually do not revolve around an abstract issue. Instead, describe the problem and what has been done so far to solve it or, if applicable, ask on Software Recommendations SX.
    – Henri Menke
    Oct 9 at 11:42






  • 6




    I'm voting to reopen this question. The question itself may not show any effort, but the answer is great and useful for many things. It would be a waste to hide it under a question put on hold.
    – samcarter
    Oct 9 at 21:06













up vote
17
down vote

favorite
6









up vote
17
down vote

favorite
6






6





I came across the following to draw a rope connecting two points. Is this a custom-made object, or is this something that came from a package?



If it is custom-made, what is the best way of constructing something like this without the code being overly convoluted?



enter image description here










share|improve this question













I came across the following to draw a rope connecting two points. Is this a custom-made object, or is this something that came from a package?



If it is custom-made, what is the best way of constructing something like this without the code being overly convoluted?



enter image description here







tikz-pgf draw






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 9 at 9:43









Trogdor

34718




34718








  • 1




    What makes you think that this was drawn with TikZ?
    – Henri Menke
    Oct 9 at 11:42






  • 6




    Questions asking us to recommend or find a package, font, tool, book or other off-site resource are off-topic as they usually do not revolve around an abstract issue. Instead, describe the problem and what has been done so far to solve it or, if applicable, ask on Software Recommendations SX.
    – Henri Menke
    Oct 9 at 11:42






  • 6




    I'm voting to reopen this question. The question itself may not show any effort, but the answer is great and useful for many things. It would be a waste to hide it under a question put on hold.
    – samcarter
    Oct 9 at 21:06














  • 1




    What makes you think that this was drawn with TikZ?
    – Henri Menke
    Oct 9 at 11:42






  • 6




    Questions asking us to recommend or find a package, font, tool, book or other off-site resource are off-topic as they usually do not revolve around an abstract issue. Instead, describe the problem and what has been done so far to solve it or, if applicable, ask on Software Recommendations SX.
    – Henri Menke
    Oct 9 at 11:42






  • 6




    I'm voting to reopen this question. The question itself may not show any effort, but the answer is great and useful for many things. It would be a waste to hide it under a question put on hold.
    – samcarter
    Oct 9 at 21:06








1




1




What makes you think that this was drawn with TikZ?
– Henri Menke
Oct 9 at 11:42




What makes you think that this was drawn with TikZ?
– Henri Menke
Oct 9 at 11:42




6




6




Questions asking us to recommend or find a package, font, tool, book or other off-site resource are off-topic as they usually do not revolve around an abstract issue. Instead, describe the problem and what has been done so far to solve it or, if applicable, ask on Software Recommendations SX.
– Henri Menke
Oct 9 at 11:42




Questions asking us to recommend or find a package, font, tool, book or other off-site resource are off-topic as they usually do not revolve around an abstract issue. Instead, describe the problem and what has been done so far to solve it or, if applicable, ask on Software Recommendations SX.
– Henri Menke
Oct 9 at 11:42




6




6




I'm voting to reopen this question. The question itself may not show any effort, but the answer is great and useful for many things. It would be a waste to hide it under a question put on hold.
– samcarter
Oct 9 at 21:06




I'm voting to reopen this question. The question itself may not show any effort, but the answer is great and useful for many things. It would be a waste to hide it under a question put on hold.
– samcarter
Oct 9 at 21:06










1 Answer
1






active

oldest

votes

















up vote
41
down vote



accepted










It is not too difficult to draw something along these lines.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}
draw[decorate,decoration={markings,
mark=between positions 2mm and pgfdecoratedpathlength-2mm step 2mm
with
{
draw[ultra thick,gray]
(-3.5mm,-1.25mm) to[out=0,in=160] (-2mm,-1.25mm) to[out=-20,in=160]
(2mm,1.25mm) to[out=-20,in=180] (3.5mm,1.25mm);
}}]
(0,0) -- (4,-4);
fill (0,0) circle (3mm);
end{tikzpicture}
end{document}


enter image description here



An arguably cleaner way is to do it with decorations.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun

pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[red,thick,decorate,rope width=8pt] (-4,0) to[out=0,in=90] (0,-4);
draw[gray,thick,decorate] (0,0) to (4,-4);
draw[blue,ultra thick,decorate,rope width=8pt] (4,0) to (8,-4);
fill (-4,0) circle (8pt) (0,0) circle (8pt) (4,0) circle (8pt);
end{tikzpicture}
end{document}


enter image description here



All these decorations leave some room for improvement, in particular the one along the curved path has small gaps.



ADDENDUM: Here is a version that does not leave gaps. Yet it does not look too good when the curvature is large.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun
newcounter{ropept}
pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
setcounter{ropept}{0}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfmoveto{pgfpointanchor{rope-auxA-theropept}{center}}
pgfpathlineto{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
stepcounter{ropept}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
xdefLastRope{theropept}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[decorate] plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
typeout{theropept}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
    – Bart
    Oct 12 at 19:17










  • @Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
    – marmot
    Oct 12 at 20:16










  • How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
    – Thumbolt
    2 hours ago










  • @Thumbolt What is a "free" curve?
    – marmot
    2 hours ago










  • Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
    – Thumbolt
    1 hour 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: 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%2f454478%2fwhat-was-used-to-draw-the-rope%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
41
down vote



accepted










It is not too difficult to draw something along these lines.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}
draw[decorate,decoration={markings,
mark=between positions 2mm and pgfdecoratedpathlength-2mm step 2mm
with
{
draw[ultra thick,gray]
(-3.5mm,-1.25mm) to[out=0,in=160] (-2mm,-1.25mm) to[out=-20,in=160]
(2mm,1.25mm) to[out=-20,in=180] (3.5mm,1.25mm);
}}]
(0,0) -- (4,-4);
fill (0,0) circle (3mm);
end{tikzpicture}
end{document}


enter image description here



An arguably cleaner way is to do it with decorations.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun

pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[red,thick,decorate,rope width=8pt] (-4,0) to[out=0,in=90] (0,-4);
draw[gray,thick,decorate] (0,0) to (4,-4);
draw[blue,ultra thick,decorate,rope width=8pt] (4,0) to (8,-4);
fill (-4,0) circle (8pt) (0,0) circle (8pt) (4,0) circle (8pt);
end{tikzpicture}
end{document}


enter image description here



All these decorations leave some room for improvement, in particular the one along the curved path has small gaps.



ADDENDUM: Here is a version that does not leave gaps. Yet it does not look too good when the curvature is large.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun
newcounter{ropept}
pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
setcounter{ropept}{0}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfmoveto{pgfpointanchor{rope-auxA-theropept}{center}}
pgfpathlineto{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
stepcounter{ropept}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
xdefLastRope{theropept}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[decorate] plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
typeout{theropept}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
    – Bart
    Oct 12 at 19:17










  • @Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
    – marmot
    Oct 12 at 20:16










  • How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
    – Thumbolt
    2 hours ago










  • @Thumbolt What is a "free" curve?
    – marmot
    2 hours ago










  • Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
    – Thumbolt
    1 hour ago

















up vote
41
down vote



accepted










It is not too difficult to draw something along these lines.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}
draw[decorate,decoration={markings,
mark=between positions 2mm and pgfdecoratedpathlength-2mm step 2mm
with
{
draw[ultra thick,gray]
(-3.5mm,-1.25mm) to[out=0,in=160] (-2mm,-1.25mm) to[out=-20,in=160]
(2mm,1.25mm) to[out=-20,in=180] (3.5mm,1.25mm);
}}]
(0,0) -- (4,-4);
fill (0,0) circle (3mm);
end{tikzpicture}
end{document}


enter image description here



An arguably cleaner way is to do it with decorations.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun

pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[red,thick,decorate,rope width=8pt] (-4,0) to[out=0,in=90] (0,-4);
draw[gray,thick,decorate] (0,0) to (4,-4);
draw[blue,ultra thick,decorate,rope width=8pt] (4,0) to (8,-4);
fill (-4,0) circle (8pt) (0,0) circle (8pt) (4,0) circle (8pt);
end{tikzpicture}
end{document}


enter image description here



All these decorations leave some room for improvement, in particular the one along the curved path has small gaps.



ADDENDUM: Here is a version that does not leave gaps. Yet it does not look too good when the curvature is large.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun
newcounter{ropept}
pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
setcounter{ropept}{0}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfmoveto{pgfpointanchor{rope-auxA-theropept}{center}}
pgfpathlineto{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
stepcounter{ropept}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
xdefLastRope{theropept}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[decorate] plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
typeout{theropept}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
    – Bart
    Oct 12 at 19:17










  • @Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
    – marmot
    Oct 12 at 20:16










  • How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
    – Thumbolt
    2 hours ago










  • @Thumbolt What is a "free" curve?
    – marmot
    2 hours ago










  • Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
    – Thumbolt
    1 hour ago















up vote
41
down vote



accepted







up vote
41
down vote



accepted






It is not too difficult to draw something along these lines.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}
draw[decorate,decoration={markings,
mark=between positions 2mm and pgfdecoratedpathlength-2mm step 2mm
with
{
draw[ultra thick,gray]
(-3.5mm,-1.25mm) to[out=0,in=160] (-2mm,-1.25mm) to[out=-20,in=160]
(2mm,1.25mm) to[out=-20,in=180] (3.5mm,1.25mm);
}}]
(0,0) -- (4,-4);
fill (0,0) circle (3mm);
end{tikzpicture}
end{document}


enter image description here



An arguably cleaner way is to do it with decorations.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun

pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[red,thick,decorate,rope width=8pt] (-4,0) to[out=0,in=90] (0,-4);
draw[gray,thick,decorate] (0,0) to (4,-4);
draw[blue,ultra thick,decorate,rope width=8pt] (4,0) to (8,-4);
fill (-4,0) circle (8pt) (0,0) circle (8pt) (4,0) circle (8pt);
end{tikzpicture}
end{document}


enter image description here



All these decorations leave some room for improvement, in particular the one along the curved path has small gaps.



ADDENDUM: Here is a version that does not leave gaps. Yet it does not look too good when the curvature is large.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun
newcounter{ropept}
pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
setcounter{ropept}{0}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfmoveto{pgfpointanchor{rope-auxA-theropept}{center}}
pgfpathlineto{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
stepcounter{ropept}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
xdefLastRope{theropept}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[decorate] plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
typeout{theropept}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer














It is not too difficult to draw something along these lines.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}
draw[decorate,decoration={markings,
mark=between positions 2mm and pgfdecoratedpathlength-2mm step 2mm
with
{
draw[ultra thick,gray]
(-3.5mm,-1.25mm) to[out=0,in=160] (-2mm,-1.25mm) to[out=-20,in=160]
(2mm,1.25mm) to[out=-20,in=180] (3.5mm,1.25mm);
}}]
(0,0) -- (4,-4);
fill (0,0) circle (3mm);
end{tikzpicture}
end{document}


enter image description here



An arguably cleaner way is to do it with decorations.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun

pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfcoordinate{lastup}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[red,thick,decorate,rope width=8pt] (-4,0) to[out=0,in=90] (0,-4);
draw[gray,thick,decorate] (0,0) to (4,-4);
draw[blue,ultra thick,decorate,rope width=8pt] (4,0) to (8,-4);
fill (-4,0) circle (8pt) (0,0) circle (8pt) (4,0) circle (8pt);
end{tikzpicture}
end{document}


enter image description here



All these decorations leave some room for improvement, in particular the one along the curved path has small gaps.



ADDENDUM: Here is a version that does not leave gaps. Yet it does not look too good when the curvature is large.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations} % decorations.text just 4 fun
newcounter{ropept}
pgfkeys{/tikz/.cd,
rope width/.store in=RopeWidth,
rope width=5pt,
rope step/.store in=RopeStep,
rope step=2mm,
}

pgfdeclaredecoration{rope}{initial}
{%
state{initial}[width=RopeStep,next state=cont] {
pgfmoveto{pgfpoint{0pt}{-RopeWidth/2}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{1.5*RopeStep}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
setcounter{ropept}{0}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{cont}[width=RopeStep]{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-3*RopeStep/6}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{3*RopeStep/6}{0pt}}
pgfpathcurveto
{pgfpoint{5*RopeStep/6}{0.25*RopeWidth}}
{pgfpoint{7*RopeStep/6}{0.45*RopeWidth}}
{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
pgfpathcurveto
{pgfpoint{10*RopeStep/6}{0.55*RopeWidth}}
{pgfpoint{11*RopeStep/6}{0.6*RopeWidth}}
{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
pgfmoveto{pgfpointanchor{rope-auxA-theropept}{center}}
pgfpathlineto{pgfpoint{9*RopeStep/6}{RopeWidth/2}}
stepcounter{ropept}
pgfcoordinate{lastup-theropept}{pgfpoint{-1.5*RopeStep/6}{-RopeWidth/2}}
pgfcoordinate{rope-auxA-theropept}{pgfpoint{13.5*RopeStep/6}{RopeWidth/2}}
}
state{final}[width=5pt]
{
pgfmoveto{pgfpointanchor{lastup-theropept}{center}}
pgfpathcurveto
{pgfpoint{-5*RopeStep/6}{-0.6*RopeWidth}}
{pgfpoint{-4*RopeStep/6}{-0.55*RopeWidth}}
{pgfpoint{-0.5*RopeStep}{-0.55*RopeWidth}}
pgfpathcurveto
{pgfpoint{-RopeStep/6}{-0.45*RopeWidth}}
{pgfpoint{RopeStep/6}{-0.25*RopeWidth}}
{pgfpoint{0.5*RopeStep}{0pt}}
pgfmoveto{pgfpointdecoratedpathlast}
xdefLastRope{theropept}
}
}
begin{document}
begin{tikzpicture}[decoration=rope]
draw[decorate] plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
typeout{theropept}
end{tikzpicture}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 19 mins ago

























answered Oct 9 at 11:42









marmot

78.7k487166




78.7k487166












  • feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
    – Bart
    Oct 12 at 19:17










  • @Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
    – marmot
    Oct 12 at 20:16










  • How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
    – Thumbolt
    2 hours ago










  • @Thumbolt What is a "free" curve?
    – marmot
    2 hours ago










  • Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
    – Thumbolt
    1 hour ago




















  • feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
    – Bart
    Oct 12 at 19:17










  • @Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
    – marmot
    Oct 12 at 20:16










  • How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
    – Thumbolt
    2 hours ago










  • @Thumbolt What is a "free" curve?
    – marmot
    2 hours ago










  • Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
    – Thumbolt
    1 hour ago


















feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
– Bart
Oct 12 at 19:17




feel free to include a rope decoration into your answer to my arithmetic rope question if you like...
– Bart
Oct 12 at 19:17












@Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
– marmot
Oct 12 at 20:16




@Bart Yes, I'll do. Thanks for your patience. There are still things that I do not understand and within the next week there is no 2h window in which I have time to systematically study what's going on.
– marmot
Oct 12 at 20:16












How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
– Thumbolt
2 hours ago




How can I add the [decoration=rope] to the draw plot so that I get a free curve with this rope pattern?
– Thumbolt
2 hours ago












@Thumbolt What is a "free" curve?
– marmot
2 hours ago




@Thumbolt What is a "free" curve?
– marmot
2 hours ago












Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
– Thumbolt
1 hour ago






Say, draw plot[smooth cycle, fill=yellow, thick] coordinates{ (4.,8.4) (6.5,9.) (8.,9) (9.,8.1) (11.34,6.18) (11,4) (11.3,2.2) (10.2 7,0.7 ) (8. 4,0.14) (6.2,0.29) (4.40,0.51) (3.2,0.29) (1.5,0.34) } ;
– Thumbolt
1 hour 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%2f454478%2fwhat-was-used-to-draw-the-rope%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

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)