How can I compute obb and sphere collision in directx9? - collision

How can I compute oriented bounding box and sphere collision?
I need to find out the intersect point? But I do not know how, Please help me!

Related

How do I find the corners of a plane in 3d space if I know three points

Apologies in advance for my feeble maths.
I'm trying to be able to find the corners of a plane in space based on the equation of that plane. Here's what I know. I know three points on the plane and I know where they fall in the 2d coordinate space of the plane (x,y) and where they are in 3d space. I know the width and height of the plane and I can now calculate the equation of the plane. The plane sits on the inside of a large sphere that surrounds the origin so, in theory, it should more or less face where the camera is (though in my diagram it doesn't face the origin as it's just for illustrative purposes)
But it's not clear to me how I can use that to figure out another point. One thought I had was to find the transform that moves the plane parallel to the xy axis and rotate it round one of the points (so it stays in the same place), find the position of the new point, and then rotate it by the inverse of that transform. But it's not clear to me how I would find that transform matrix or how to use it. Could I do this using the normal and vector maths? I understand what normals are, but I'm fuzzy about how to use them.

UV world coordinate on a face?

I've been trying to find an answer to this, but can't seem to find one.
I want to input a UV coordinate and given a face, check where in 3d worldspace that coordinate exists.
So basically, I'd be able to check where certain pixels are on a face in 3d.
Any help is appreciated.

Circle inscribed in a rectangle

I am given a lot of points and the points are suppose to be from a rectangle. I'm required to calculate the boundary of the rectangle.(which is relatively easy) But I also have to figure out radius of a candle(cylinder) that could be anywhere in the rectangle. All of this from just the given points. I would appreciate if someone could suggest ways to achieve this.
The points in my case are measurements of a robot wandering through this rectangle, and the empty circle is a pole of a certain unknown radius inside the rectangle that the robot can hit. So I need to figure out the radius of the pole in order to avoid that. I need to estimate the pole. It doesn't have to be exact. I'm expecting robot measurements to be enough that they'd give me pretty good idea where pole is.
If you can afford it, just rasterize the area, mark the affected pixels, then start "growing" areas around them until they meet (this will give you raster versions of their Voronoi regions). The pixel (inside the rectangle) with the largest distance to any point will likely be the empty circle's center.
Alternatively, you can do a Delauney triangulation, find the largest triangle inside the rectangle, and add its neighbours while they form a convex shape. That shape will be an approximation of the circle.

Water-tight surface reconstruction algorithm for organized point cloud

I have a 3D Cartesian cube. For each point in this cube there is a corresponding density value. When the density changes suddenly it means that there is a cavity. Now to find the cavity I calculate the gradient at each point in the cube. This gives me a point cloud on the surface of the cavity. I would now like to mesh the surface of the cavity given the point cloud.
Unfortunately I don't have any experience with surface reconstruction and was wondering if someone can recommend a suitable algorithm which will produce a closed surface of the cavity?
The cube is quite big so a point cloud of the surface of a cavity can easily be 500.000 points or more. I have read this post: robust algorithm for surface reconstruction from 3D point cloud? which I find useful. However it seems that the problem I am facing is simpler, given that:
The coordinates of the points are always integer
The point distribution is even
The distance from one point to its closest neighbour is either 1, sqrt(2) or sqrt(3)
You probably want the marching cubes algorithm.
The Marching Cubes algorithm will do exactly what you want. For a working implementation (using Three.js for rendering the graphics), check out:
http://stemkoski.github.com/Three.js/Marching-Cubes.html
For more details on the theory, I think the best article is the website:
http://paulbourke.net/geometry/polygonise/

Convert latitude longitude to x,y point on a rectangle

It seems that there are lots of information both in Google and here, that speak a lot about many different conversions of latitude,longitude.
So what i'm asking is for you to be simple as possible, and try not sending me to other places to seek an answer.
I am trying to put the entire world in to 2D square, where each point represent the distance(in meters) from a point which I choose to define it (0,0),
Can you give me a mathematical algorithm to do so.
You could either use a azimuthal equidistant or two-point equidistant projection.
Of these the azimuthal equidistant is easiest. To do this, just start at your reference point on the world, and put this in the center of your map. Then proceed outward in concentric circles on the map, and for each new circle plot all the points on the world at the appropriate distance and angle.
After doing this, your map should look like a circle, and all of the points will be the correct distance from your center point.

Resources