
Ist es möglich, eine Form mit einer Farbe zu füllen, die wie Aquarell aussieht, wie in diesem Bild
Tikz oder pgfplots verwenden?
Quelle:http://bartoszmilewski.com/2015/07/29/representable-functors/
Antwort1
Es gibt einige "billige" Möglichkeiten, komplexe Bilder zu erzeugen. Aber wie TikIm Z-Handbuch steht:
Diese sind von allen am wenigsten portierbar und stellen die größte Belastung für den Renderer dar. Sie sind langsam und werden möglicherweise nicht richtig gedruckt!
\documentclass[tikz,border=9]{standalone}
\begin{document}
\pgfdeclarefunctionalshading{watercolor}{\pgfpoint{-25bp}{-25bp}}{\pgfpoint{25bp}{25bp}}{}{
-0.1 0.651
exch 4 2 roll
12.5 div exch 12.5 div 1 index dup mul add
true
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{dup dup mul 2 index dup mul sub 3 index add 3 1 roll 2 mul mul 3 index add exch 2 copy dup mul exch dup mul add 4 le}{false}ifelse
{0 0 0}{1 1 1}ifelse
}
\tikz{\shade[shading=watercolor](-10,-10)rectangle(10,10);}
\end{document}
Notiz
Ich behaupte nicht, dass das wie ein Aquarell aussieht. Und ich habe auch nicht versucht, das zu erreichen. Ich bin künstlerisch nicht begabt. Der Rest ist also Ihre Aufgabe.
Anmerkung 2
Das Prinzip der Aquarelltechnik besteht darin, dass die Pigmentmoleküle auf der Leinwand verlaufen und mit der Zeit langsamer werden. Daher ist die beste Möglichkeit, Aquarelltechnik zu simulieren, vielleicht die numerische Lösung einer partiellen Differentialgleichung. Dies ist in nicht zulässig \pgfdeclarefunctionalshading
. Aber es ist einen Versuch wert, wenn Sie ein 2D-Array haben.