The point or points at which two or more shapes cross or overlap one another.

learn more… | top users | synonyms

0
votes
1answer
64 views

How to calculate ray polygon intersection?

I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
-2
votes
0answers
43 views

How to check the Intersection the line and triangle in 3D [on hold]

For example there is a code: struct Point { public int X; public int Y; public int Z; } struct Triangle { public Point p1; public Point p2; public Point p3; } struct Line { ...
1
vote
1answer
44 views

Collision/Intersection of (2D) Ray to Line Segment

Given a ray (r0, r1) and a line segment (a, b), I need to calculate the normal of the line segment based on the direction of the ray. For example, in the following picture: The correct normal given ...
0
votes
0answers
29 views

Locate point of collision for two moving lines

I am trying to implement a continuous collision detection system that checks collision between two polygons for a certain time step, concave or convex. It makes the simplification that the path ...
7
votes
2answers
222 views

How do I find the closest points(thereby forming a polygon) enclosing a particular point?(see image)

I am working with a game engine, and my task is to add code for simulating fracture of rigid meshes. Right now I'm only working on breaking a cube. I am using Voronoi's algorithm to make a ...
1
vote
1answer
72 views

Warp GameObject Size When Entering/Leaving Area

Below I have an image describing the desired functionality I am going for. Let's say you control a square and when you move this square into a given area, any part of your rigidbody/model inside of ...
3
votes
1answer
285 views

Explain this line segment intersection code

I've been reading this article on pathfinding over polygon meshes using line-of-sight, and in the article are several code snippets. One of them, the one I'm trying to understand, is a simple function ...
2
votes
2answers
99 views

Checking if a vector is contained inside a viewing frustum

I have a three dimensional pyramid given by four vectors a, b, c, d and want to test if a given vector x is inside that region or not. Here is an image: A related question can be found here: 2D ...
0
votes
0answers
76 views

Most efficient AABB - Ray intersection algorithm for input/output distance calculation

Thanks to the following thread : most efficient AABB vs Ray collision algorithms I have seen very fast algorithm for ray/AABB intersection point computation. Unfortunately, most of the recent ...
0
votes
0answers
83 views

Precalculating timespan of bullet collision on cubic bezier curve circles?

I'm fairly new to game logics, C#/XNA (The language/library of choice) and bezier curves in general, and is stuck in my current project. I'm going to try to explain as thoroughly as I can what the ...
0
votes
1answer
168 views

Is this the correct way to detect ray-sphere intersection?

I have this java function that should return a true or false for any sphere passed to it if they intersect. However it seems to end being true a lot of the time when it shouldn't and false sometimes ...
0
votes
2answers
183 views

Thick Ray interaction with AABB

I would like to intersect a thick ray (actually a cylinder) with an AABB. The current code to perform intersection with the ray is the following. template <class RealT> bool ...
2
votes
1answer
117 views

How do I compute the point of a triangle-ray intersection?

I have a line (the direction vector of the player) and a triangle representing the face of a model (so composed of 3 points). I can't find the mathematical operation to check if that vector is ...
2
votes
2answers
160 views

How can I compute the common points when spheres intersect?

When two spheres intersect they should share one or two points. I want to know how to compute those points? I was thinking of something like this: -check if the spheres intersect -calculate ...
0
votes
1answer
108 views

Tennis game algorithm and maths

Tennis courts are real dimensions and game is 3D Ball has position (x,y,z), speed(vx,vy,vz) and acceleration (ax,ay,az) Game has 30 fps and on each update (1/30sec) it has these properties vx +=ax; ...
2
votes
1answer
455 views

Finding Z given X & Y coordinates on terrain?

I need to know the most efficient way of finding Z given X & Y coordinates on terrain. My terrain is set up as a grid, each grid block consisting of two triangles which may be flipped in any ...
0
votes
1answer
241 views

Performing intersection testing in world's or object's space?

Am adding basic ray casting and collision detection for my game, also adding bounding volumes/collision mesh. Given that the ray is cast in world space and each mesh's node can track world ...
2
votes
2answers
113 views

Intersection of a point and rectangle

I have a mouse cordinates in 2D game (x and y) and a rectangle (x,y, width,height). How to find if the point is in the rectangle? I do not have any code to post here. I'm just searching for help.
1
vote
2answers
132 views

XNA Calculate two points of triangle with given Z

I want to calculate the two points of a 3D triangle that have a specified Z coordinate. I guess the way to do this would be to somehow create a plane which is perfectly flat with my given Z coordinate ...
0
votes
0answers
59 views

XNA inverted matrix acting strange

First of all, I am trying to calculate the two points of a triangle that have a given z position. I have figured out what I think to be quite a good method. First of all I move the triangle to be ...
1
vote
1answer
116 views

What does Rectangle.Intersect means/do?

Ok I have two rectangles one is the ball and other is the paddle. 1. if(ball.rectangle.intersects(paddle.rectangle)) y = -Math.Abs(y); and 2. ...
3
votes
1answer
137 views

Moller Tri Tri intersection

I'm done implementing Moller's tri-tri intersection routine. It gives you the location of where each triangle edge intersects the line of intersection between the 2 triangle planes: Really you get ...
1
vote
1answer
223 views

Wrong intersection: Bounding Sphere and Ray

I've got a huge problem with BoundingSpheres and Rays in XNA and I really don't know how to solve it. The problem: foreach (BoundingSphere s1 in GetCollisionHullBoundingSpheres()) if ...
1
vote
0answers
103 views

XNA C# Rectangle Intersect Ball on a Square [closed]

I made a Game like Peggle Deluxe using C# and XNA for lerning. I have 2 rectangles a ball and a square field. The ball gets shoot out with a cannon and if the Ball hits the Square the Square ...
0
votes
1answer
392 views

How can I remove the view and projection matrix from ray position to get only the ray model?

I've got a little problem with my picking module and I need your help. I have a method to project a ray from the camera to a fixed point when I click somewhere. The computed ray looks good, it go to ...
4
votes
3answers
596 views

Fast method of detecting whether point is inside mesh

I'm trying to construct a 3d object from a large number of particles. I think this is called BVH (Bounding volume hierarchy). I figured the best way is to draw the particles inside the mesh, then let ...
-2
votes
1answer
133 views

How to use D3DXIntersectTri function to find intersected point?

How to calculate direction for D3DXIntersectTri function to find intersected point? And after getting the result in Distance how to get that coordinate(XYZ)?
1
vote
0answers
188 views

Sketchy results from ray-plane intersection code

I've set up a demo with simple first-person controls using C++ and OpenGL, and it seems to work reasonably well. My goal is this: when the player looks at a plane and clicks the left mouse button, ...
2
votes
2answers
130 views

Calculate intersection of a line with a plane

I was reading something about: “Intersection of a line with a plane”. But I don’t fully understand how to calculate it on their way. The goal is to calculate where the plane and the line will ...
3
votes
1answer
136 views

What to do after detecting OBB-OBB intersection

I'm using this code to detect intersections between two OBBs. The problem is that i don't know what to do after detecting it. I tried using a simple algorithm: if (collision detected) { ...
1
vote
2answers
2k views

Line Intersection from parametric equation

I'm sure this question has been asked before. However, I'm trying to connect the dots by translating an equation on paper into an actual function. I thought It would be interesting to ask here instead ...
3
votes
2answers
251 views

how to calculate intersection time and place of multiple moving arcs

I have rocks orbiting moons, moons orbiting planets, planets orbiting suns, and suns orbiting black holes, and the current system could have many many layers of orbitage. the position of any object ...
0
votes
2answers
494 views

ray polygon intersection

Hi, I am looking for an elegant way to do ray and polygon intersections in 2d. I don't care about languages. Now what I'm doing is taking a line that lies on the ray (with a screen length) and ...
1
vote
2answers
812 views

Segment-Cylinder intersection

What is the complete code (C#, pseudo, does not matter) for calculating the resulting segment (or its absence) for the intersection of the segment and the cylinder? The segment is defined by ...
2
votes
2answers
263 views

What is a technique for 2D ray-box intersection that is suitable for old console hardware?

I'm working on a Sega Genesis homebrew game (it has a 7mhz 68000 CPU). I'm looking for a way to find the intersection between a particle sprite and a background tile. Particles are represented as a ...
3
votes
4answers
179 views

Ray Triangle Intersection issue

I'm trying to perform ray triangle intersection on a mesh made of triangles. The below code seems to work fine but only about 50% of the time. The ray often gets into positions where no intersection ...
4
votes
1answer
3k views

How to Calculate the Contact Point between Ray and Plane

Is there any quick way to find the intersection point between Plane and Ray?
4
votes
1answer
917 views

Closest point on an ellipsoid

I need to know how to get the closest point on the surface of an ellipsoid to another point. I had an idea, but apparently i was wrong, and oversimplfying. What i did was squash the ellipsoid and ...
4
votes
1answer
740 views

Ellipsoid v. Box collision detection

I'm trying to write some collision detection code. ATM i have the code properly resolving Ellipsoid v. Ellipsoid collisions, and Box v. Box collisions, but Ellipsoid v. Box collisions doesnt work. ...
2
votes
2answers
1k views

Find meeting point of 2 objects in 2D, knowing (constant) speed and slope

I have a gun which fires a projectile that has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot, so that the projectile hits the enemy ...
3
votes
3answers
4k views

Triangle - Rectangle Intersection in 2D

I had previously asked this for 3D but now I changed my strategy and would like to do the intersection in 2D. The Rectangle is axis aligned and will always be in a fixed position, and has a constant ...
3
votes
1answer
2k views

Triangle-Plane intersection in 3D space

I would like to clip a triangle if its bounds lie partially out of a cube for this I guess I would need some kind of Triangle Plane intersection code, I'm not well versed with math but I do have the ...
7
votes
5answers
2k views

How to determine which cells in a grid intersect with a given triangle?

I'm currently writing a 2D AI simulation, but I'm not completely certain how to check whether the position of an agent is within the field of view of another. Currently, my world partitioning is ...