# Tag Info

7

As Paul Gaborit said in his comments (a) .. controls (b) .. (c) is not a quadratic Bézier curve, but the cubic one (a) .. controls (b) and (b) .. (c). If you want to draw a quadratic curve in TikZ you can define your own to path style. Here is an an example of how to do it using calc library. \documentclass[tikz,border=7pt,convert={density=1400}]{...

6

For your question 'Isn't there an option to tell controls .. not to bend that much?', I guess the answer is No. That is because bend left and looseness influence how TikZ creates the control points for you. If you choose the control points yourself, you bypass that logic. The path of the curve is then determined by a mathematical formula, so in order for it ...

6

There are various solutions for my problem, all discovered with the help of Paul Gaborit's comment. I list three solutions, two of them do not need any additional library, one require the intersections library Without any additional library The easiest solution consists on usgin in-built positioning options, that allow to mark a node with various combination ...

5

With bend left, you should be able to get what you want (unless I totally misundertsood your demand)... but you have to pay attention to the order of the coordinates. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[scale=1] \coordinate (O) at (0,0); \draw (O) circle (4); % \foreach \i in {1,2,.....

4

A PSTricks solution only for either fun or comparison purposes. \documentclass[pstricks,border=\dimexpr355pt/113\relax]{standalone} \usepackage{pst-plot} \begin{document} \begin{pspicture}[algebraic,plotpoints=500](-5,-1.5)(5.5,3) \psaxes{->}(0,0)(-5,-1.5)(5,2.5)[$x$,0][$y$,90] \psplot[linecolor=red]{-4.5}{4.5}{-512*(x^2-1)/(27*x^6-168*x^4+560*x^...

3

While @Hafid Boukhoulda gives a flexible, general approach for offset, setting both the control points to the same point (cloud) makes the Beizer curve look smooth, simple and beautiful -- and hence could be another choice to consider if it meets your requirements. ...for which I used the code: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} ...

3

Coordinates are not shifted, they are fixed (which is a good thing, normally that's what we want). You can do this in two ways: transform canvas={shift={(2cm,1cm)}} instead of just shift. Or you can shift all coordinates: c/.style={shift={(2cm,1cm)}} then: \draw[shift={(2cm,1cm)}] ([c]A1) .. controls ([c]A2) and ([c]A3) .. ([c]A4); Both should work and ...

2

I'm no MetaPost wizard, but after a little experimentation I got this result. beginfig(1) path ellipse, segment, outline, outside, inside; pair start, stop; ellipse = fullcircle xscaled 5in yscaled 1in; stop := ellipse intersectionpoint (ellipse rotated 45); start := (ellipse rotated -45) intersectionpoint ellipse; segment := (ellipse cutbefore ...

2

Is that close to what you are asking for: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{chains} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds} \usetikzlibrary{trees} \usetikzlibrary{arrows,automata} \usepackage{epstopdf} \definecolor{mycolor}{RGB}{8,108,131} \usepackage{array} \usepackage{...

1

This is not an exact answer but an explanation of how it has to be done In simple terms the answer here -- https://stackoverflow.com/questions/59880248/precise-and-smooth-curve-with-tikz?fbclid=IwAR09VVJs9oYgp96-kg-Iq1EEfa5rBnm30zHFQp_YXcZJg4sTT0rzk7X20hI -- pushes in additional coordinates/ points for fine control Implementing the same in your answer will ...

1

A solution using edge: \draw[arrow] (state) edge[out=-90, in=0, looseness=1.1] node[auto] {then} (chain); Full example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta,positioning} \begin{document} \begin{center} \begin{tikzpicture}[state/.style={rectangle,draw=black, rounded corners},arrow/.style={->,semithick}] \node[state] (...

1

\draw [arrow] (state) .. controls (8,-2) and (6,-2) .. (chain) node [midway, below] {then} ; works: I have found the necessary ingredients at https://tex.stackexchange.com/a/170716/27523

1

The solution was simple: as @marmot pointed out in the comments, there was a mistake: I was using axis direction cs in a non-relative coordinate definition. Applying this correction the code worked as expected: \begin{tikzpicture} \begin{axis}[axis x line=middle, axis y line=middle, xmin = -11, xmax = 0, ymin = 0, ymax=4, unit vector ratio=1 1, grid, ...

1

The QUADRATIC Bezier curve with 3 control points P0, P1, P2 is a special case of the CUBIC Bezier curve with 4 control points P0, (1/3 P0+2/3 P1), (2/3 P1+1/3 P2), P2. For example, if you want to draw the downwards arc of a parabola (quadratic Bezier) with control points (0,6), (3,6), (6,0), use the cubic control points (0,6), (2,6), (4,4), (6,0), as in \...

1

The "curve to" operation (.. controls (coord) ..) should replace the "line to" operation (--) instead of being used simultaneously. That is, you want \draw (0,0) .. controls (0.5,0.5) .. ++ (90:1);

1

Another idea (which could or could not be appropiate to your case, I don't know) is to define the required shape as a pic. Inside the pic you can use named coordinates to draw your shape, and then, when the pic is used as part of your drawing it can be easily shifted, scaled or rotated: \documentclass[11pt]{standalone} \usepackage{tikz} %\usepackage{...

Only top voted, non community-wiki answers of a minimum length are eligible