2

I want to fill the lower part of the circle (225° - 315°) with a gradient that is oriented to the curve of the circle. The whole sides at 225° and 315° should be the beginning of the colors. Now it's oriented to the tips on both sides.

  \fill[lightgray] (0,0) -- (90:5) arc (90:225:5) -- cycle; 
  
  \fill[left color=lightgray, right color=white] (0,0) -- (225:5) arc (225:315:5) -- cycle; 

circle_screenshot

My idea is, that the gradient should orientate on a path like the one below (roughly drawn over the image), but i really do not know how to make that happen. I would highly appreciate any tipps or links to information that would be usefull to me.

[I looked here, but it does not seem to fit my problem.]

enter image description here


Full code:

\documentclass[10pt]{article}

\usepackage{blindtext}

\usepackage{fancyhdr}

\usepackage{ragged2e}

\usepackage[utf8]{inputenc}

\usepackage[labelformat=empty]{caption}

\usepackage{tikz}

%\usepackage{wrapfig}

\usetikzlibrary{mindmap,shadows,trees,shapes,through, positioning, backgrounds, fadings}

\usepackage{geometry}
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=15mm,
 top=20mm,
 right=15mm
 }

\pagestyle{fancy}
\fancyhf{}
\rhead{\includegraphics[height=1.5cm]{XXX}}
\lhead{XXX}
%\rfoot{Page \thepage}



\begin{document}

\hfill

\centering

{\huge\textbf{mentales Lexikon\\}}

\bigskip

\textbf{Übung zur Elaboration/Speicherung von Wörtern}\\\smallskip von XXX

\bigskip
\begin{figure}[h!]
\begin{tikzpicture}[framed, text centered]
  
  \coordinate (1) at (0,0);
  \coordinate (2) at (0,5);

  \fill[lightgray] (0,0) -- (90:5) arc (90:225:5) -- cycle; 
  
  \fill[left color=lightgray, right color=white] (0,0) -- (225:5) arc (225:315:5) -- cycle; 


  %fill=left!30!white

  \draw[black] (0:5)  -- (1);
  \draw[black] (45:5) -- (1);
  \draw[white] (90:5) -- (1);
  \draw[white] (135:5) -- (1);
  \draw[white] (180:5) -- (1);
  \draw[white] (225:5) -- (1);
  \draw[white] (270:5) -- (1);
  \draw[black] (315:5) -- (1);

  \node [draw, circle through=(2), very thick] at (1) {};

  \node [align=center] (episodisch) at (22.5:3.3) {episodische\\Informationen};
  \node [align=center,draw, fill=white] (epi_note) at (22.5:6.7) {Quadratisch. Praktisch. Gut.\footnotemark\\Informationen\\???};

  \node [align=center] (prozedual) at (67.5:3.3) {prozeduale\\Informationen};
  \node [align=center,draw, fill=white] (proz_note) at (67.5:6.7) {Informationen \\zur Handlung};

  \node [align=center] (graphemisch) at (112.5:3.3) {graphemische\\Informationen};
  \node [align=center,draw, fill=white] (graph_note) at (112.5:6.7) {Informationen \\zur Schreibweise};

  \node [align=center] (morphologisch) at (157.5:3.3) {morphologische\\Informationen};
  \node [align=center,draw, fill=white] (morph_note) at (157.5:6.7) {morphologische \\Informationen};
  
  \node [align=center] (phonologisch) at (202.5:3.3) {phonologische\\Informationen};
  \node [align=center,draw, fill=white] (phon_note) at (202.5:6.7) {kwadratisch\\ipa\\lautschrift};

  \node [align=center] (syntaktisch) at (270:3.3) {syntaktische\\Informationen};
  \node [align=center,draw, fill=white] (syn_note) at (270:6.7) {vor dem Nomen\\Informationen};
  
  \node [align=center] (semantisch) at (337.5:3.3) {semantische\\Informationen};
  \node [align=center,draw, fill=white] (sem_note) at (337.5:6.7) {viereckig\\mit gleich langen Seiten\\Mathematik: in der zweiten Potenz\footnotemark};

  \node [align=center, draw] (lemma) at (0:7.5) {\textbf{Lemma}};
  \node [align=center, draw, fill=lightgray] (lexem) at (180:7.5) {\textbf{Lexem}};
  
  \node [rectangle, fill=white,draw] (quadratisch) at (0,0) {"quadratisch"};

