[RIC] Incorrect Polygon output
Posted: 20 Oct 2011, 22:57
Today I started on implementing fill_shape for the RIC polygon opcode. However I found quite a bit of issues with the original implementation. This is what I expected as output for my ricfile "poly.ric":
The non-filled polygon have XOR enabled, this shows that it draws some pixels multiple times. The upper-left polygon is an extreme case of this.
The three polygons to the right are just incorrectly filled, since the edges doesn't match up. The biggest issues is the missing corners though.
I got it to work quite a bit better in RICcreator, but the edges are still not perfect: I'm a bit stuck here, the formula simply doesn't doesn't give the right results, but I don't know what I should replace it with...
I know how to fix the issue with XOR, but I'm not going to do it before I know it is going to be fixed in the firmware. The solution is simply to bothersome and because of the firmware size restrictions I'm not sure if it is even worth fixing.
I fixed another XOR issue though, not occurring in this test image. The attachment rules are quite annoying though, so I can't attach them to this post.
I created this image by drawing the outlines (i.e. without fill shape) and manually filling the polygons. However when I ran this file on the NXT this is what I got: (The red color is "wanted", the black overlay is "NXT".)The non-filled polygon have XOR enabled, this shows that it draws some pixels multiple times. The upper-left polygon is an extreme case of this.
The three polygons to the right are just incorrectly filled, since the edges doesn't match up. The biggest issues is the missing corners though.
I got it to work quite a bit better in RICcreator, but the edges are still not perfect: I'm a bit stuck here, the formula simply doesn't doesn't give the right results, but I don't know what I should replace it with...
I know how to fix the issue with XOR, but I'm not going to do it before I know it is going to be fixed in the firmware. The solution is simply to bothersome and because of the firmware size restrictions I'm not sure if it is even worth fixing.
I fixed another XOR issue though, not occurring in this test image. The attachment rules are quite annoying though, so I can't attach them to this post.