I need to reproduce various 2D and3D figures, such as the ones shown below, which were originally hand-drawn. Parts of each figure can clearly be done directly with TikZ
code, but other parts, especially irregular "curvy" parts, would be more easily created by hand drawing.
Note that I will be modifying some of these figures and creating new ones as well that have both regular, readily-codeable parts (including mathematical notation) and irregular, "curvy" parts.
I envision a work-flow in which those "curvy" parts are constructed with a drawing app on an iPad Pro.
Question: Is there some iOS app for iPad Pro from which free-hand drawings of the "curvy" parts could readily be converted into TikZ
code that could be added to the parts that are best constructed directly in TikZ
? Or is there some better way?
Note: I am not asking for TikZ
code to create these figures! Rather, I am asking about a technological methodology leading to that code.
Best Answer
Not an answer and really just for fun. I understand that you did not ask for the codes. The main purpose of this is to substantiate the claim that it is not too difficult to draw these irregular shapes with elementary TikZ syntax. Here are some reproductions of two of the figures of your list.
They should illustrate that with TikZ you can do all sorts of cool things like computing intersections of lines and/or surfaces. Of course, you may do similar things with some graphics software, but IMHO the advantage of this approach is that you only need to change one thing to have global changes. For instance, if you do not like the lengths of the dashes all you need to do is to redefine the style. And last but not least I think it is more fun to do it that way. I understand of course that others may not share that opinion.
ADDENDUM: A proposal to convert freehand graphics to "nice(r)" TikZ code. First save your freehand graphics in some format, here I will call the file
tmp.png
(for which I just took the first of your pictures). Then include it into a TikZ picture and read off some coordinates forsmooth cycles
etc.Most likely one could write a code that extracts some coordinates along the contours. I guess that with machine learning it will be possible very soon to let the computer do that. It is painful, yes, at present to do that by hand but not super painful. (And I apologize in advance if someone already has done the thing with the automatic grid with labels, I could not find it so I wrote it quickly myself. In the examples I found the range of the tick labels was hard coded.)