Mobile app version of vmapp.org
Login or Join
Miguel516

: How to make wind flow / aerodynamic diagrams? I need some help on how to create good looking vectorized images of these kinds of themes: example2 http://authors.library.caltech.edu/25019/1/figs/fig305.gif

@Miguel516

Posted in: #InformationGraphics #Vector

I need some help on how to create good looking vectorized images of these kinds of themes:



example2 authors.library.caltech.edu/25019/1/figs/fig305.gif
I work a lot with Latex when it comes to typesetting so I have some basic experience with Tikz. However I feel that if I need to make complicated images like the ones above I find myself a bit lost.

I would very much appreciate if someone could point me in the right direction as to how I could go about making these kinds of images, preferably using free software.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel516

4 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley460

Disclaimers:


I don't typically program in Python unless I have to fix someone
else's code
I've never used Matplotlib - this is my first attempt at
using it and, since it looked interesting, the ONLY reason I'm posting this answer.


Now a more robust answer: (Not that I enjoy doing homework for PhD candidates...)

Everything here was stolen - flat out stolen - from the matplotlib website (see Examples) and from Stack Overflow (matplotlib save fig image trim). All I did was copy/paste it and test it.

The resulting out.svg file can be opened directly in Inkscape. The image is a Group/Groups of smaller images. Click on any part of the image, then use Inkscape's 'Ungroup' option. You may have to ungroup a few times to be able to directly manipulate part of the image.

from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.gca(projection='3d')
X = np.arange(-5, 5, 0.25)
Y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
ax.set_zlim(-1.01, 1.01)

ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))

fig.colorbar(surf, shrink=0.5, aspect=5)
#plt .show()

fig.set_size_inches(4,3)

fig.set_dpi(40)

fig.savefig('out.svg', transparent=True, bbox_inches='tight', pad_inches=0)

10% popularity Vote Up Vote Down


 

@Berumen635

First:
.PY + Matplotlib -> .SVG

Then,
.SVG -> Inkskape

However, .SVG is easy enough to learn to go .PY -> .SVG

You could also do .PY + Matplotlib -> .PDF. Inkscape would open that as well.

10% popularity Vote Up Vote Down


 

@Yeniel278

Graphing applications that do vector output are available. Ive used following applications quite successfully:


Mathematica <- my preference it can do images like above
Matlab (remember to export eps)
Python using matplotlib
Maple
PSTricks
Illustrator
Xara
Inkscape
Autocad


Tough you may need to use 3d apps or graph apps as well I suggest:


yEd, various graph layouts and can be run off the internet with no instal needed.
Gephi, force directed graphs
Maya, 3DsMax with vector render
Creo, NX, Catia, Solidworks...


Usually its more productive to use some tool that can actually graph things as a basis and then import the EPS file into a graphics artists tool like illustrator for later finalization. The real benefit is that you can play with the graphs before you get involved so changing is easy.

Its also possible to graph stuff on your own in Illustrator if you wish, some code to help you on your way.

Resources

Heres some quick list of stuff till I have time to find some suitable examples (laminar flow right).

mathematica.stackexchange.com/ <- ask similar question here www.math.ubc.ca/~cass/graphics/manual/

Some examples with similar components (you may need to add more stuff but here's some parts of the puzzle):

demonstrations.wolfram.com/CouetteFlow/ for the crossections
Streamlines for Laminar Flow Past a Rotating Solid Cylinder
Potential Flow over an Airfoil Specified by Numerical Data File

10% popularity Vote Up Vote Down


 

@Ann6370331

Your best bet is to pick up a vector editor and learn how to use it. The examples above do not seem complicated, and a basic understanding of drawing vectors would do the job just fine.

If you will be trying one out, I would advise against Illustrator or Corel Draw. While both are powerful and popular tools of choice, they will seem daunting for a beginner. Inkscape is a good choice. It is free and learning it should not be a problem.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme