I would like to be able to create graphic objects based on mathematical functions. For instance, I would like to create a gabor patch which is defined as an object whose grey level as a function of x and y is given by the formula:
grey =exp(-(x*x + y*y)*sin(x)
What is the best way to do this in Cocoa so that you get the maximum resolution the display device is capable of? For instance I could just create a bit mapped image file but that would mean doing some sort of interpolation every time I wanted to enlarge or print the image. That doesn't seem to make a lot of sense given that the RGBA values are defined by a mathematical function so that I always know precisely what they should be without and interpolation. Looking at NSImage it looks like if I understood what it was doing better this would be pretty simple, but I am having a little trouble figuring out the documentation and I can't find any relevant sample code. Can someone help me out?
Thanks!