News for hackers. Stuff that matters.
Re:Exact Polygonal Filtering: Using Green's Theorem and Clip... by muyyatin2 on Thursday August 15, 2024 @03:44AM (#41253885)
It is more similar to the convolution of the shape with the filter (you can take the product of the filter, at various offsets, with the polygon)

Essentially if you have a polygon function p(x,y) => { 1 if inside the polygon, otherwise 0 }, and a filter function f(x,y) centered at the origin, then you can evaluate the filter at any point x_0,y_0 with the double-integral / total sum of f(x-x_0,y-y_0)*p(x,y).

Re:Exact Polygonal Filtering: Using Green's Theorem and Clip... by blauditore on Thursday August 15, 2024 @04:25AM (#41254045)
This kind of makes sense from a mathematical point of view, but how would this look implementation-wise, in a scenario where you need to render a polygon scene? The article states that box filters are "the simplest form of filtering", but it sounds quite non-trivial for that use case.
Re:Exact Polygonal Filtering: Using Green's Theorem and Clip... by Klaus23 on Friday August 16, 2024 @12:02AM (#41263064)
If it essentially calculates the area of the polygon inside the pixel box and then assigns a colour to the pixel based on the area portion, how would any spatial aliasing artifacts appear? Shouldn't it be equivalent to super-sampling with infinite sample points?