How to add patterns inside shapes bounded by curves?
Clash Royale CLAN TAG#URR8PPP
It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
draw (-5.5,1) arc (180:360:1 and .25);
draw (1.5,1) arc (180:360:1 and .25);
endtikzpicture
enddocument
tikz-pgf pattern
add a comment |
It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
draw (-5.5,1) arc (180:360:1 and .25);
draw (1.5,1) arc (180:360:1 and .25);
endtikzpicture
enddocument
tikz-pgf pattern
add a comment |
It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
draw (-5.5,1) arc (180:360:1 and .25);
draw (1.5,1) arc (180:360:1 and .25);
endtikzpicture
enddocument
tikz-pgf pattern
It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
draw (-5.5,1) arc (180:360:1 and .25);
draw (1.5,1) arc (180:360:1 and .25);
endtikzpicture
enddocument
tikz-pgf pattern
tikz-pgf pattern
edited Feb 3 at 7:57
hpekristiansen
5,38362866
5,38362866
asked Feb 3 at 7:14
C.F.GC.F.G
582312
582312
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:
documentclassarticle
usepackagetikz
usetikzlibrarypatterns
begindocument
begintikzpicture
draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
endtikzpicture
enddocument
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX You meant to saypath[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)
– marmot
Feb 3 at 16:22
1
@marmot Yes,path
, lapsus!
– CarLaTeX
Feb 3 at 16:28
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
add a comment |
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
fill[red](-5.5,1) arc (180:360:1 and .25)
arc(180:0:2.5)
arc (180:360:1 and .25)
arc (0:180:4.5) ;
endtikzpicture
enddocument
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473140%2fhow-to-add-patterns-inside-shapes-bounded-by-curves%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
You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:
documentclassarticle
usepackagetikz
usetikzlibrarypatterns
begindocument
begintikzpicture
draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
endtikzpicture
enddocument
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX You meant to saypath[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)
– marmot
Feb 3 at 16:22
1
@marmot Yes,path
, lapsus!
– CarLaTeX
Feb 3 at 16:28
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
add a comment |
You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:
documentclassarticle
usepackagetikz
usetikzlibrarypatterns
begindocument
begintikzpicture
draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
endtikzpicture
enddocument
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX You meant to saypath[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)
– marmot
Feb 3 at 16:22
1
@marmot Yes,path
, lapsus!
– CarLaTeX
Feb 3 at 16:28
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
add a comment |
You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:
documentclassarticle
usepackagetikz
usetikzlibrarypatterns
begindocument
begintikzpicture
draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
endtikzpicture
enddocument
You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:
documentclassarticle
usepackagetikz
usetikzlibrarypatterns
begindocument
begintikzpicture
draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
endtikzpicture
enddocument
answered Feb 3 at 7:55
hpekristiansenhpekristiansen
5,38362866
5,38362866
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX You meant to saypath[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)
– marmot
Feb 3 at 16:22
1
@marmot Yes,path
, lapsus!
– CarLaTeX
Feb 3 at 16:28
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
add a comment |
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX You meant to saypath[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)
– marmot
Feb 3 at 16:22
1
@marmot Yes,path
, lapsus!
– CarLaTeX
Feb 3 at 16:28
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX I do not understand what you mean!?
– hpekristiansen
Feb 3 at 10:15
@CarLaTeX You meant to say
path[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)– marmot
Feb 3 at 16:22
@CarLaTeX You meant to say
path[pattern=horizontal lines] ...
? (fill
also does what you want it to do but this is in a way an accident.)– marmot
Feb 3 at 16:22
1
1
@marmot Yes,
path
, lapsus!– CarLaTeX
Feb 3 at 16:28
@marmot Yes,
path
, lapsus!– CarLaTeX
Feb 3 at 16:28
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?
– C.F.G
Feb 4 at 5:30
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
@C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…
– hpekristiansen
Feb 4 at 7:05
add a comment |
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
fill[red](-5.5,1) arc (180:360:1 and .25)
arc(180:0:2.5)
arc (180:360:1 and .25)
arc (0:180:4.5) ;
endtikzpicture
enddocument
add a comment |
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
fill[red](-5.5,1) arc (180:360:1 and .25)
arc(180:0:2.5)
arc (180:360:1 and .25)
arc (0:180:4.5) ;
endtikzpicture
enddocument
add a comment |
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
fill[red](-5.5,1) arc (180:360:1 and .25)
arc(180:0:2.5)
arc (180:360:1 and .25)
arc (0:180:4.5) ;
endtikzpicture
enddocument
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
fill[red](-5.5,1) arc (180:360:1 and .25)
arc(180:0:2.5)
arc (180:360:1 and .25)
arc (0:180:4.5) ;
endtikzpicture
enddocument
answered Feb 3 at 7:53
Hafid BoukhouldaHafid Boukhoulda
4,0471624
4,0471624
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473140%2fhow-to-add-patterns-inside-shapes-bounded-by-curves%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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