I want to learn how to draw things like this. Can you show me how to do this, please?
- 6,690
- 5
- 26
- 47
-
4Welcome to TeX.SE! What have you tried so far? – Mensch May 16 '23 at 17:42
-
I haven't tried yet It sounds difficult – belmeliani meliani May 16 '23 at 17:46
-
3Welcome to TeX.SE! This site works best as a helping hand for when you get stuck with something. Questions like this, that look like "please do this thing for me" tend not to get answers because they require effort on the part of the community (who you want help from). To make the most of this site, it would help if you made some substantive efforts please and show what you have done so far with a Minimal Working Example (MWE). Or, you can look at TeX consultants who will write you code for money here – JamesT May 16 '23 at 17:48
-
4Hi and welcome. Doing this kind of drawing with LaTeX is complicated and tedious. There is a package that allows to make premade ornaments of the same kind but not identical like https://ctan.org/pkg/pgfornament – AndréC May 16 '23 at 17:48
-
Thank you very much for your help I will try to draw this figure and if I stumble I will ask again – belmeliani meliani May 16 '23 at 17:57
3 Answers
Here's a starting point for you. As always, eat the elephant bite by bite ... Repeat for all relevant fragments of the drawing and join into one drawing, in the end.
So first of all it's enough to focus on one halve, say the right one. You can always mirror it later. To better see the various parts I did some coloration.

Next overlay a grid, e.g. via Paint.net, Gimp or other programs. We'll need certain points from the drawing to pave the way.

