draw a major arc and fill it with a gray color
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am trying to draw the major sector below:
I have made some progress with the following code, but not quite what I want as I am having trouble filling the last bit of the sector.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
%fill[fill=black,opacity=0.8] (+0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
%draw [thick,dashed] (7,1) -- (8.2,1);
%draw[thick,<->](3.4,-1.52) to node[fill=white] $3.5$ cm (3.4,-3.22);
draw [thick,domain=95:355] plot (1.3*cos(x), 1.3*sin(x));
%
draw [thick,domain=94:270,fill=gray,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
%draw [thick,domain=270:300,fill=red,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
draw [thick] (1.3,-0.15) -- (0,0) -- (-0.15,1.3);
%\
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
tikz-pgf sector
add a comment |Â
up vote
2
down vote
favorite
I am trying to draw the major sector below:
I have made some progress with the following code, but not quite what I want as I am having trouble filling the last bit of the sector.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
%fill[fill=black,opacity=0.8] (+0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
%draw [thick,dashed] (7,1) -- (8.2,1);
%draw[thick,<->](3.4,-1.52) to node[fill=white] $3.5$ cm (3.4,-3.22);
draw [thick,domain=95:355] plot (1.3*cos(x), 1.3*sin(x));
%
draw [thick,domain=94:270,fill=gray,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
%draw [thick,domain=270:300,fill=red,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
draw [thick] (1.3,-0.15) -- (0,0) -- (-0.15,1.3);
%\
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
tikz-pgf sector
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am trying to draw the major sector below:
I have made some progress with the following code, but not quite what I want as I am having trouble filling the last bit of the sector.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
%fill[fill=black,opacity=0.8] (+0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
%draw [thick,dashed] (7,1) -- (8.2,1);
%draw[thick,<->](3.4,-1.52) to node[fill=white] $3.5$ cm (3.4,-3.22);
draw [thick,domain=95:355] plot (1.3*cos(x), 1.3*sin(x));
%
draw [thick,domain=94:270,fill=gray,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
%draw [thick,domain=270:300,fill=red,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
draw [thick] (1.3,-0.15) -- (0,0) -- (-0.15,1.3);
%\
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
tikz-pgf sector
I am trying to draw the major sector below:
I have made some progress with the following code, but not quite what I want as I am having trouble filling the last bit of the sector.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
%fill[fill=black,opacity=0.8] (+0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
%draw [thick,dashed] (7,1) -- (8.2,1);
%draw[thick,<->](3.4,-1.52) to node[fill=white] $3.5$ cm (3.4,-3.22);
draw [thick,domain=95:355] plot (1.3*cos(x), 1.3*sin(x));
%
draw [thick,domain=94:270,fill=gray,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
%draw [thick,domain=270:300,fill=red,opacity=0.5] plot (1.3*cos(x), 1.3*sin(x));
draw [thick] (1.3,-0.15) -- (0,0) -- (-0.15,1.3);
%\
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
tikz-pgf sector
asked Aug 25 at 7:59
Will Kim
539216
539216
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
You could draw your outline and fill it in one line of Code with draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
The (95:1.3)
moves you to the starting point of your outer perimeter, after that you draw the arc arc (95:355:1.3)
with the starting angle of 95, end angle of 355 and a radius of 1.3. Then you don't have to fiddle around with sine and cosine.
I hope I didn't misunderstood, what you wanted to achieve!
Best Regards!
Frieder
EDIT: I changed opacity=...
to fill opacity=...
. Otherwise, the dotted line would shine through.
And here is a picture:
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
You could draw your outline and fill it in one line of Code with draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
The (95:1.3)
moves you to the starting point of your outer perimeter, after that you draw the arc arc (95:355:1.3)
with the starting angle of 95, end angle of 355 and a radius of 1.3. Then you don't have to fiddle around with sine and cosine.
I hope I didn't misunderstood, what you wanted to achieve!
Best Regards!
Frieder
EDIT: I changed opacity=...
to fill opacity=...
. Otherwise, the dotted line would shine through.
And here is a picture:
add a comment |Â
up vote
4
down vote
accepted
You could draw your outline and fill it in one line of Code with draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
The (95:1.3)
moves you to the starting point of your outer perimeter, after that you draw the arc arc (95:355:1.3)
with the starting angle of 95, end angle of 355 and a radius of 1.3. Then you don't have to fiddle around with sine and cosine.
I hope I didn't misunderstood, what you wanted to achieve!
Best Regards!
Frieder
EDIT: I changed opacity=...
to fill opacity=...
. Otherwise, the dotted line would shine through.
And here is a picture:
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
You could draw your outline and fill it in one line of Code with draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
The (95:1.3)
moves you to the starting point of your outer perimeter, after that you draw the arc arc (95:355:1.3)
with the starting angle of 95, end angle of 355 and a radius of 1.3. Then you don't have to fiddle around with sine and cosine.
I hope I didn't misunderstood, what you wanted to achieve!
Best Regards!
Frieder
EDIT: I changed opacity=...
to fill opacity=...
. Otherwise, the dotted line would shine through.
And here is a picture:
You could draw your outline and fill it in one line of Code with draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
.
documentclassarticle
usepackage[margin=0.5in]geometry
usepackagepgfplots
renewcommandthesectionarabicsection
usepackagebooktabs, makecell, multirow
usepackagestackengine,graphicx,xcolor
usepackagelscape
usetikzlibraryarrows
usepackageflexisym
usetikzlibraryshapes.geometric
usetikzlibrarydecorations.markings
newenvironmenttightcenter
setlengthtopsep0pt
setlengthparskip0pt
begincenterendcenter
begindocument
begintikzpicture[scale=1.2]
%cylinder
draw[black,thick,dotted] (0,0) circle (1.3cm);
fill[fill=black,opacity=0.8] (-0.2,0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (-0.2,-0.2) circle (0.8mm);
fill[fill=black,opacity=0.8] (+0.2,-0.2) circle (0.8mm);
draw [thick, fill=gray, fill opacity=0.5] (0,0) -- (95:1.3) arc (95:355:1.3) -- cycle;
draw [thick](0,0)++(0:0.25) arc (0:79:0.3);
node[above] at (0.4,0.2) $50^circ$;
endtikzpicture
enddocument
The (95:1.3)
moves you to the starting point of your outer perimeter, after that you draw the arc arc (95:355:1.3)
with the starting angle of 95, end angle of 355 and a radius of 1.3. Then you don't have to fiddle around with sine and cosine.
I hope I didn't misunderstood, what you wanted to achieve!
Best Regards!
Frieder
EDIT: I changed opacity=...
to fill opacity=...
. Otherwise, the dotted line would shine through.
And here is a picture:
edited Aug 25 at 8:17
answered Aug 25 at 8:11
Wulle
1315
1315
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%2f447635%2fdraw-a-major-arc-and-fill-it-with-a-gray-color%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