How to draw two concentric simple closed curves using tikz
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
What is a small piece ot tikz code for reproducing the figure below ?
Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf
Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.
draw
add a comment |Â
up vote
3
down vote
favorite
What is a small piece ot tikz code for reproducing the figure below ?
Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf
Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.
draw
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
What is a small piece ot tikz code for reproducing the figure below ?
Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf
Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.
draw
What is a small piece ot tikz code for reproducing the figure below ?
Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf
Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.
draw
edited Aug 22 at 14:23
marmot
55.4k460121
55.4k460121
asked Aug 22 at 14:00
dohmatob
1183
1183
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
Welcome to TeX.SE! EDIT: Adjusted the tension
parameter to get a smoother output.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
This animation shows a bit what tension does.
documentclass[tikz,border=3.14mm]standalone
begindocument
foreach X in 0.5,0.6,...,1.5
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
Of course, you can also adjust the coordinates.
add a comment |Â
up vote
4
down vote
You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle
, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)..
. You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.
documentclass[tikz,border=5pt]standalone
usetikzlibraryarrows.meta
begindocument
begintikzpicture[scale=.5, > = Stealth]
draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
(-2,3) .. controls (-1,5) and (1,5.3) ..
(2,5) .. controls (5,4) and (3,0) ..
(1,0) -- cycle;
draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
Welcome to TeX.SE! EDIT: Adjusted the tension
parameter to get a smoother output.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
This animation shows a bit what tension does.
documentclass[tikz,border=3.14mm]standalone
begindocument
foreach X in 0.5,0.6,...,1.5
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
Of course, you can also adjust the coordinates.
add a comment |Â
up vote
5
down vote
accepted
Welcome to TeX.SE! EDIT: Adjusted the tension
parameter to get a smoother output.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
This animation shows a bit what tension does.
documentclass[tikz,border=3.14mm]standalone
begindocument
foreach X in 0.5,0.6,...,1.5
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
Of course, you can also adjust the coordinates.
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
Welcome to TeX.SE! EDIT: Adjusted the tension
parameter to get a smoother output.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
This animation shows a bit what tension does.
documentclass[tikz,border=3.14mm]standalone
begindocument
foreach X in 0.5,0.6,...,1.5
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
Of course, you can also adjust the coordinates.
Welcome to TeX.SE! EDIT: Adjusted the tension
parameter to get a smoother output.
documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
This animation shows a bit what tension does.
documentclass[tikz,border=3.14mm]standalone
begindocument
foreach X in 0.5,0.6,...,1.5
begintikzpicture
draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
(1.2,-0.3) (0.4,-0.4);
draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
Of course, you can also adjust the coordinates.
edited Aug 22 at 16:29
answered Aug 22 at 14:20
marmot
55.4k460121
55.4k460121
add a comment |Â
add a comment |Â
up vote
4
down vote
You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle
, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)..
. You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.
documentclass[tikz,border=5pt]standalone
usetikzlibraryarrows.meta
begindocument
begintikzpicture[scale=.5, > = Stealth]
draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
(-2,3) .. controls (-1,5) and (1,5.3) ..
(2,5) .. controls (5,4) and (3,0) ..
(1,0) -- cycle;
draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle
, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)..
. You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.
documentclass[tikz,border=5pt]standalone
usetikzlibraryarrows.meta
begindocument
begintikzpicture[scale=.5, > = Stealth]
draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
(-2,3) .. controls (-1,5) and (1,5.3) ..
(2,5) .. controls (5,4) and (3,0) ..
(1,0) -- cycle;
draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
up vote
4
down vote
You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle
, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)..
. You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.
documentclass[tikz,border=5pt]standalone
usetikzlibraryarrows.meta
begindocument
begintikzpicture[scale=.5, > = Stealth]
draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
(-2,3) .. controls (-1,5) and (1,5.3) ..
(2,5) .. controls (5,4) and (3,0) ..
(1,0) -- cycle;
draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle
, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)..
. You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.
documentclass[tikz,border=5pt]standalone
usetikzlibraryarrows.meta
begindocument
begintikzpicture[scale=.5, > = Stealth]
draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
(-2,3) .. controls (-1,5) and (1,5.3) ..
(2,5) .. controls (5,4) and (3,0) ..
(1,0) -- cycle;
draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
endtikzpicture
enddocument
edited Aug 22 at 17:51
answered Aug 22 at 17:43
AboAmmar
30.4k22780
30.4k22780
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447181%2fhow-to-draw-two-concentric-simple-closed-curves-using-tikz%23new-answer', 'question_page');
);
Post as a guest
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
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
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