For the grid I used this, so it may be a good time to look up the commands in the pgfmanual and its tutorial part:
\documentclass[10pt,border=3mm,tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) grid (5,10);
\end{tikzpicture}
\end{document}
Now, let's try to approximate the golden area. We just need the outlines and don't need to care about precision, overlaps etc. Leave that for later.
Let's try to mimick a very coarse form by approximating the blue and red line. The relevant part is drawing just two pathes:
% ~~~ blue path ~~~~~~~~~~~
\draw (0,6.2) -- (1.1,4.1) -- (1.2,2.7) -- (1.7,2.7) -- (1.5,1.9);
% ~~~ red path ~~~~~~~~~~~
\draw (0,6.4) -- (1.2,4.2) -- (2.1,3.9) -- (3.5,4.2) -- (1.8,1.9);
To introduce the bends we can specify out- and in-angles, like so: replacing -- by to [out=260,in=95]. The manual mentions even more ways, e.g. Bezier-like controls. Make your choice.
Code, with some minor coordinate moves (compare coarse and fine) :
\documentclass[10pt,border=3mm,tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}% ~~~ very coarse ~~~
% ~~~ comment out or delete grid later ~~~
\draw [help lines] (0,0) grid (7,13);
% ~~~ blue path ~~~~~~~~~~~
\draw (0,6.2) -- (1.1,4.1) -- (1.2,2.7) -- (1.7,2.7) -- (1.5,1.9);
% ~~~ red path ~~~~~~~~~~~
\draw (0,6.4) -- (1.2,4.2) -- (2.1,3.9) -- (3.5,4.2) -- (1.8,1.9);
\end{tikzpicture}
\begin{tikzpicture}% ~~~ with bends ~~~
% ~~~ comment out or delete grid later ~~~
\draw [help lines] (0,0) grid (7,13);
% ~~~ blue path ~~~~~~~~~~~
\draw (0,6.2) to [out=260,in=95] (1.1,4.1)
to [out=5,in=55] (1.2,2.7)
to [out=270,in=240](1.8,2.7)
to [out=260,in=220] (1.7,1.9);
% ~~~ red path ~~~~~~~~~~~
\draw (0,6.4) to [out=280,in=85] (1.2,4.2)
to [out=10,in=105] (2.1,3.9)
to [out=50,in=150] (3.5,4.2)
to [out=-200,in=50] (1.8,1.9);
\end{tikzpicture}
\end{document}
P.S.: Outlook, how to continue
Let's assume you know how to draw (most) parts of your ornament. How to join everthing?
Let's introduce the \pic element, so that you can write sth. like this: \pic at (0,0) {halve}; This cleans up your code. You'll obtain it by moving everything to a \tikzset{ } statement, where you define, what halve means in this file:
\begin{document}
\tikzset{% ~~~ all drawings needed for one halve ~~~~~~~~~
halve/.pic={
% ~~~ blue path ~~~~~~~~~~~
\draw (0,6.2) to [out=260,in=95] (1.1,4.1)
...
\draw (0,13) to [bend right] (1,12) -- (0,11);
}
}
To make things easier to see, I included 3 more dummy-shapes, see the final code below. BTW, this is how you obtain closed pathes using cycle, which you might need when it comes to overlaps and perhaps using layers just like in graphic programs:
% ~~~ rightmost; example for closed path ~~~~
\draw (5.5,3.8) -- (5.5,5.5) -- (6.5,4.8) -- cycle;
Now you can place several halves wherever you want, including scaling (which requires transform shape, too), see final code:
Finally, what's about the whole symmetrical ornament? As you may guess, we'll define just another \pic, which includes a mirrored halve:
\tikzset{% ~~~ putting two halves together ~~~~~~
ornmnt/.pic={
\pic at (0,0) {halve};
\pic [xscale=-1] at (0,0) {halve};
}
}
Final code for all of this:
\documentclass[10pt,border=3mm,tikz]{standalone}
\usepackage{tikz}
\begin{document}
\tikzset{% ~~~ all drawings needed for one halve ~~~~~~~~~
halve/.pic={
% ~~~ blue path ~~~~~~~~~~~
\draw (0,6.2) to [out=260,in=95] (1.1,4.1)
to [out=5,in=55] (1.2,2.7)
to out=270,in=240
to [out=260,in=220] (1.7,1.9);
% ~~~ red path ~~~~~~~~~~~
\draw (0,6.4) to [out=280,in=85] (1.2,4.2)
to [out=10,in=105] (2.1,3.9)
to [out=50,in=150] (3.5,4.2)
to [out=-200,in=50] (1.8,1.9);
% ~~~ simple pattern at origin ~~~~~
\draw (0,0) to [bend left] (1,1);
% ~~~ rightmost; example for closed path ~~~~
\draw (5.5,3.8) -- (5.5,5.5) -- (6.5,4.8) -- cycle;
% ~~~ top ornament ~~~~~~~~~~~~~~~~~
\draw (0,13) to [bend right] (1,12) -- (0,11);
}
}
\tikzset{% ~~~ putting two halves together ~~~~~~
ornmnt/.pic={
\pic at (0,0) {halve};
\pic [xscale=-1] at (0,0) {halve};
}
}
% ~~~ (1) let's see the \pic {halve} ~~~~~~~~~~
\begin{tikzpicture}% ~~~ with bends ~~~
% ~~~ comment out or delete grid later ~~~
\draw [help lines] (0,0) grid (7,13);
\pic at (0,0) {halve};
\node [red] at (5,11.3) {one halve of the ornament};
\end{tikzpicture}
% ~~~ (2) using \pic {halve} ~~~~~~~~~~~~~
\begin{tikzpicture}% ~~~ with bends ~~~
\pic at (0,0) {halve};
\node [red] at (5,10) {one pic};
\draw [dashed,gray] (8,0) -- (8,13);
\pic at (8,0) {halve};
\node [red] at (13,10) {one more pic};
\draw [dashed,gray] (16,0) -- (16,13);
\pic [scale=.5, transform shape] at (16,0) {halve};
\node [red] at (19,10) {smaller pic};
\end{tikzpicture}
% ~~~ (3) let's see the full ornament ~~~~~~~~
\begin{tikzpicture}
\pic at (0,0) {ornmnt};
\end{tikzpicture}
\end{document}
- 11,519
-
3Thank you very much , this is what i was looking for, way of how to accomplish decorations of this kind you have really helped me, Thank you – belmeliani meliani May 16 '23 at 22:10
-
@belmelianimeliani, thank you. Just to notify you, I added a P.S. section about how to arrive at a full ornament. – MS-SPO May 17 '23 at 06:36
For something this complex, you are probably better importing an SVG path using the SVG-Path library.
Here's the steps I suggest:
- Draw your outline in a GUI vector graphics editor like Illustrator or Inkscape (or import it from an existing SVG).
- Save as an SVG.
- Open the SVG in a text editor and copy the
dattribute text of each<path/>element (you can also do this within Inkscape without needing to save first, don't know about Illustrator). - Put each attribute text in a separate
\pgfpathsvgcommand as shown below.
\usepgflibrary {svg.path}
\begin{pgfpicture}
\pgfpathsvg{<path code 1 goes here>}
\pgfusepath{stroke}
\pgfpathsvg{<path code 2 goes here>}
\pgfusepath{stroke}
...
\end{pgfpicture}
You can also include SVG paths as a path specification inside TikZ \draw or \path commands:
\usetikzlibrary {svg.path}
\begin{tikzpicture}
\draw svg {<path code 1 goes here>};
\draw svg {<path code 2 goes here>};
...
\end{tikzpicture}
Of course, you could just include vector graphics such as PDF in your document using \includegraphics. But if you want to annotate or do something else with the graphic, this might be a better option.
- 388
Doing this kind of drawing with LaTeX is complicated and tedious. There is a package that allows to make premade ornaments of the same kind but not identical like https://ctan.org/pkg/pgfornament
Here is the ornament n°66 obtained with this package, it looks like it, but is not identical:
\documentclass{scrartcl}
\usepackage{pgfornament}
\begin{document}
\pgfornament{66}
\end{document}
- 24,137







