Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > drawing mathematical "images"

drawing mathematical "images"
Thread Tools
JBL
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Oct 9, 2001, 06:53 PM
 
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!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:53 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,