TikZ: How to fill area with a special pattern? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Randomly curved arrows in TikZTikZ: How to clip out random coil fragments?How to define the default vertical distance between nodes?Numerical conditional within tikz keys?Tikz fill double line with pattern not with colorHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingOverwriting fill patterns in TikZCustom fill pattern in a gradientTikz : rotate a fill patternFill area between curves with tikzfillbetweenTikz: custom text as fill pattern for shapes
I'm having difficulty getting my players to do stuff in a sandbox campaign
How can I make names more distinctive without making them longer?
What's the point in a preamp?
Losing the Initialization Vector in Cipher Block Chaining
When communicating altitude with a '9' in it, should it be pronounced "nine hundred" or "niner hundred"?
What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?
How to rotate it perfectly?
Passing functions in C++
Working around an AWS network ACL rule limit
What is the electric potential inside a point charge?
Classification of bundles, Postnikov towers, obstruction theory, local coefficients
Using "nakedly" instead of "with nothing on"
Did the new image of black hole confirm the general theory of relativity?
What computer would be fastest for Mathematica Home Edition?
3 doors, three guards, one stone
How to colour the US map with Yellow, Green, Red and Blue to minimize the number of states with the colour of Green
Why is "Captain Marvel" translated as male in Portugal?
Writing Thesis: Copying from published papers
Can a monk deflect thrown melee weapons?
Estimated State payment too big --> money back; + 2018 Tax Reform
Antler Helmet: Can it work?
Windows 10: How to Lock (not sleep) laptop on lid close?
Why does this iterative way of solving of equation work?
What kind of display is this?
TikZ: How to fill area with a special pattern?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Randomly curved arrows in TikZTikZ: How to clip out random coil fragments?How to define the default vertical distance between nodes?Numerical conditional within tikz keys?Tikz fill double line with pattern not with colorHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingOverwriting fill patterns in TikZCustom fill pattern in a gradientTikz : rotate a fill patternFill area between curves with tikzfillbetweenTikz: custom text as fill pattern for shapes
I want to visualize a turbulent flow regime. Assumed we have a simple empty square that should be filled with a pattern.
Minimum Working Example (MWE):
documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
draw (0, 0) rectangle (4, 4);
endtikzpicture
enddocument
I won't post a screenshot, because it is just a simple rectangle. :-)
How can I fill this rectangle with a pattern like this on the right side:
Or, for the advanced TeX-users: How to fill it with a pattern like this one (made of random arrows)?
Thanks to marmot: As you can see, the arrows never intersect - this seems to be a challenge.
tikz-pgf tikz-arrows draw fill pattern
add a comment |
I want to visualize a turbulent flow regime. Assumed we have a simple empty square that should be filled with a pattern.
Minimum Working Example (MWE):
documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
draw (0, 0) rectangle (4, 4);
endtikzpicture
enddocument
I won't post a screenshot, because it is just a simple rectangle. :-)
How can I fill this rectangle with a pattern like this on the right side:
Or, for the advanced TeX-users: How to fill it with a pattern like this one (made of random arrows)?
Thanks to marmot: As you can see, the arrows never intersect - this seems to be a challenge.
tikz-pgf tikz-arrows draw fill pattern
Here is a question on randomly curved arrows. It is not difficult to draw random arrows, but if I interpret your question correctly, they should not intersect. Avoiding intersections is probably more efforts. So I wish to clarify: you do not want the arrows to intersect?
– marmot
Mar 31 at 16:35
@marmot: Thanks for your comment - you are completely right! The arrows should not intersect, because the fluid can not cross in reality.
– Dave
Mar 31 at 16:48
1
As a proof of concept, I'm very interested in how this can be coded (+1 to mamot, indeed) but from a practical point of view (time and result quality) I would do it manually in Inkscape.
– Fran
Mar 31 at 18:09
@Fran: I took me the whole weekend to put and adjust some spirals into mytikzpicture
. Therefore I am curious if there is a better solution available for it.
– Dave
Mar 31 at 18:12
add a comment |
I want to visualize a turbulent flow regime. Assumed we have a simple empty square that should be filled with a pattern.
Minimum Working Example (MWE):
documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
draw (0, 0) rectangle (4, 4);
endtikzpicture
enddocument
I won't post a screenshot, because it is just a simple rectangle. :-)
How can I fill this rectangle with a pattern like this on the right side:
Or, for the advanced TeX-users: How to fill it with a pattern like this one (made of random arrows)?
Thanks to marmot: As you can see, the arrows never intersect - this seems to be a challenge.
tikz-pgf tikz-arrows draw fill pattern
I want to visualize a turbulent flow regime. Assumed we have a simple empty square that should be filled with a pattern.
Minimum Working Example (MWE):
documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
draw (0, 0) rectangle (4, 4);
endtikzpicture
enddocument
I won't post a screenshot, because it is just a simple rectangle. :-)
How can I fill this rectangle with a pattern like this on the right side:
Or, for the advanced TeX-users: How to fill it with a pattern like this one (made of random arrows)?
Thanks to marmot: As you can see, the arrows never intersect - this seems to be a challenge.
tikz-pgf tikz-arrows draw fill pattern
tikz-pgf tikz-arrows draw fill pattern
edited Mar 31 at 16:51
Dave
asked Mar 31 at 16:29
DaveDave
1,266619
1,266619
Here is a question on randomly curved arrows. It is not difficult to draw random arrows, but if I interpret your question correctly, they should not intersect. Avoiding intersections is probably more efforts. So I wish to clarify: you do not want the arrows to intersect?
– marmot
Mar 31 at 16:35
@marmot: Thanks for your comment - you are completely right! The arrows should not intersect, because the fluid can not cross in reality.
– Dave
Mar 31 at 16:48
1
As a proof of concept, I'm very interested in how this can be coded (+1 to mamot, indeed) but from a practical point of view (time and result quality) I would do it manually in Inkscape.
– Fran
Mar 31 at 18:09
@Fran: I took me the whole weekend to put and adjust some spirals into mytikzpicture
. Therefore I am curious if there is a better solution available for it.
– Dave
Mar 31 at 18:12
add a comment |
Here is a question on randomly curved arrows. It is not difficult to draw random arrows, but if I interpret your question correctly, they should not intersect. Avoiding intersections is probably more efforts. So I wish to clarify: you do not want the arrows to intersect?
– marmot
Mar 31 at 16:35
@marmot: Thanks for your comment - you are completely right! The arrows should not intersect, because the fluid can not cross in reality.
– Dave
Mar 31 at 16:48
1
As a proof of concept, I'm very interested in how this can be coded (+1 to mamot, indeed) but from a practical point of view (time and result quality) I would do it manually in Inkscape.
– Fran
Mar 31 at 18:09
@Fran: I took me the whole weekend to put and adjust some spirals into mytikzpicture
. Therefore I am curious if there is a better solution available for it.
– Dave
Mar 31 at 18:12
Here is a question on randomly curved arrows. It is not difficult to draw random arrows, but if I interpret your question correctly, they should not intersect. Avoiding intersections is probably more efforts. So I wish to clarify: you do not want the arrows to intersect?
– marmot
Mar 31 at 16:35
Here is a question on randomly curved arrows. It is not difficult to draw random arrows, but if I interpret your question correctly, they should not intersect. Avoiding intersections is probably more efforts. So I wish to clarify: you do not want the arrows to intersect?
– marmot
Mar 31 at 16:35
@marmot: Thanks for your comment - you are completely right! The arrows should not intersect, because the fluid can not cross in reality.
– Dave
Mar 31 at 16:48
@marmot: Thanks for your comment - you are completely right! The arrows should not intersect, because the fluid can not cross in reality.
– Dave
Mar 31 at 16:48
1
1
As a proof of concept, I'm very interested in how this can be coded (+1 to mamot, indeed) but from a practical point of view (time and result quality) I would do it manually in Inkscape.
– Fran
Mar 31 at 18:09
As a proof of concept, I'm very interested in how this can be coded (+1 to mamot, indeed) but from a practical point of view (time and result quality) I would do it manually in Inkscape.
– Fran
Mar 31 at 18:09
@Fran: I took me the whole weekend to put and adjust some spirals into my
tikzpicture
. Therefore I am curious if there is a better solution available for it.– Dave
Mar 31 at 18:12
@Fran: I took me the whole weekend to put and adjust some spirals into my
tikzpicture
. Therefore I am curious if there is a better solution available for it.– Dave
Mar 31 at 18:12
add a comment |
2 Answers
2
active
oldest
votes
This is an answer to the question
How can one draw some randomly curved arrows that do not intersect?
which is not to be confused with
How can I draw the velocity field of some fluid?
which may require a model, a solution of the Navier-Stokes equations or something of that sort. That is, forbidding intersections is a step in the right direction but does not yield a physical description. If you do have the parametrization a realistic turbulent velocity field, you can do much better.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryintersections,arrows.meta,bending
newcounterrandarcs
begindocument
begintikzpicture
%draw[clip] (0,0) rectangle (4,4);
pgfmathsetseed21
foreach X in 1,...,50
pgfmathsetmacromyx-0.5+5*rnd
pgfmathsetmacromyy-0.5+5*rnd
pgfmathsetmacroangA360*rnd
pgfmathsetmacroradA0.3+0.3*rnd
pgfmathsetmacromyxpmyx+radA*cos(angA)
pgfmathsetmacromyypmyy+radA*sin(angA)
pgfmathsetmacroangBangA-75+150*rnd
pgfmathsetmacroradBradA-0.1+0.2*rnd
pgfmathsetmacromyxqmyxp+radB*cos(angB)
pgfmathsetmacromyyqmyyp+radB*sin(angB)
pgfmathsetmacroangCangB-45+90*rnd
pgfmathsetmacroradCradB-0.1+0.2*rnd
pgfmathsetmacromyxrmyxq+radB*cos(angC)
pgfmathsetmacromyyrmyyq+radB*sin(angC)
%typeoutangA,radA;angB,radB
path[-Latex,name path=test-arc] plot[smooth,tension=1]
coordinates (myx,myy) (myxp,myyp) (myxq,myyq) (myxr,myyr) ;
defHasIntersection0
ifnumX>1
foreach Y in 1,...,numbervaluerandarcs
path[name intersections=of=Y-arc and test-arc,total=t,
/utils/exec=ifnumt>0
xdefHasIntersection1%typeoutintersects
fi];
fi
ifnumHasIntersection=0
stepcounterrandarcs
draw[-Latex[bend]]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr);
path[name path global=numbervaluerandarcs-arc]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr) -- cycle;
fi
endtikzpicture
typeoutnumbervaluerandarcsspace arcsspace drawn.
enddocument
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
1
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace alltension=1
withtension=1.6
. It also helps to play withpgfmathsetseed21
.
– marmot
Mar 31 at 18:23
add a comment |
This is not an answer but an attempt to show that some type of vectorial art could be done without coding yourself as this could help to new users without a high LateX - tikz - maths training to produce high quality images.
The main point is that SVG files made with Inkscape, can be saved like pure TeX (PStricks) code and then used in a LaTeX document without loss of quality because are still a code to render a vectorial image. But sadly , the generated coded, said foo.tex
, is not compilable as is, and will cryptically warning you:
%% Please note this file requires PSTricks extensions
What the hell mean that? Simply that you must make a LaTeX document with this two lines in the preamble::
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
And then in some part of your document (in a figure float, for instance) add:
inputfoo
The result:
The other option is save the vectorial image as PDF (or EPS), that can be used just like any PNG or JPG image with the usual includegraphics
of the graphicx
package. This have the advantage that can use some effects as color gradients or transparencies that are not well exported to PSTricks and also reduce the compilation time. Note that using PStricks you cannot use the PDF but the EPS images. However with an updated distribution you still can use pdflatex
using the option [pdf]
of pstricks
package.
Full MWE:
documentclass[twocolumn]article
usepackagegraphicx
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
begindocument
beginfigure
centering
inputfoo2 % foo2.tex directly saved with Inkscape with a pspicture
captionA pstricks draw made with Inkscape. Only TeX code here.
endfigure
beginfigure[h]
centering
includegraphicsfoo.eps
captionEPS -- PDF version with gradients.
label
endfigure
enddocument
Note: The code of foo.tex
is too long to be posted and of scarce interest since is automatically generated from a manual draw. If you are curious about how is that code, is like this simple draw:
pssetxunit=.5pt,yunit=.51pt,runit=1pt
beginpspicture(800,1000)
newrgbcolorcurcolor.8 .9 .8 % Box
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(137,991)lineto(534,991)lineto(534,668)
lineto(137,668)closepath
newrgbcolorcurcolor1 .2 1 % line
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(147,677)
curveto(147,677)(191,876)(328,851)
curveto(466,826)(506,820)(475,961)
newrgbcolorcurcolor.4 .8 .4 % arrowhead head
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
newrgbcolorcurcolor0 0 1 % arrowhead border
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
endpspicture}
I left as exercise recreate the turbulence image in the same way. However, the equation of the image was typeset (inside Inkscape) using this LaTeX code:
frac partial overlineu_i partial t +
overlineu_j frac partial overlineu_i partial x_j =
- frac1rho fracpartial overlinep partial x_i
+ frac1rho fracpartialpartial x_j
left( mu fracpartial overlineu_ipartial x_j -
rho overlineu_i^prime u_j^prime right)
1
Very nice! +1. Perhaps you could also add thatpotrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.
– marmot
Apr 1 at 2:54
1
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482462%2ftikz-how-to-fill-area-with-a-special-pattern%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is an answer to the question
How can one draw some randomly curved arrows that do not intersect?
which is not to be confused with
How can I draw the velocity field of some fluid?
which may require a model, a solution of the Navier-Stokes equations or something of that sort. That is, forbidding intersections is a step in the right direction but does not yield a physical description. If you do have the parametrization a realistic turbulent velocity field, you can do much better.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryintersections,arrows.meta,bending
newcounterrandarcs
begindocument
begintikzpicture
%draw[clip] (0,0) rectangle (4,4);
pgfmathsetseed21
foreach X in 1,...,50
pgfmathsetmacromyx-0.5+5*rnd
pgfmathsetmacromyy-0.5+5*rnd
pgfmathsetmacroangA360*rnd
pgfmathsetmacroradA0.3+0.3*rnd
pgfmathsetmacromyxpmyx+radA*cos(angA)
pgfmathsetmacromyypmyy+radA*sin(angA)
pgfmathsetmacroangBangA-75+150*rnd
pgfmathsetmacroradBradA-0.1+0.2*rnd
pgfmathsetmacromyxqmyxp+radB*cos(angB)
pgfmathsetmacromyyqmyyp+radB*sin(angB)
pgfmathsetmacroangCangB-45+90*rnd
pgfmathsetmacroradCradB-0.1+0.2*rnd
pgfmathsetmacromyxrmyxq+radB*cos(angC)
pgfmathsetmacromyyrmyyq+radB*sin(angC)
%typeoutangA,radA;angB,radB
path[-Latex,name path=test-arc] plot[smooth,tension=1]
coordinates (myx,myy) (myxp,myyp) (myxq,myyq) (myxr,myyr) ;
defHasIntersection0
ifnumX>1
foreach Y in 1,...,numbervaluerandarcs
path[name intersections=of=Y-arc and test-arc,total=t,
/utils/exec=ifnumt>0
xdefHasIntersection1%typeoutintersects
fi];
fi
ifnumHasIntersection=0
stepcounterrandarcs
draw[-Latex[bend]]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr);
path[name path global=numbervaluerandarcs-arc]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr) -- cycle;
fi
endtikzpicture
typeoutnumbervaluerandarcsspace arcsspace drawn.
enddocument
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
1
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace alltension=1
withtension=1.6
. It also helps to play withpgfmathsetseed21
.
– marmot
Mar 31 at 18:23
add a comment |
This is an answer to the question
How can one draw some randomly curved arrows that do not intersect?
which is not to be confused with
How can I draw the velocity field of some fluid?
which may require a model, a solution of the Navier-Stokes equations or something of that sort. That is, forbidding intersections is a step in the right direction but does not yield a physical description. If you do have the parametrization a realistic turbulent velocity field, you can do much better.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryintersections,arrows.meta,bending
newcounterrandarcs
begindocument
begintikzpicture
%draw[clip] (0,0) rectangle (4,4);
pgfmathsetseed21
foreach X in 1,...,50
pgfmathsetmacromyx-0.5+5*rnd
pgfmathsetmacromyy-0.5+5*rnd
pgfmathsetmacroangA360*rnd
pgfmathsetmacroradA0.3+0.3*rnd
pgfmathsetmacromyxpmyx+radA*cos(angA)
pgfmathsetmacromyypmyy+radA*sin(angA)
pgfmathsetmacroangBangA-75+150*rnd
pgfmathsetmacroradBradA-0.1+0.2*rnd
pgfmathsetmacromyxqmyxp+radB*cos(angB)
pgfmathsetmacromyyqmyyp+radB*sin(angB)
pgfmathsetmacroangCangB-45+90*rnd
pgfmathsetmacroradCradB-0.1+0.2*rnd
pgfmathsetmacromyxrmyxq+radB*cos(angC)
pgfmathsetmacromyyrmyyq+radB*sin(angC)
%typeoutangA,radA;angB,radB
path[-Latex,name path=test-arc] plot[smooth,tension=1]
coordinates (myx,myy) (myxp,myyp) (myxq,myyq) (myxr,myyr) ;
defHasIntersection0
ifnumX>1
foreach Y in 1,...,numbervaluerandarcs
path[name intersections=of=Y-arc and test-arc,total=t,
/utils/exec=ifnumt>0
xdefHasIntersection1%typeoutintersects
fi];
fi
ifnumHasIntersection=0
stepcounterrandarcs
draw[-Latex[bend]]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr);
path[name path global=numbervaluerandarcs-arc]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr) -- cycle;
fi
endtikzpicture
typeoutnumbervaluerandarcsspace arcsspace drawn.
enddocument
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
1
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace alltension=1
withtension=1.6
. It also helps to play withpgfmathsetseed21
.
– marmot
Mar 31 at 18:23
add a comment |
This is an answer to the question
How can one draw some randomly curved arrows that do not intersect?
which is not to be confused with
How can I draw the velocity field of some fluid?
which may require a model, a solution of the Navier-Stokes equations or something of that sort. That is, forbidding intersections is a step in the right direction but does not yield a physical description. If you do have the parametrization a realistic turbulent velocity field, you can do much better.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryintersections,arrows.meta,bending
newcounterrandarcs
begindocument
begintikzpicture
%draw[clip] (0,0) rectangle (4,4);
pgfmathsetseed21
foreach X in 1,...,50
pgfmathsetmacromyx-0.5+5*rnd
pgfmathsetmacromyy-0.5+5*rnd
pgfmathsetmacroangA360*rnd
pgfmathsetmacroradA0.3+0.3*rnd
pgfmathsetmacromyxpmyx+radA*cos(angA)
pgfmathsetmacromyypmyy+radA*sin(angA)
pgfmathsetmacroangBangA-75+150*rnd
pgfmathsetmacroradBradA-0.1+0.2*rnd
pgfmathsetmacromyxqmyxp+radB*cos(angB)
pgfmathsetmacromyyqmyyp+radB*sin(angB)
pgfmathsetmacroangCangB-45+90*rnd
pgfmathsetmacroradCradB-0.1+0.2*rnd
pgfmathsetmacromyxrmyxq+radB*cos(angC)
pgfmathsetmacromyyrmyyq+radB*sin(angC)
%typeoutangA,radA;angB,radB
path[-Latex,name path=test-arc] plot[smooth,tension=1]
coordinates (myx,myy) (myxp,myyp) (myxq,myyq) (myxr,myyr) ;
defHasIntersection0
ifnumX>1
foreach Y in 1,...,numbervaluerandarcs
path[name intersections=of=Y-arc and test-arc,total=t,
/utils/exec=ifnumt>0
xdefHasIntersection1%typeoutintersects
fi];
fi
ifnumHasIntersection=0
stepcounterrandarcs
draw[-Latex[bend]]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr);
path[name path global=numbervaluerandarcs-arc]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr) -- cycle;
fi
endtikzpicture
typeoutnumbervaluerandarcsspace arcsspace drawn.
enddocument
This is an answer to the question
How can one draw some randomly curved arrows that do not intersect?
which is not to be confused with
How can I draw the velocity field of some fluid?
which may require a model, a solution of the Navier-Stokes equations or something of that sort. That is, forbidding intersections is a step in the right direction but does not yield a physical description. If you do have the parametrization a realistic turbulent velocity field, you can do much better.
documentclass[tikz,border=3.14mm]standalone
usetikzlibraryintersections,arrows.meta,bending
newcounterrandarcs
begindocument
begintikzpicture
%draw[clip] (0,0) rectangle (4,4);
pgfmathsetseed21
foreach X in 1,...,50
pgfmathsetmacromyx-0.5+5*rnd
pgfmathsetmacromyy-0.5+5*rnd
pgfmathsetmacroangA360*rnd
pgfmathsetmacroradA0.3+0.3*rnd
pgfmathsetmacromyxpmyx+radA*cos(angA)
pgfmathsetmacromyypmyy+radA*sin(angA)
pgfmathsetmacroangBangA-75+150*rnd
pgfmathsetmacroradBradA-0.1+0.2*rnd
pgfmathsetmacromyxqmyxp+radB*cos(angB)
pgfmathsetmacromyyqmyyp+radB*sin(angB)
pgfmathsetmacroangCangB-45+90*rnd
pgfmathsetmacroradCradB-0.1+0.2*rnd
pgfmathsetmacromyxrmyxq+radB*cos(angC)
pgfmathsetmacromyyrmyyq+radB*sin(angC)
%typeoutangA,radA;angB,radB
path[-Latex,name path=test-arc] plot[smooth,tension=1]
coordinates (myx,myy) (myxp,myyp) (myxq,myyq) (myxr,myyr) ;
defHasIntersection0
ifnumX>1
foreach Y in 1,...,numbervaluerandarcs
path[name intersections=of=Y-arc and test-arc,total=t,
/utils/exec=ifnumt>0
xdefHasIntersection1%typeoutintersects
fi];
fi
ifnumHasIntersection=0
stepcounterrandarcs
draw[-Latex[bend]]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr);
path[name path global=numbervaluerandarcs-arc]
plot[smooth,tension=1] coordinates (myx,myy) (myxp,myyp)
(myxq,myyq) (myxr,myyr) -- cycle;
fi
endtikzpicture
typeoutnumbervaluerandarcsspace arcsspace drawn.
enddocument
edited Mar 31 at 18:22
answered Mar 31 at 17:34
marmotmarmot
118k6151284
118k6151284
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
1
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace alltension=1
withtension=1.6
. It also helps to play withpgfmathsetseed21
.
– marmot
Mar 31 at 18:23
add a comment |
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
1
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace alltension=1
withtension=1.6
. It also helps to play withpgfmathsetseed21
.
– marmot
Mar 31 at 18:23
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
Awesome, thank you very much! :-) Would it be possible to get the arrows a bit more "smooth"? They seem to be very edgy.
– Dave
Mar 31 at 18:07
1
1
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace all
tension=1
with tension=1.6
. It also helps to play with pgfmathsetseed21
.– marmot
Mar 31 at 18:23
@Dave I changed some parameters. In addition, you can play with tension. E.g. replace all
tension=1
with tension=1.6
. It also helps to play with pgfmathsetseed21
.– marmot
Mar 31 at 18:23
add a comment |
This is not an answer but an attempt to show that some type of vectorial art could be done without coding yourself as this could help to new users without a high LateX - tikz - maths training to produce high quality images.
The main point is that SVG files made with Inkscape, can be saved like pure TeX (PStricks) code and then used in a LaTeX document without loss of quality because are still a code to render a vectorial image. But sadly , the generated coded, said foo.tex
, is not compilable as is, and will cryptically warning you:
%% Please note this file requires PSTricks extensions
What the hell mean that? Simply that you must make a LaTeX document with this two lines in the preamble::
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
And then in some part of your document (in a figure float, for instance) add:
inputfoo
The result:
The other option is save the vectorial image as PDF (or EPS), that can be used just like any PNG or JPG image with the usual includegraphics
of the graphicx
package. This have the advantage that can use some effects as color gradients or transparencies that are not well exported to PSTricks and also reduce the compilation time. Note that using PStricks you cannot use the PDF but the EPS images. However with an updated distribution you still can use pdflatex
using the option [pdf]
of pstricks
package.
Full MWE:
documentclass[twocolumn]article
usepackagegraphicx
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
begindocument
beginfigure
centering
inputfoo2 % foo2.tex directly saved with Inkscape with a pspicture
captionA pstricks draw made with Inkscape. Only TeX code here.
endfigure
beginfigure[h]
centering
includegraphicsfoo.eps
captionEPS -- PDF version with gradients.
label
endfigure
enddocument
Note: The code of foo.tex
is too long to be posted and of scarce interest since is automatically generated from a manual draw. If you are curious about how is that code, is like this simple draw:
pssetxunit=.5pt,yunit=.51pt,runit=1pt
beginpspicture(800,1000)
newrgbcolorcurcolor.8 .9 .8 % Box
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(137,991)lineto(534,991)lineto(534,668)
lineto(137,668)closepath
newrgbcolorcurcolor1 .2 1 % line
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(147,677)
curveto(147,677)(191,876)(328,851)
curveto(466,826)(506,820)(475,961)
newrgbcolorcurcolor.4 .8 .4 % arrowhead head
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
newrgbcolorcurcolor0 0 1 % arrowhead border
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
endpspicture}
I left as exercise recreate the turbulence image in the same way. However, the equation of the image was typeset (inside Inkscape) using this LaTeX code:
frac partial overlineu_i partial t +
overlineu_j frac partial overlineu_i partial x_j =
- frac1rho fracpartial overlinep partial x_i
+ frac1rho fracpartialpartial x_j
left( mu fracpartial overlineu_ipartial x_j -
rho overlineu_i^prime u_j^prime right)
1
Very nice! +1. Perhaps you could also add thatpotrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.
– marmot
Apr 1 at 2:54
1
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
add a comment |
This is not an answer but an attempt to show that some type of vectorial art could be done without coding yourself as this could help to new users without a high LateX - tikz - maths training to produce high quality images.
The main point is that SVG files made with Inkscape, can be saved like pure TeX (PStricks) code and then used in a LaTeX document without loss of quality because are still a code to render a vectorial image. But sadly , the generated coded, said foo.tex
, is not compilable as is, and will cryptically warning you:
%% Please note this file requires PSTricks extensions
What the hell mean that? Simply that you must make a LaTeX document with this two lines in the preamble::
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
And then in some part of your document (in a figure float, for instance) add:
inputfoo
The result:
The other option is save the vectorial image as PDF (or EPS), that can be used just like any PNG or JPG image with the usual includegraphics
of the graphicx
package. This have the advantage that can use some effects as color gradients or transparencies that are not well exported to PSTricks and also reduce the compilation time. Note that using PStricks you cannot use the PDF but the EPS images. However with an updated distribution you still can use pdflatex
using the option [pdf]
of pstricks
package.
Full MWE:
documentclass[twocolumn]article
usepackagegraphicx
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
begindocument
beginfigure
centering
inputfoo2 % foo2.tex directly saved with Inkscape with a pspicture
captionA pstricks draw made with Inkscape. Only TeX code here.
endfigure
beginfigure[h]
centering
includegraphicsfoo.eps
captionEPS -- PDF version with gradients.
label
endfigure
enddocument
Note: The code of foo.tex
is too long to be posted and of scarce interest since is automatically generated from a manual draw. If you are curious about how is that code, is like this simple draw:
pssetxunit=.5pt,yunit=.51pt,runit=1pt
beginpspicture(800,1000)
newrgbcolorcurcolor.8 .9 .8 % Box
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(137,991)lineto(534,991)lineto(534,668)
lineto(137,668)closepath
newrgbcolorcurcolor1 .2 1 % line
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(147,677)
curveto(147,677)(191,876)(328,851)
curveto(466,826)(506,820)(475,961)
newrgbcolorcurcolor.4 .8 .4 % arrowhead head
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
newrgbcolorcurcolor0 0 1 % arrowhead border
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
endpspicture}
I left as exercise recreate the turbulence image in the same way. However, the equation of the image was typeset (inside Inkscape) using this LaTeX code:
frac partial overlineu_i partial t +
overlineu_j frac partial overlineu_i partial x_j =
- frac1rho fracpartial overlinep partial x_i
+ frac1rho fracpartialpartial x_j
left( mu fracpartial overlineu_ipartial x_j -
rho overlineu_i^prime u_j^prime right)
1
Very nice! +1. Perhaps you could also add thatpotrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.
– marmot
Apr 1 at 2:54
1
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
add a comment |
This is not an answer but an attempt to show that some type of vectorial art could be done without coding yourself as this could help to new users without a high LateX - tikz - maths training to produce high quality images.
The main point is that SVG files made with Inkscape, can be saved like pure TeX (PStricks) code and then used in a LaTeX document without loss of quality because are still a code to render a vectorial image. But sadly , the generated coded, said foo.tex
, is not compilable as is, and will cryptically warning you:
%% Please note this file requires PSTricks extensions
What the hell mean that? Simply that you must make a LaTeX document with this two lines in the preamble::
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
And then in some part of your document (in a figure float, for instance) add:
inputfoo
The result:
The other option is save the vectorial image as PDF (or EPS), that can be used just like any PNG or JPG image with the usual includegraphics
of the graphicx
package. This have the advantage that can use some effects as color gradients or transparencies that are not well exported to PSTricks and also reduce the compilation time. Note that using PStricks you cannot use the PDF but the EPS images. However with an updated distribution you still can use pdflatex
using the option [pdf]
of pstricks
package.
Full MWE:
documentclass[twocolumn]article
usepackagegraphicx
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
begindocument
beginfigure
centering
inputfoo2 % foo2.tex directly saved with Inkscape with a pspicture
captionA pstricks draw made with Inkscape. Only TeX code here.
endfigure
beginfigure[h]
centering
includegraphicsfoo.eps
captionEPS -- PDF version with gradients.
label
endfigure
enddocument
Note: The code of foo.tex
is too long to be posted and of scarce interest since is automatically generated from a manual draw. If you are curious about how is that code, is like this simple draw:
pssetxunit=.5pt,yunit=.51pt,runit=1pt
beginpspicture(800,1000)
newrgbcolorcurcolor.8 .9 .8 % Box
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(137,991)lineto(534,991)lineto(534,668)
lineto(137,668)closepath
newrgbcolorcurcolor1 .2 1 % line
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(147,677)
curveto(147,677)(191,876)(328,851)
curveto(466,826)(506,820)(475,961)
newrgbcolorcurcolor.4 .8 .4 % arrowhead head
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
newrgbcolorcurcolor0 0 1 % arrowhead border
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
endpspicture}
I left as exercise recreate the turbulence image in the same way. However, the equation of the image was typeset (inside Inkscape) using this LaTeX code:
frac partial overlineu_i partial t +
overlineu_j frac partial overlineu_i partial x_j =
- frac1rho fracpartial overlinep partial x_i
+ frac1rho fracpartialpartial x_j
left( mu fracpartial overlineu_ipartial x_j -
rho overlineu_i^prime u_j^prime right)
This is not an answer but an attempt to show that some type of vectorial art could be done without coding yourself as this could help to new users without a high LateX - tikz - maths training to produce high quality images.
The main point is that SVG files made with Inkscape, can be saved like pure TeX (PStricks) code and then used in a LaTeX document without loss of quality because are still a code to render a vectorial image. But sadly , the generated coded, said foo.tex
, is not compilable as is, and will cryptically warning you:
%% Please note this file requires PSTricks extensions
What the hell mean that? Simply that you must make a LaTeX document with this two lines in the preamble::
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
And then in some part of your document (in a figure float, for instance) add:
inputfoo
The result:
The other option is save the vectorial image as PDF (or EPS), that can be used just like any PNG or JPG image with the usual includegraphics
of the graphicx
package. This have the advantage that can use some effects as color gradients or transparencies that are not well exported to PSTricks and also reduce the compilation time. Note that using PStricks you cannot use the PDF but the EPS images. However with an updated distribution you still can use pdflatex
using the option [pdf]
of pstricks
package.
Full MWE:
documentclass[twocolumn]article
usepackagegraphicx
usepackage[pdf]pstricks % "pdf" to use with `pdflatex`!
usepackagepstricks-add
begindocument
beginfigure
centering
inputfoo2 % foo2.tex directly saved with Inkscape with a pspicture
captionA pstricks draw made with Inkscape. Only TeX code here.
endfigure
beginfigure[h]
centering
includegraphicsfoo.eps
captionEPS -- PDF version with gradients.
label
endfigure
enddocument
Note: The code of foo.tex
is too long to be posted and of scarce interest since is automatically generated from a manual draw. If you are curious about how is that code, is like this simple draw:
pssetxunit=.5pt,yunit=.51pt,runit=1pt
beginpspicture(800,1000)
newrgbcolorcurcolor.8 .9 .8 % Box
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(137,991)lineto(534,991)lineto(534,668)
lineto(137,668)closepath
newrgbcolorcurcolor1 .2 1 % line
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(147,677)
curveto(147,677)(191,876)(328,851)
curveto(466,826)(506,820)(475,961)
newrgbcolorcurcolor.4 .8 .4 % arrowhead head
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
newrgbcolorcurcolor0 0 1 % arrowhead border
pscustom[linewidth=4,linecolor=curcolor]
newpathmoveto(465,918)lineto(473,970)lineto(501,926)
curveto(489,931)(474,928)(465,918)closepath
endpspicture}
I left as exercise recreate the turbulence image in the same way. However, the equation of the image was typeset (inside Inkscape) using this LaTeX code:
frac partial overlineu_i partial t +
overlineu_j frac partial overlineu_i partial x_j =
- frac1rho fracpartial overlinep partial x_i
+ frac1rho fracpartialpartial x_j
left( mu fracpartial overlineu_ipartial x_j -
rho overlineu_i^prime u_j^prime right)
edited Apr 1 at 9:33
answered Apr 1 at 0:39
FranFran
53.7k6121183
53.7k6121183
1
Very nice! +1. Perhaps you could also add thatpotrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.
– marmot
Apr 1 at 2:54
1
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
add a comment |
1
Very nice! +1. Perhaps you could also add thatpotrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.
– marmot
Apr 1 at 2:54
1
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
1
1
Very nice! +1. Perhaps you could also add that
potrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.– marmot
Apr 1 at 2:54
Very nice! +1. Perhaps you could also add that
potrace
has the ability to convert an existing bitmap to a vector graphics format. The latter can be loaded in inkscape and then converted to svg, TikZ or PSTricks. This way you do not even have to draw the arcs in inkscape.– marmot
Apr 1 at 2:54
1
1
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
@marmot Inkscape can also nicely vectorize bitmaps (and even show a preview according to the settings). These tools are really useful for complex shapes like human silhouettes, but objects like arrow tails are traced as shapes instead as single bezier curve, so any fix of control points in these closely parallel curves, including convert the shape it single line, is a pain. Instead, draw manually a single line with 3-4 controls points is a child play, and the line will be always of the same fixed width. So for this case I was the tracing tool. :)
– Fran
Apr 1 at 9:30
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482462%2ftikz-how-to-fill-area-with-a-special-pattern%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Here is a question on randomly curved arrows. It is not difficult to draw random arrows, but if I interpret your question correctly, they should not intersect. Avoiding intersections is probably more efforts. So I wish to clarify: you do not want the arrows to intersect?
– marmot
Mar 31 at 16:35
@marmot: Thanks for your comment - you are completely right! The arrows should not intersect, because the fluid can not cross in reality.
– Dave
Mar 31 at 16:48
1
As a proof of concept, I'm very interested in how this can be coded (+1 to mamot, indeed) but from a practical point of view (time and result quality) I would do it manually in Inkscape.
– Fran
Mar 31 at 18:09
@Fran: I took me the whole weekend to put and adjust some spirals into my
tikzpicture
. Therefore I am curious if there is a better solution available for it.– Dave
Mar 31 at 18:12