90
votes
How is arc defined in TikZ?
\draw (x,y) arc (start:stop:radius); draws an arc
with radius radius
starts from (x,y)
with center (x-r*cos(start), y-r*sin(start)) and
ends at (x-r*cos(start)+r*cos(stop), y-r*sin(start)+r*sin(stop))...
76
votes
Draw a rectangle with rounded ends in TikZ
If people come to this question via Google (like me) and want to get only a rectangle with rounded corners:
\draw[rounded corners] (0, 0) rectangle (4, 1) {};
This is an empty rectangle with rounded ...
45
votes
Drawing a TikZ arc specifying the center
Now as TikZ 3.0 is here we can use pic.
\documentclass[tikz,border=5]{standalone}
\tikzset{
pics/carc/.style args={#1:#2:#3}{
code={
\draw[pic actions] (#1:#3) arc(#1:#2:#3);
}
}
}
\...
34
votes
How is arc defined in TikZ?
For visualisation, here is a diagram:
where
theta_i is the start angle,
theta_f is the end angle,
R is the radius,
O is the centre of rotation (not the origin),
A is the starting point,
B is the end ...
29
votes
Accepted
Draw a rectangle with rounded ends in TikZ
This shows how to adjust the angles in your original commands (I've scaled the rectangle down just so the labels show up better) and then demonstrates the use of rounded rectangle from the shapes.misc ...
26
votes
Draw a rectangle with rounded ends in TikZ
Why not using rounded corners locally/globally on the path?
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw
(0,0) {[rounded corners=15pt] --
++(2,0) --
+...
23
votes
TikZ - Recursive Arc Drawing
Without numbers:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw [ultra thick] (-8,0) -- (8,0);
\draw [ultra thick] (0,0) circle (8);
\foreach \...
21
votes
Accepted
TikZ - Recursive Arc Drawing
It is not any different than the examples given by other languages. Only a few places where expansion needs to be taken care of. I didn't really go for the code golf but it seems working. And it gets ...
17
votes
Accepted
tikz: Applying rounded corners to arcs
The problem is not really about the arc command. It is about how TikZ shortens any curved path. Using arc or controls or to[in= , out=] all produce the same problem.
Consider the image:
which is ...
16
votes
Accepted
How can I improve the look of an arrowhead at the end of a small-radius arc?
TikZ 3.0.0 provides a bending library for arrow tips placed on non-straight paths (see 16.3.8 Bending and Flexing on pgfmanual).
Loading the library makes flex=1 the default choice, but sometimes it ...
Community wiki
16
votes
TikZ - Recursive Arc Drawing
I was wondering the same thing yesterday in the comments of this answer on a close subject. For recursive drawings as this one are (relatively!) easy to do with languages closely related to (La)TeX, ...
14
votes
Accepted
TikZ arc with extreme angle
You can add looseness to the draw command:
\draw[->] (6,4.5) to[bend left=80, looseness=2.7] (5.9,8);
13
votes
Accepted
How to automatically obtain the center of the circle used to draw the arc in TikZ?
Only part of what was required. But it also shows how a key with the required syntax could be programmed:
\documentclass[tikz,border=5]{standalone}
\tikzset{%
insert arc/.style args={#1:#2:#3and#4 ...
13
votes
Accepted
How to indicate letters conjoined across words?
There is a standard Unicode character tie: ⁀ Unicode: U+2040.
Used with an appropriate font and XeLaTeX or LuaLaTeX you can just put it directly into your source or make a macro. (Since it's ...
13
votes
Accepted
Drawing circular sector regions
Like this?
\documentclass[border=10pt,multi,tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\foreach \m in {0,1,2}{
% draws shaded regions
\draw [fill=gray!50!white, rounded corners]
...
12
votes
How can I draw edge bundles with TikZ?
You can "stack" actions, so have a post action in a post action in a post action ... and so on. For some reason unknown to me, a double line as postaction to a double line produces not the desired ...
12
votes
How to maintain a circular arc with a large arrow?
You can avoid this by adding the bending library.
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc, arrows.meta, bending}
\begin{document}
\begin{tikzpicture}[
...
10
votes
How to draw an arc in Tikz that has gaps specifically placed in it
According to the pgfmanual section 15.3.2 Graphic Parameters: Dash Pattern, you have several possibilities:
\documentclass[tikz,border=10pt]{standalone}
\begin{document}
\begin{tikzpicture}[very ...
10
votes
Accepted
Drawing a spinner
This would have been a lot easier using tikz3d.
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{intersections,...
10
votes
tikz: Applying rounded corners to arcs
Sandy G has provided an excellent analysis of the issue and a good solution. This is an alternative solution that results in a single path at the end, which is therefore more suited to situations in ...
9
votes
TikZ - Recursive Arc Drawing
This is cheating. Utterly, utterly cheating.
It’s a Python script which generates the TikZ necessary to draw a Farey diagram. I use the definition from the Wikipedia page on Farey numbers to generate ...
9
votes
How can I draw this circle with different colour?
This is not very elegant, but I think it gives the result you are after:
\documentclass{standalone}
\usepackage{xcolor}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\newcommand\rad{2} % ...
9
votes
Accepted
Shading the area between arcs with a rainbow
Since you only require relatively short arc segments, I would suggest cheating and using a linear shading instead of trying to be correct. You could look up the definition of the color wheel shading ...
9
votes
Accepted
Drawing an arc for given two endpoints, center and radius of the arc
You can use the angles-library of tikz.
Add angles to your \usetikzlibrary
\usetikzlibrary{intersections, calc, angles}
Add at the end of your code:
\coordinate (o) at (3,4);
\pic [draw, angle ...
9
votes
Drawing a diagram with arc and angle
A pstricks solution, based od the pst-eucl module:
\documentclass{article}
\usepackage{pst-eucl}
% \usepackage{auto-pst-pdf} for use with pdflatex --enablewrite18 (MiKTeX)
% or pdflatex --shell-...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
arc × 142tikz-pgf × 112
diagrams × 11
angle × 10
arrows × 8
circles × 8
pgfplots × 5
shading × 5
tikz-arrows × 4
asymptote × 4
tikz-3dplot × 4
tkz-euclide × 4
color × 3
pstricks × 3
tikz-styles × 3
labels × 3
nodes × 3
3d × 3
rotating × 3
paths × 3
intersections × 3
tikz-pic × 3
symbols × 2
positioning × 2
graphs × 2