Is it possible to obtain the smallest region of a certain type that contains a set of sub-regions? If so, how is it done? Thanks in advance, Rui Maciel
Is it possible to obtain the smallest region of a certain type that contains a set of sub-regions? If so, how is it done? Thanks in advance, Rui Maciel
Too abstract for me to say anything. Can you make the problem more concrete? -- http://www.**--****.com/
Sure. Let's consider all regions to be spheres and let's interpret "sub- regions" as "spheres which are contained in a larger sphere". To put the issue a bit more precisely, let's assume we are talking about a scene graph where multiple objects, each one contained in a bounding sphere, are organized in a bounding volume hiearchy. Is it possible to calculate the smallest sphere which contains all objects? On a side note, I mentioned "region" in the previous post as I wasn't bound to a specific geometry to use as a bounding volume. Nonetheless, spheres appear to be nice at that. Thanks in advance, Rui Maciel
I haven't considered the problem of bounding spheres with a minimum- volume sphere before. However, it must be at least as hard as minimum volume sphere for points. The latter has an algorithm with O(n) expected runtime, and can be found from: "Smallest enclosing disks (balls and ellipsoids)" http://www.**--****.com/ However, the question is whether it can be generalized to bound spheres. Anyway, you shouldn't expect something too trivial. Things can be easier if you settle for an approximation (such as choosing the midpoint of center points and then looking at the farthest point for radius). See also: http://www.**--****.com/ Axis-aligned boxes would be trivial to compute. -- http://www.**--****.com/
Unfortunately I can't access that article. It appears it's behind a paywall of sorts. I've hacked a brute force method to get the smallest bounding sphere. It is a bit crude and I believe it will work poorly when compared with other alternatives. The method goes as follows: Consider N sub-spheres and a bounding sphere. 1) setup a starting bounding sphere, which may be equal to the 1st sphere in the list. 2) set the sub-sphere to be compared to the next sub-sphere in the list 3) check if the current test sub-sphere is contained in the current bounding sphere 3.1) if it is then go to 4 3.2) if it isn't then move the bounding sphere's center and resize it's radius in order to contain all the sub-spheres tested up to now, including the current test sub-sphere. go to 4 4) if there are more sub-spheres in the list then move on to the next sub-sphere, restart at step 3). If not then it's finished. The following tests are applied: - Check if sub-sphere is completely inside the bounding sphere Let C_0 be the coordinates for the bounding sphere's center, Ct for the test sub-sphere's center Let r_0, rt be the radiuses of the boundary sphere and sub- sphere if ( norm(Ct-C_0) > r_0+rt) then the test sphere shares at least a point with the boundary sphere. Therefore it is inside the sphere. The new radius for the boundary sphere is: r_1 = (r_0 + rt + norm(Ct-C_0) )/2 The new center for the boundary sphere is: C_1 = (Ct-C0)*t + C_0 with t = ( norm(Ct-C_0) + rt - r_0)/(2*norm(Ct-C_0)) Do you happen to know any good sources on that topic? Thanks for the help, Rui Maciel
I don't think this gives the minimum-volume sphere, for otherwise it would give a simple O(n) worst-case time algorithm for any dimension. But if the result is satisfactory, then maybe you are done:) On each axis, pick the minimum of the minimum of the boxes, and the maximum of the maximum of boxes. -- http://www.**--****.com/
1.Boundary region problem: smallest region that contains a set of sub-regions?
Is it possible to obtain the smallest region of a certain type that contains a set of sub-regions? If so, how is it done? Thanks in advance, Rui Maciel
2.region inside region problem
I have a closed region, which points are in list. Is there any kind method to detect that inside this closed region there is another closed region. Testing it with floodfill kind of method is to slow.
3.Creating a GraphicsPath from a Region by hit-testing with Region.IsVisible()
Please excuse my spelling and my grammar, but I'm German. I have a Region where several figures are combined. I also have the GraphicsPaths which ware combined in the Region, but I don't know how to create a procedure which goes along the outline of the region and adds the points senseful to another GraphicsPath. If anybody has a solution for my problem, I would be very glad. Thank you for your answers Marius Ebel
4.transparent region within a non-transparent region
I have a Word document with a picture. The whole picture is covered with a 50% transparent object. So the picture looks like insensitive. I would like to create a region which is not covered with the 50% transparent object. So I can see the original picture. This region uses different shapes. How do I do something like this? Thanks, any help is appreciated.
5.Contour defined regions enclosed within other regions
(posted from sci.image.processing) Hi, I'm doing some testing of edge detection algorithms (in packages such as gimp, xv, paint shop pro etc.) and it seems to provide a useful basis for detection of regions (although I do wish that there was a way of obtaining the vertices of the resultant contours/regions to a file for further processing, e.g. for automated flood fill algorithms etc.!) Anyway, onto the main point of this post: Is there a way of determing whether any other edge defined regions lie within another region? TIA Paul
6. Add small, isolated regions to a selection
Users browsing this forum: No registered users and 27 guest