Tag Info

New answers tagged

0

If you don't care about the interior being painted in, there's a really simple solution. First, draw all circles in black. Next, draw all the circles again in white, with a smaller radius - basically subtract a border width from the radius. The result will be a constant thickness black border around a white area. You could maybe even use this black / white ...


0

if you added a square collision bounding box, and had both a circle and a square as a bounding box, you could find that situation before it occurred. The square would work like whiskers on a cat, and only if the circle could always fit through the opening, would it pass the collision test, and it would occur before any part of the circle sunk into the gap. ...


1

You probably could draw, and save 'intersection points' any point where two circles draw a point at same location. Then use that set, knowing that inside and outside changes when an intersection occurs. You would then only need to check any one point between two intersections to know the status of an entire arc between any two intersections. Fewer checks ...


2

Or how is this, draw each circle on some memory, then after all are drawn, set the inside of every circle to zeros, clearing any intersection lines. clarification On some memory is meant to indicate separate texture Set to 0 is meant to indicate set to transparent. setting inside transparent on second draw sequence is fill with transparent color with ...


-1

Or draw your circles as filled, then trace the edge that would work also. tracing edges method would only be computationally a better method with a very large number of circles. Where edge trace is faster then second set of drawing.


0

If any point is closer to the center of any circle then the radius of that circle clip it. Although you would probably want to find the intersection points where any two distances equal to the radius of a circle, from any two different circle centers are equal, to get clean edges where intersection occurs. basically any point inside another circle is ...


0

Fastest way is to : - A) test circle against rect's outer bounding circle -> reject if too far. - B) test circle against rect's inner bounding circle -> accept if near enough. - C) test that the outer point of the circle (on the line joining both centers) is in the AABB. To do that quickly , precompute inner, outer radius for your AABBs. Some ...


0

Im not sure if I am missing some cases but if you use combine the AABB AABB test and then check if the distance between any of the 4 AABB vertices to the circle's center is less than circle's radius, doesnt that cover all cases? NVM, you need to check axis that is from the circle's center to the closest vertex of the AABB is less than circle's radius. This ...


1

Assuming case 1 means the center of the circle is in a lateral region, and case 2 means the center of the circle in a corner region, this approach has a problem. Specifically, when the circle is just barely into a corner region, the square is treated as suddenly larger. If the circle was grazing the square, it will suddenly be intersecting. The behavior ...


0

The construction given is one parameterized by h - so you solve for h in terms of an additional constraint on the general solution given. As noted in the linked answer: where values of h > 0 correspond to arcs turning to the right/clockwise from A to B, and < 0 are arcs turning left/counterclockwise (assuming x+ points right and y+ points up - ...



Top 50 recent answers are included