Graphics, Figures & TablesFunny picture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
danielvelizv
Posts: 45
Joined: Wed May 25, 2016 7:04 am

Funny picture

Post by danielvelizv »

Hello people, here's a new question, I need to create (or finish) a drawing of a pokeball (Pokémon), it is almost ready but I can't find the solution to fill the below part with white color, in the attached picture I explained the requirement I need. I leave the written code here to receive any help or suggestions, regards!

Code: Select all

\documentclass[12pt,letterpaper]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{tikz}
\usetikzlibrary{shadings}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
\draw [shading=ball, ball color=red] (0,1.498) circle (2.3cm); 
\draw (-2.295,1.35) arc (180:360:2.295 and 1);
\filldraw[opaque, black, fill=white, line width=1pt] (0, 0.35) circle (0.22cm);
\end{tikzpicture}
\end{document}
Attachments
pokeball.png
pokeball.png (26.16 KiB) Viewed 3254 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Funny picture

Post by kaiserkarl13 »

How about this?

Code: Select all

\documentclass[12pt,letterpaper]{standalone}
%\usepackage[utf8]{inputenc}
%\usepackage[spanish]{babel}
\usepackage{tikz}
\usetikzlibrary{shadings}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
  \path [shading=ball, ball color=red] (0,1.498) circle (2.3cm);
  \begin{scope}
    \clip (-2.295,1.35) arc (180:360:2.295 and 1) -- ++(0,-2.3) -- ++(-4.6,0)
        -- cycle;
    \path [shading=ball, ball color=white] (0,1.498) circle (2.3cm);
  \end{scope}
  \draw (0,1.498) circle (2.3cm);
  \draw (-2.295,1.35) arc (180:360:2.295 and 1);
  \filldraw[opaque, black, fill=white, line width=1pt] (0, 0.35) circle (0.22cm);
\end{tikzpicture}
\end{document}
danielvelizv
Posts: 45
Joined: Wed May 25, 2016 7:04 am

Funny picture

Post by danielvelizv »

kaiserkarl13 wrote:How about this?

Code: Select all

\documentclass[12pt,letterpaper]{standalone}
%\usepackage[utf8]{inputenc}
%\usepackage[spanish]{babel}
\usepackage{tikz}
\usetikzlibrary{shadings}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
  \path [shading=ball, ball color=red] (0,1.498) circle (2.3cm);
  \begin{scope}
    \clip (-2.295,1.35) arc (180:360:2.295 and 1) -- ++(0,-2.3) -- ++(-4.6,0)
        -- cycle;
    \path [shading=ball, ball color=white] (0,1.498) circle (2.3cm);
  \end{scope}
  \draw (0,1.498) circle (2.3cm);
  \draw (-2.295,1.35) arc (180:360:2.295 and 1);
  \filldraw[opaque, black, fill=white, line width=1pt] (0, 0.35) circle (0.22cm);
\end{tikzpicture}
\end{document}
Thanks buddy, I was looking for a solution about this, I was absent for a while since I posted this. I really appreciate this, sincerely yours. Daniel. Happy New year 2017
Post Reply