tesselation

Efficient Packing Algorithm for Irregular Polygons

我们两清 提交于 2021-02-06 03:51:32
问题 I'm looking for a packing algorithm which will reduce an irregular polygon into rectangles and right triangles. The algorithm should attempt to use as few such shapes as possible and should be relatively easy to implement (given the difficulty of the challenge). It should also prefer rectangles over triangles where possible. If possible, the answer to this question should explain the general heuristics used in the suggested algorithm. This should run in deterministic time for irregular

Efficient Packing Algorithm for Irregular Polygons

ぃ、小莉子 提交于 2021-02-06 03:50:29
问题 I'm looking for a packing algorithm which will reduce an irregular polygon into rectangles and right triangles. The algorithm should attempt to use as few such shapes as possible and should be relatively easy to implement (given the difficulty of the challenge). It should also prefer rectangles over triangles where possible. If possible, the answer to this question should explain the general heuristics used in the suggested algorithm. This should run in deterministic time for irregular

Tiling rectangles seamlessly in WPF

半腔热情 提交于 2020-01-12 19:32:53
问题 I want to seamlessly tile a bunch of different-colored Rectangles in WPF. That is, I want to put a bunch of rectangles edge-to-edge, and not have gaps between them. If everything is aligned to pixels, this works fine. But I also want to support arbitrary zoom, and ideally, I don't want to use SnapsToDevicePixels (because it would compromise quality when the image is zoomed way out). But that means my Rectangles sometimes render with gaps. For example: <Page xmlns="http://schemas.microsoft.com

Tiling rectangles seamlessly in WPF

橙三吉。 提交于 2020-01-12 19:31:49
问题 I want to seamlessly tile a bunch of different-colored Rectangles in WPF. That is, I want to put a bunch of rectangles edge-to-edge, and not have gaps between them. If everything is aligned to pixels, this works fine. But I also want to support arbitrary zoom, and ideally, I don't want to use SnapsToDevicePixels (because it would compromise quality when the image is zoomed way out). But that means my Rectangles sometimes render with gaps. For example: <Page xmlns="http://schemas.microsoft.com

I have an OpenGL Tessellated Sphere and I want to cut a cylindrical hole in it

霸气de小男生 提交于 2019-12-28 01:38:11
问题 I am working on a piece of software which generated a polygon mesh to represent a sphere, and I want to cut a hole through the sphere. This polygon mesh is only an overlay across the surface of the sphere. I have a good idea of how to determine which polygons will intersect my hole, and I can remove them from my collection, but after that point I am getting a little confused. I was wondering if anyone could help me with the high-level concepts? Basically, I envision three situations: 1.) The

API's similar to GLUTesselator? [closed]

99封情书 提交于 2019-12-24 04:53:48
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm looking for an API that is open sourced and that can take contours of verticies as input and return verticies of triangles. I would also like it to support different winding rules. Thanks 回答1: OpenSceneGraph has a GLU style tesselator, see http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs

C++ 2D tessellation library?

a 夏天 提交于 2019-12-20 20:02:13
问题 I've got some convex polygons stored as an STL vector of points (more or less). I want to tessellate them really quickly, preferably into fairly evenly sized pieces, and with no "slivers". I'm going to use it to explode some objects into little pieces. Does anyone know of a nice library to tessellate polygons (partition them into a mesh of smaller convex polygons or triangles)? I've looked at a few I've found online already, but I can't even get them to compile. These academic type don't give

How to properly tesselate a image of cells using matlab?

爷,独闯天下 提交于 2019-12-10 11:11:09
问题 I have the following picture which is a photo of pancreatic cells What I would like to do is being able to get the membrane of each cell (red filament) and then do a tessellation in order to get an idea of the length of a filament. So far I have tried to use the example given on the matlab website but the result is not really good... I = imread('picture.tiff'); I_gray = rgb2gray(I); [~, threshold] = edge(I_gray, 'sobel'); fudgeFactor = .5; BWs = edge(I_gray,'sobel', threshold * fudgeFactor);

How to convert a polygon to a set on non-overlapping triangles?

a 夏天 提交于 2019-12-10 10:53:40
问题 I have a coordinate set of 2D points that form a closed polygon. I need to generate a set of 2D triangles that distribute the polygon completely. There are no constrains as such except that the triangles should fill the area of polygon completely. It would be even more helpful if it is a standard algorithm I could implement. 回答1: As mentioned above, Delaunay triangulation is a rather complicated algorithm for this task. If you accept O(n^2) running time, you may try Ear Clipping algorithm

How to properly tesselate a image of cells using matlab?

喜夏-厌秋 提交于 2019-12-06 09:43:24
I have the following picture which is a photo of pancreatic cells What I would like to do is being able to get the membrane of each cell (red filament) and then do a tessellation in order to get an idea of the length of a filament. So far I have tried to use the example given on the matlab website but the result is not really good... I = imread('picture.tiff'); I_gray = rgb2gray(I); [~, threshold] = edge(I_gray, 'sobel'); fudgeFactor = .5; BWs = edge(I_gray,'sobel', threshold * fudgeFactor); se90 = strel('line', 3, 90); se0 = strel('line', 3, 0); BWsdil = imdilate(BWs, [se90 se0]); I have been