Formula/Equation/3D Graph -> Mesh Model

Is there a way to generate a 3D equation into a mesh using Python? Or perhaps using a 3D graphing software that exports a mesh? (I haven’t found anything yet).

I might have a contract coming up in which I need this functionality. I could do it manually, but it would be nice if Python could help… I don’t know much Py at all. (That’s an overstatment. I know nothing useful).

I can use Win. Mac or Linux as a tool to get me there.
Thx in advance.

Yes it certainly is. I wrote a short little script to do it in there (it only does edges, not faces, though):
http://blenderartists.org/forum/showthread.php?t=105158&highlight=graph

If you have Matlab (and I assume octave as well), then you can generate your mesh in that (in Matlab its the function meshgrid()), and export it in some way you like and reimport it into Blender with some reconstruction.

You could also always just do it in Blender as well. Its relatively easy to use the Python math module to allow you to do so.

I also have written a script that uses a rectangular domain of faces to graph a 3-D equation. If you’d like I can post that as well. I hadn’t planned on releasing it, but rather turning it into a tutorial (eventually). It’d be relatively simple, as well, to extend it to use an arbitrary domain.

Check out blender analytical geometry. Haven’t used it in a long time so don’t know if it’s still supported, but try its homepage:
http://www.selleri.org/Blender/scripts/text.html
there appears to be a newer version here
http://wiki.blender.org/index.php/Scripts/Catalog/MeshPage4

Perhaps you need something like that :
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_surfaceimplicite.htm

Definitely go with that, unless you just need to code it yourself for some reason…

Note :this is a sharp method which give sharp model.

… i’m working on a new version (since … a lot of time) but the best solution would be that we can have an access to one of the two available polygonizers (metaball and fluid) in blender through the mathutils module.

Thanks all!

jms - your script only works with implicit equations, right? and “A, B, C, D” are just ease of use variables? I think I understand the functionality of your script…I just don’t know whether the equation I’ll be getting will be implicit or not.