To save coding I took an example program from the Java Developer's Alamanac 1.4 and replaced the code inside the loop that generates a pixel in the Mandelbrot set image with:
String sqlstr = "execute function mandelbrot(ROW(" + p[c] + "," + q + ")::complex)";rs = stmt.executeQuery(sqlstr);rs.next();pixels[pIx++] = (byte)(rs.getInt(1) % 16);
Perversely I implemented the most inefficient method possible - generating and selecting each pixel individually over the network, which if nothing else provided ample time to monitor the stored procedure stack with onstat -g ses.
To utilize the power of IDS in a practical scenario the coordinate and generated data would be stored in a table. For a real example of an Informix powered scientific project, check out Barrodale Computing Services R&D - the Grid Slicer Demo is fun (here's a PDF write-up: http://www.barrodale.com/docs/ibm_grid_writeup.pdf).