2
votes
2answers
98 views

Connecting two arbitrary points with 2 lines

DEFINITIONS: Any "Point (x, y)" mentioned below is really the bottom left coordinates of a 1 unit by 1 unit rectangle. A "Line" is a defined as a rectangle that is either 1 unit tall and 1 unit or ...
0
votes
0answers
48 views

Java Angle Math: Calculate how near the player looks to an entity [duplicate]

I am programming a Minecraft Bukkit plugin and need a way to calculate an input number from 0 to 360 for displaying a custom compass / radar. So if the player directly looks at the object (shouldn't ...
2
votes
2answers
90 views

Decomposing a collision grid into a set of boxes

I'm looking for a decent algorithm to decompose a collision grid (e.g. bool[w,h])... ...into a non-overlapping set of boxes (e.g. List<Rectangle>). The solution does not have to be the ...
2
votes
1answer
408 views

Decomposing a concave mesh into a set of convex meshes

I'd like to be able to decompose a concave mesh into a set of convex meshes for 2 reasons: Transparent rendering Physics shapes Is there an algorithm that takes a set of triangles (concave) as ...
2
votes
0answers
153 views

How to trace contour of shapes with holes?

I am experimenting with the RVO2 library for collision avoidance in a 2D simulation. This library supports specifying arbitrary obstacles as a list of vertices. The obstacles must be full shapes, i.e. ...
1
vote
1answer
67 views

Build a Cube/Prism from other varied Cubes/Prisms [closed]

I'm wondering, are there any algorithms or theories in existence (that aren't patented/proprietary/protected) that would take a series of 3d rectangular prisms (or cubes but a cube is a prism) and ...
5
votes
1answer
132 views

trapped inside a Graph : Find paths along edges that do not cross any edges

This is a graph based platformer level and the round shapes are creatures. I am looking for a path traveling along edges that does not cross other edges(To simulate the creature crawling on the ...
14
votes
4answers
578 views

Algorithm for creating adjacent triangles

I have a system where you can click once to place a node in a scene. When you place 3 nodes, it forms a triangle. When you place any future nodes, it creates a new triangle by joining that node to the ...
4
votes
2answers
705 views

Repairing back-facing triangles without user input

My 3D application works with user-imported 3D models. Frequently, those models have a few vertices facing into the wrong direction. (For example, there is a 3D roof and a few triangles of that roof ...
0
votes
2answers
298 views

Partial recalculation of visibility on a 2D uniform grid

Problem Imagine that we have a 2D uniform grid of dimensions N x N. For this grid we have also pre-computed a visibility look-up table, e.g. with DDA, which answers the boolean query is cell X visible ...
10
votes
5answers
628 views

How would one determine the length of a path?

I have a game that requires each player to move along one specified path. I draw the path using B├ęzier curves. How can I determine the total real (not linear) length of the path and the distance that ...