On Sat, 2009-06-06 at 21:35 -0400, Christopher Olah wrote: > Thanks for your responses! > > > David Joyner Wrote: > > http://www.sagemath.org/doc/reference/sage/plot/plot3d/implicit_plot3d.html > > sage's implicit plots seem perfect. Thanks! > > > Kapil Hari Paranjape Wrote: > > Such plots are (in general) a (rather difficult) problem in real > > algebraic geometry so it is unlikely that you will have a generic > > algorithm that "Just Works"! > > Couldn't you just use a 3D scalar field with only boolean values > (check if each point matches)? I'd been planning to write such a > program if I couldn't find a suitable solution... I don't think you want boolean. I think you want to express it in terms of f(x,y) or f(x,y,z) = 0. In your example: y^4 + y^3 - x^2 - 3x - z - z^8 = f(x,y,z) = 0 Then calculate the value of f(x,y,z) with scalar (not boolean) values on a grid and plot its zero contour. With a decent grid, linear interpolation on the edges of cells with points above and below it give you a set of intercepts which form a good approximation of the surface. There are numerous packages which can do this, in parallel too. POVray is one, and I implemented it in Illuminator in not too many lines if you want some source code (using PETSc objects). For more accuracy, use Newton's method instead of linear interpolation to find the root on each edge. Then bisect the edges of your new surface to make more points, and refine each of those along the function gradient to the nearest root, and repeat the edge division. I don't know of any package specifically designed for that though. -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/
Attachment:
signature.asc
Description: This is a digitally signed message part