\end{tikzpicture} 
\caption[test]{Modell eines Lexikoneintrages zum Wort "quadratisch"\footnotemark}

\end{figure}

\bigskip

\justifying

\blindtext[1]

\footnotetext[1]{\raggedright Werbeslogan der Schokoladenmarke Ritter Sport der Alfred Ritter GmbH \& Co. KG}
\footnotetext[2]{\raggedright Artikel des Wörterbuchs der deutschen Gegenwartssprache, elektronische Version, (1974) abgerufen unter https://www.dwds.de/wb/quadratisch}
\footnotetext[3]{\raggedright Modell nach Luger (2006) zitiert aus Reber K \& Schönauer-Schneider, W.(2018). Bausteine sprachheilpädagogischen Unterrichts. München: Reinhardt Verlag}

\end{document}
6
  • 1
    Welcome to TeX.SE!
    – Mensch
    Nov 12, 2021 at 20:34
  • @Mensch Thanks! According to your username you speak my language. ;)
    – choXer
    Nov 12, 2021 at 20:35
  • 1
    Und auch andere leute die deutsch reden -:) Nov 12, 2021 at 21:07
  • Maybe this could help you getting started: tex.stackexchange.com/q/185728/47927 TikZ has only a ”color wheel” as polar gradient (which would be what you need), but you may be able to change the colors for this gradient. Nov 12, 2021 at 21:46
  • Probably easier: use this approach and draw a very thick arc that covers the segment exactly. Nov 12, 2021 at 22:14

2 Answers 2

3
\documentclass{article}
\usepackage{xfp}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \x in {0,...,100}
    \fill[white!\x!lightgray]
        (0,0) -- (\fpeval{\x=0 ? 225 : 225+\x*90/101-0.02}:5)
        arc[start angle=\fpeval{\x=0 ? 225 : 225+\x*90/101-0.02},
        end angle=225+\x*90/101+90/101,
        radius=5] -- cycle;
\end{tikzpicture}
\end{document}

enter image description here

without any package (except of course tikz)

