1

I'm new to Latex and I have some fairly complicated diagrams I need to render using latex code. The most convenient way to do this is if I could draw them out in Inkscape and then somehow convert that to latex code.

Example of what I'm trying to do: enter image description here

and other curves and elementary topology diagrams of sets, blobs etc.

cfr
  • 198,882
  • 2
    Welcome! Inkscape lets you export TikZ code, so what's the problem? – cfr Jun 03 '18 at 22:37
  • You can export tikz code from Inkscape in the recent versions or read .svg files with tikz. See the manual or this question: https://tex.stackexchange.com/questions/151232/exporting-from-inkscape-to-latex-via-tikz#151287 – Huang_d Jun 03 '18 at 22:38
  • 1
    @Huang_d Not that recent: it's been available for a while. (But maybe you needed a plugin and now you don't or something like that. But the functionality has been available for ages.) – cfr Jun 03 '18 at 22:39

1 Answers1

0

Just for fun and because it is not so easy to use the 3d library with inkscape.

\documentclass[border=3.14mm, tikz]{standalone}
\usetikzlibrary{3d,intersections}
\begin{document}

\begin{tikzpicture}[y={({(cos(30)/sqrt(2))*1cm},{(sin(30)/sqrt(2))*1cm})},x={(1cm,0cm)}, z={(0cm,1cm)},font=\sffamily]
\begin{scope}[canvas is xy plane at z=0]
\draw[fill=gray!20] (-4,-4) -- (4,-4) -- (4,4) -- (-4,4) -- cycle;
\end{scope}
\draw[-latex] (-3.5,0,0) -- (3.5,0,0) node[below]{Re};
\draw[-latex] (0,-3.5,0) -- (0,3.5,0) node[right]{Im};
\draw[-latex] (0,0,0) -- (0,0,4.5) node[right]{$w$};
\draw[name path global=line,gray!50](0,0,4) -- (3,1,0) node[above right,black]{$z$};
\begin{scope}[canvas is xz plane at y=0]
\shade[ball color=gray,opacity=0.5,name path global=circle] (0,2) circle(2);
\end{scope}
\draw[name intersections={of=circle and line},shorten >=-2pt,line
width=1.2\pgflinewidth] (3,1,0) --
(intersection-2) node[above right]{$z$};
\end{tikzpicture}
\end{document}

enter image description here