Login  Register

Re: Extending Functionality of Shader Programs

Posted by ElvJOGL on Feb 10, 2016; 6:30pm
URL: https://forum.jogamp.org/Extending-Functionality-of-Shader-Programs-tp4036139p4036156.html

You probably did something wrong with adding the points to each other, and one should use Integer points, not floating points.

I should've have mentioned that you needed to use integer points.

now I am at school. And I don't have a scanner readily available that I could use, so when I get home tonight, I will post an image of an example of what I mean (or what my professor means).

Your example is be out of place, but if you were to count the dots that are on the boundary (on the lines that connect of the polygon) then you count the dots inside of the region that are not in the same coordinates of the dots that are in the boundary, and you apply this equation : A = B + I/2 - 1, gives you the exact Area.

I will show it with a bit more complicated geometry than a triangle so that you can see how the next polygon looks like derived out of the previous polygon. Because in your example, your triangle looks a bit out of place.

But yes, that's what my professor wants to do.

The idea is, that when you do the H Fold algorithm properly you end up with a blown up image of the previous one (and by blown up, I am scaled up image).

So in your example you didn't really follow the right idea because your connected lines don't form a triangle bigger than the previous one, it forms some odd Quad shape, in which case you would use Ehrhart's Polynomial to solve the area not pick's theorem.

Thanks.