On 24/1/13 10:27 PM, Moritz Moeller wrote: > I suggest to create a 2d bezier mesh from the two curves and recursively > tessellate this into quads. Each corner of a quad inherits the mask > density value from the curve, tessellated. > Once quads approach the size of a pixel, rasterize them with subpixel > precision into a buffer -- this is your mask.
I forgot, Paul Bourke has code for this on his website. "All" you need to do to this is: - Make the code (3D) 2D, i.e. remove the 3rd coordinate everywhere, it is not needed. - Build the mesh from the two curves. - Make the code subdivide until the size criteria (all quads <= 1 pixel edge length) is met. Also Toxiclibs has 3D Bezier patch tessellation code (Java), also 3D, i.e. needs to be modified for the 2D case, too: http://toxiclibs.org/docs/core/toxi/geom/mesh/BezierPatch.html .mm ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ darktable-devel mailing list darktable-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/darktable-devel