# Tagged Questions

A branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space.

17k views

### How do you programmatically generate a sphere?

Could someone please explain how it would be possible to create a sphere vertices, indices and texture coordinates? There is a surprising lack of documentation on how to do so and it is something that ...
2k views

### Am I going to regret using a color based collision detection system?

I'm just getting started build my first game with XNA (I'm experienced with C# but not games). I'm building a pretty simple top down 2d shooter. I read this tutorial on using a color based collision ...
2k views

### Geometry System of Populous: The Beginning [closed]

I want to to develop a game like Populous: The Beginning with my friend. But we could not find out what type of geometry they have used for the world. We know that - all tiles have the same size - ...
179 views

### What is the purpose of glEdgeFlagv?

I know that what both glEdgeFlagv and glEdgeFlag do is toggle boundary edge status, but my question is why does the v version exist when the documentation specifies that the only difference is that ...
1k views

### scanline filling a trapezoid

I have computed the four corners of the viewable bit of 2d map in my 3d view. So I know the trapezoid that is visible, and I want to 'visit' these tiles in my map. So my algorithm is basically a ...
916 views

### Using Actionscript 3's Graphics API in Flixel

My question sounds pretty simple but awfully, I couldn't find much information on the internet. How can I draw a circle in my FlxSprite? I couldn't find much information about drawing geometric ...
3k views

### what algorithms exist for combining multiple triangle meshes into one mesh

Let's say I have a terrain mesh of some triangles, and several smaller meshes which I want to add to that terrain mesh (think ground and some small mounds or berms for example). What would I look for ...
989 views

### How to generate a rotation matrix or a quaternion (properly rotated in regards to texture coordinates) for each triangle of a mesh?

I'm trying to build a uniform grid made of 3D points over the surface of an arbitrary mesh (we have texture-coordinates for each vertex...) Or to reformulate: imagine a mesh textured with a texture ...
1k views

### How do I determine the collision normal in an axis aligned bounding box collision?

I have a 3d moving box and a stationary box. I can detect collisions ok but now I would like to slide the moving box against the stationary box as a collision response. For this I need the normal of ...
349 views

### How do I rotate a segment + normal so that the normal is (0,-1) and the segment is now axis aligned

I have an arbitrary line segment, which may or may not be axis aligned along with its normal eg: Segment(Coord(-1,-1), Coord(1,1), Coord(-1, 1).normalize) which represents a line segment with a 45 ...
270 views

### How to generate slopes that meet the plane, is using collision detection a good idea?

I have a terrain, which is defined by mesh. And there are a lot of other polygonal faces scattered throughout the terrain, they can be located above, or below or cutting through the terrain. You can ...
710 views

### Perspective in early pseudo-3d games

Please take a look at the screenshot below, from the old classic Space Harrier. My question regards the curved perspective on the chequerboard 'ground'. It's got a strangely curved geometry (I ...
564 views

### rotating an object from sourceAngle to destAngle, both 0-359, clockwise or counter clockwise?

I've got a game object i need to rotate. It's current angle is player.rotation, the destination is targetAngle, both in degress, 0 to 359. I've got a function named rotateDirection(float sourceAngle, ...
216 views

### What are some ways to implement variable body shapes?

Games like Ryzom and the Sims allow players to have human bodies with different shapes: wide or thin, tall or short, big noses or small, etc. It seems to me that it'd be impractical to pre-generate ...
499 views

### Rotating coordinate system

Lets say that you want to rotate simple cube around fixed point in center. Is it possible to use such coordinate system, that you need to use only sine and cosine in order to rotate? I have done ...
1k views

### Generating geometry when using VBO

Currently I am working on a project in which I generate geometry based on the players movement. A glorified very long trail, composed of quads. I am doing this by storing a STD::Vector, and removing ...
310 views

### exact point on a rotating sphere

I have a sphere that represents the Earth textured with real pictures. It's rotating around the x axis, and when user click down it has to show me the exact place he clicked on. For example if he ...
2k views

### How do I restrict the movement of a point to within a radius of another?

I have a situation where a sprite's center point needs to be constrained within a certain boundary in 2D space. The boundary is circular, so the sprite is constrained within a radius. This radius is ...
16k views

### How can I convert a mouse click to a ray?

I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
3k views

### Voronoi regions of a (convex) polygon

I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection. The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on SAT,...
5k views

### How do I test if a circle and concave polygon intersect?

I have a polygon (sometimes convex, but often concave), and a bunch of circles with different radii. How can I find out if a circle is intersecting/overlapping with the polygon? I could split my ...
294 views

### How can I draw a model perpendicular to a sloped surface? [duplicate]

Possible Duplicate: How do I find rotation in 3D based on a vector/normal? My models are axis-aligned. I know the normal of the surface I want to draw them on. How do I compute the rotations ...
306 views

### Frenet frame and application

I have just been reviewing Frenet Frame math. It is an interesting geometrical issue. I know that common applications are: camera movement along a curve tube and ribbons surface Can someone ...
2k views

### Point line collision reaction

I am trying to program point line segment collision detection and reaction. I am doing this for fun and to learn. The point moves (it has a velocity, and can be controlled by the user), whilst the ...
3k views

### Morph a sphere to a cube and a cube to a sphere with GLSL

I'm getting started with GLSL with quartz composer. I have a patch with a particle system in which each particle is mapped into a sphere with a blend value. With blend=0 particles are in random ...
5k views

### How do I find rotation in 3D based on a vector/normal?

I've been playing with Blender and Python, doing basic things like accessing vertices/normals,etc. I can get the normal of each face of a mesh. I was wondering, how can I get the rotation of a face ...
2k views

### Implementing 2D CSG (for collision shapes)?

Are there any simple (or well documented) algorithms for basic CSG operations on 2D polygons? I'm looking for a way to 'add' a number of overlapping 2D collision shapes. These may be convex or ...