1
vote
2answers
57 views

Adding a minimum rectangle overlap threshold

I have a function that works perfectly for detecting whether or not r1 overlaps with r2: boolean overlaps( Rectangle r1, Rectangle r2 ) { return r1.x < r2.x + r2.width && r1.x + ...
3
votes
2answers
166 views

Find points whose pairwise distances approximate a given distance matrix

Problem. I have a symmetric distance matrix with entries between zero and one, like this one: D = ( 0.0 0.4 0.0 0.5 ) ( 0.4 0.0 0.2 1.0 ) ( 0.0 0.2 0.0 0.7 ) ( 0.5 1.0 0.7 0.0 ) I would ...
-5
votes
1answer
113 views

Algorithm for drawing a circle within another shape?

Is there an algorithm or a class of algorithms for drawing a circle within another shape? I have a shape, represented in some data structure. How to find a maximal circle, which can be inscribed into ...
6
votes
3answers
181 views

Maximizing number of nested triangles

There is a finite set of points on a plane (about 1500 points in the current task). I need to construct triangles on those points such as each triangle lies completely inside one larger triangle: ...
1
vote
2answers
245 views

2 closest points between 2 rectangles

On a 2D plane, I have 2 rectangles. I want to find the closest pair of points (one on each rectangle), which are closest to each other. By points I mean the corners of the rectangles. And no, they do ...
2
votes
0answers
174 views

Generate complex (non-convex) polyhedron UV mapping

I need to find an approach to the problem of generating texture maps for non-convex polyhedrons without using a design tool like Maya. Specifically, I am mapping simulation results data onto a 3D ...
24
votes
9answers
4k views

How to check if 4 points form a square?

Assume I have 4 points (they are 2-dimension), which are different from each other, and I want to know whether they form a square. How to do it? (let the process be as simple as possible.)
2
votes
2answers
249 views

How to detect two moving shapes overlapped?

Given a list of circles with its coordinates (x and y) that are moving every second in different direction (South-East, South-West, North-East and North-West), and the circle will change direction if ...
3
votes
3answers
902 views

Algorithm to calculate trajectories from vector field

I have a two-dimensional vector field, i.e., for each point (x, y) I have a vector (u, v), whereas u and v are functions of x and y. This vector field canonically defines a set of trajectories, i.e. ...
9
votes
1answer
179 views

How do graphics programmers deal with rendering vertices that don't change the image?

So, the title is a little awkward. I'll give some background, and then ask my question. Background: I work as a web GIS application developer, but in my spare time I've been playing with map ...