Jasper van de Gronde wrote:
Juan Vuletich wrote:
Well, the mathematics is the sampling theorem. As I say in my page, what is needed is to model the image as a function of (x, y) where x and y are reals (and not integers). That function needs to be filtered to honor the sampling theorem before sampling. I'm also sampling at (approximate) subpixel positions.
I understand, but in principle that's what every rasterizer does. Well, not all do it as correctly or precisely as they could, but the principle is the same.
I believe that existing rasterizers for 2d graphics use either pixel coverage or super sampling. Please point me to some reference if I'm wrong.
Applying a real filter to a continuous ("analog") function and then sampling is something quite different.
From what I can see you seem to be doing it quite precisely, but this is definitely not trivial, at least if you also want it to be fast. Thus my question about the precise method used.
No, it is not trivial. It took me about a year to come up with the basic ideas, and about 2 additional years to reach the current status. This is the result of 3 years of unpaid work, and even if I want it all to be eventually in the public domain / MIT license (as appropriate), first I need: 1) Publish it with proper author attribution. It might be in a good magazine, or it might be as a Ph.D. thesis. Both require the work to be unpublished before. 2) Secure it in the public domain, so "bad guys" can't patent it. 3) Make some money, to be able to keep working on interesting stuff. This could be done by selling consulting services to someone interested in my work, provided they don't want to restrict what I can do with it.
When I have these worked out (and I welcome help and suggestions from you guys!), I'll be able to make it all available without restrictions.
Also, you show a demo of an image where the seams are not shown. Did you render the all objects to the same buffer or are you able to composite them seamlessly (without having problems with overlaps). And in either case, how did you make this efficient.
I rendered all the objects to an intermediate buffer and later I clean it. This is another part that should be properly published before fully disclosing it.
BTW, why is there also a color difference between your images and Inkscape.
There should be none. Where do you see it?
For example the lion demo on your site. The two versions have very clearly different colors on my monitor. (Perhaps there's an issue with gamma or color profile settings...)
Oh, yes! I needed to check the numeric values. It seems my rgb values are slightly higher. I was using float arithmetic when blending, but recently did an integer only version for speed. It seems I wasn't careful enough when rounding. Thanks for pointing it out! I hope to fix the bug and the samples tomorrow.
Cheers, Juan Vuletich