Re: [Phys-L] AI drawing tool for simple illustrations?
- From: John Denker <jsd@av8n.com>
- Date: Sat, 23 Dec 2023 21:34:49 -0700
On 12/21/23 1:44 PM, Jeff Marx via Phys-l wrote in part:
... drawing simple 2-D (maybe 3-D) illustrations that accompany a
physics exam or homework item or a problem solution for students in
college-level courses? ...
Let me start with that subset of the question, so I can give a fairly general,
fairly constructive answer.
For 2D diagrams, including apparatus diagrams, free-body diagrams, et cetera, I
use *inkscape* ... which is a free, open-source vector drawing system, roughly
analogous to the $$$ Adobe Illustrator.
I use inkscape a lot. A whole lot.
For example, you can use it to draw a mathematically perfect 3:4:5 triangle in
less time than it takes to tell about it. As for other things you might find in
a free-body diagram, such as a spring or an anvil or a crash-test dummy, I have
a collection of such things, my personal clip-art collection, that I can paste
into my artwork very easily. It's all vector graphics, so it's infinitely
scalable with no loss in accuracy.
Inkscape can also deal with raster data. You can insert a photo, clip it to the
desired size and shape, rescale it, and position it as desired. This of course
will not be infinitely scalable, but if the original photo has sufficiently
high resolution you don't care.
The output file format is .svg, which is an open standard and very widely
recognized. Inkscape can also export to raster formats such as .png.
Most of what I draw is quasi-free-hand, in the sense that it's "what you see is what
you get" but not truly free, because I'm drawing higher-level objects such as
ellipses, rectangles, and Bezier curves. I commonly edit them after drawing them.
Actually you can do truly freehand input to inkscape. Freehand with a mouse is
a losing proposition. I draw on a high-quality tablet using a stylus. Again, I
commonly edit the curves after freehanding them. True freehand is less than
0.1% of what I do.
===========
For anything resembling 2D data visualization, such as a XY scatter plot or a
curve in the XY plane, I use a spreadsheet. In particular, I use *gnumeric* ...
which is a free and open-source analog to $$$ MS excel.
Gnumeric can export graphs as .png. It can also export them as .svg, which
means you can import them into inkscape if you want to add additional layers of
annotation or whatever.
=====================
Now, here's the question that was actually asked:
Does anyone have any experience (positive or otherwise) using an
"AI-assist" for drawing simple 2-D (maybe 3-D) illustration
Short answer: No experience. I doubt any such thing exists. I doubt it will
exist any time soon. The market for physics diagrams is too small and too
specialized. By way of analogy, nobody sells physics-lab wrenches or
physics-lab copper tubing. If you need such things you go to the hardware store
and buy a generic product that was produced for some other reason.
In that spirit, there are generic drawing tools, some of which are quite
intelligent, and we can use them. Many of them have a steep learning curve, but
if for some reason you happen to have already learned them, you can use them to
good effect.
For example, if you are designing a new house, or just a new deck for the back
of your house, there are CAD programs for that. If you are designing a
character for a video game, or a windsock or aileron for a fancy flight
simulator, there are CAD programs for that. If you are designing something to
be 3D-printed, there are CAD programs for that.
=============
Additional specific suggestions:
For processing raster data, e.g. photos, I use *gimp* ... which is a free and
open-source analog to $$$ Photoshop. It can do color correction, masking and
clipping of a complex scene, blurring and other forms of filtering, and so on.
I need this only rarely, but when I need it I really need it.
There's a lot you can do with *ImageMagick* such as clipping, resizing,
compositing, annotating, and so on. It's command-based, not point-and-click.
That's often what I want, because typically whatever I'm doing needs to be done
a hundred times or ten thousand times.
===
For some complex 2D scenes, rather than using a spreadsheet, I write a c++ or
perl program that emits a .svg file directly.
===
As for 3D data: Sometimes you can get by with what I call 2½D graphics. That
is, use gnumeric or inkscape, and apply by hand the rules of perspective.
For 3D scenes that are complex and/or require high accuracy and/or require
texture-mapping and/or require interactivity, I write a perl program or c++
program that emits a .x3d file directly. You can then navigate through the
scene, interactively, using a standalone viewer or using a web browser.
As an example of texture-mapping: You can create a flat label and texture-map
it onto a cylinder, then view the cylinder from arbitrary angles. Similarly you
can take an ordinary flat map-maker's map and texture-map it onto a sphere, to
create a 3D model of the earth.
3D graphics, especially 3D animations, is the topic of very vigorous R&D. There
is some impressive stuff on the horizon, but it's not yet ready for prime time.
===
For geospatial data, you can do a lot with Grass GIS. It's really powerful. The
documentation is not great, and focuses on the point-and-click interface, which
is almost never what I want. Fortunately, there is an API that allows you to
invoke any feature from a script. There's a steep learning curve, but this
allows you to do things that would be ridiculously difficult otherwise.
Example: Suppose you want to find the elevation of an arbitrary point on the
earth's surface.
For certain types of simple geospatial data, you can write a program that emits a .kml
file, and then read the file into google-earth-pro. Example: Hurricane forecast
"spaghetti plots".
===================
So, that's the view from where I sit. It doesn't really answer the question
that was asked, but perhaps some folks will find it useful.