Software development

3D Plotting Software for Python::Part 1::PyX

There are lots of good open-source tools that you can use to make high-resolution, publication-quality 2D plots.  Personally, I like to use Python, numpy, and matplotlib.  Unfortunately, it is much harder to find a good tools to make 3D plots.  Older versions of matplotlib had rudimentary 3D support, but this was removed in version 0.98.  […]

3D Plotting Software for Python::Part 1::PyX Read More »

Using Python to generate XML files for visualization in Paraview

VTK is an open-source software system for “3D computer graphics, image processing, and visualization” developed by by Kitware. VTK is the foundation of Paraview, an industrial-strength CFD visualization tool that I have found to be very useful. I generate “second generation” XML-based files from my Python code and import them into Paraview for visualization. I

Using Python to generate XML files for visualization in Paraview Read More »

Even faster collision detection in Python using Numpy

Last night, in the shower, I realized that my collision detection routine could be even faster. Here is a representative snippet of code from my previous post: d2 = (x-self.x[0:i])*(x-self.x[0:i]) + (y-self.y[0:i])*(y-self.y[0:i]) + (z-self.z[0:i])*(z-self.z[0:i]) For some reason, I used the code (x-self.x)*(x-self.x) instead of (x-self.x)**2. Upon further reflection, I realized that (x-self.x)*(x-self.x) computes the difference

Even faster collision detection in Python using Numpy Read More »