\documentclass{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
        \foreach \x in {0,...,100}
        \fill[white!\x!lightgray]
        (0,0) -- (\ifnum \x=0 225 \else 225+\x*90/101-0.02 \fi:5)
        arc[start angle={\ifnum \x=0 225 \else 225+\x*90/101-0.02 \fi},
        end angle=225+\x*90/101+90/101,
        radius=5] -- cycle;
    \end{tikzpicture}
\end{document}
2
  • Wouldn’t this even be possible without any additional packages? It essentially draws a lot of tiny segments coloured in different shades of gray, right? +1 anyways Nov 13, 2021 at 21:38
  • @Jasper Habicht yes, see edit. Thank you.
    – polyn
    Nov 14, 2021 at 0:00
3

Best I could come up with:

\documentclass[10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{ragged2e}
\usepackage[labelformat=empty]{caption}
\usepackage{tikz}

%\usepackage{wrapfig}

\usetikzlibrary{mindmap, shadows, trees, shapes, through, positioning, backgrounds, fadings}

\usepackage{geometry}
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=15mm,
 top=20mm,
 right=15mm
 }

\pagestyle{fancy}
\fancyhf{}
\rhead{\includegraphics[height=1.5cm]{example-image-a}}
\lhead{XXX}
% \rfoot{Page \thepage}

\begin{document}

\hfill

\centering

{\huge\textbf{mentales Lexikon\\}}

\bigskip

\textbf{Übung zur Elaboration/Speicherung von Wörtern}\\\smallskip von XXX

\bigskip
\begin{figure}[h!]
\begin{tikzpicture}[framed, text centered]
  
  \coordinate (1) at (0,0);
  \coordinate (2) at (0,5);

  \fill[lightgray] (0,0) -- (90:5) arc (90:225:5) -- cycle; 
  
  %\fill[left color=lightgray, right color=white] (0,0) -- (225:5) arc (225:315:5) -- cycle; 

  %%% polar gradient fill %%%
  \begin{scope}
    \clip (315:0) -- (315:5) arc (315:225:5) -- cycle;
    \foreach \i in {1,...,100} {
      \draw[white!\i!lightgray, line width=4pt] 
        ({225+\i*(315-225)/100}:0) -- ({225+\i*(315-225)/100}:5);
    }
  \end{scope}
  %%% === %%%

  %fill=left!30!white

  \draw[black] (0:5)  -- (1);
  \draw[black] (45:5) -- (1);
  \draw[white] (90:5) -- (1);
  \draw[white] (135:5) -- (1);
  \draw[white] (180:5) -- (1);
  \draw[white] (225:5) -- (1);
  \draw[white] (270:5) -- (1);
  \draw[black] (315:5) -- (1);

  \node [draw, circle through=(2), very thick] at (1) {};

  \node [align=center] (episodisch) at (22.5:3.3) {episodische\\Informationen};
  \node [align=center,draw, fill=white] (epi_note) at (22.5:6.7) {Quadratisch. Praktisch. Gut.\footnotemark\\Informationen\\???};

  \node [align=center] (prozedual) at (67.5:3.3) {prozeduale\\Informationen};
  \node [align=center,draw, fill=white] (proz_note) at (67.5:6.7) {Informationen \\zur Handlung};

  \node [align=center] (graphemisch) at (112.5:3.3) {graphemische\\Informationen};
  \node [align=center,draw, fill=white] (graph_note) at (112.5:6.7) {Informationen \\zur Schreibweise};

  \node [align=center] (morphologisch) at (157.5:3.3) {morphologische\\Informationen};
  \node [align=center,draw, fill=white] (morph_note) at (157.5:6.7) {morphologische \\Informationen};
  
  \node [align=center] (phonologisch) at (202.5:3.3) {phonologische\\Informationen};
  \node [align=center,draw, fill=white] (phon_note) at (202.5:6.7) {kwadratisch\\ipa\\lautschrift};

  \node [align=center] (syntaktisch) at (270:3.3) {syntaktische\\Informationen};
  \node [align=center,draw, fill=white] (syn_note) at (270:6.7) {vor dem Nomen\\Informationen};
  
  \node [align=center] (semantisch) at (337.5:3.3) {semantische\\Informationen};
  \node [align=center,draw, fill=white] (sem_note) at (337.5:6.7) {viereckig\\mit gleich langen Seiten\\Mathematik: in der zweiten Potenz\footnotemark};

  \node [align=center, draw] (lemma) at (0:7.5) {\textbf{Lemma}};
  \node [align=center, draw, fill=lightgray] (lexem) at (180:7.5) {\textbf{Lexem}};
  
  \node [rectangle, fill=white,draw] (quadratisch) at (0,0) {"quadratisch"};

\end{tikzpicture} 
\caption[test]{Modell eines Lexikoneintrages zum Wort "quadratisch"\footnotemark}

\end{figure}

\bigskip

\justifying

\blindtext[1]

\footnotetext[1]{\raggedright Werbeslogan der Schokoladenmarke Ritter Sport der Alfred Ritter GmbH \& Co. KG}
\footnotetext[2]{\raggedright Artikel des Wörterbuchs der deutschen Gegenwartssprache, elektronische Version, (1974) abgerufen unter https://www.dwds.de/wb/quadratisch}
\footnotetext[3]{\raggedright Modell nach Luger (2006) zitiert aus Reber K \& Schönauer-Schneider, W.(2018). Bausteine sprachheilpädagogischen Unterrichts. München: Reinhardt Verlag}

\end{document}

The code essentially draw a lot of lines whose color shifts gradually from white to gray and whose angle gradually grows.

Shortcoming: the last line covers the other lines, which is quite visible.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .