A branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space.
2
votes
1answer
274 views
How to calculate collision normal between two AxisAlignedBox's?
I'm writing a physics simulation in Ogre3D and I'm trying to figure out how to calculate the collision normal between two Ogre::AxisAlignedBox's.
I am checking for collisions using the "intersects" ...
1
vote
0answers
29 views
Blender: calculation of elevation and rotation angle from plane
I have a generic plane (any location, any rotation around every axis) with its normal axis passing by the center. Then I have a generic point and I need to find the elevation and the rotation angle ...
0
votes
1answer
57 views
Issues with Sine Wave Generation and Rotation
I'm working on generating objects in sine wave that lets you specify parameters that are start x, end x, start y, and end y position.
Below is the method that I used to generate the debris
void ...
3
votes
2answers
110 views
What kind of projection is ScreenX=X/Z, ScreenY=Y/Z?
I have an existing class which transforms 3D vectors and projects them on a 2D plane (Camera). The code is all written in C without help from an external library.
To project a single vector (X,Y,Z) ...
1
vote
1answer
66 views
A controlled trapezoid transformation with perspective projecton
I'm trying to implement a controlled trapezoid transformation in Adobe Flash's ActionScript using the built-in perspective projection facility. To give you an idea of how the effect looks like:
...
6
votes
4answers
980 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 ...
1
vote
2answers
661 views
Wrong faces culled in OpenGL when drawing a rectangular prism
I'm trying to learn opengl. I did some code for building a rectangular prism. I don't want to draw back faces so I used glCullFace(GL_BACK), glEnable(GL_CULL_FACE);. But I keep getting back faces also ...
0
votes
0answers
47 views
Top down 2D camera in relation to keyboard commands
I have a basic 2D camera:
transform =
Matrix.CreateTranslation(-position.X, -position.Y, 0) *
Matrix.CreateRotationZ(-rotation) *
Matrix.CreateScale(new Vector3(zoom, zoom, 1)) *
...
1
vote
2answers
98 views
DirectX How to Gernerate Vertices for Diamond Shape and Render it?
How to generate vertices for 3D Diamond Shape in DirectX?
EDIT:
I am creating an application which receive DIAMETER, CROWN, GIRDLE and PAVILION as parameter and render a model of diamond according to ...
5
votes
2answers
846 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 ...
1
vote
3answers
144 views
Geometry problem for area of sight
My player have a line of sight and all objects between the white lines, turns red.
To compute this, the following conditions are met: if the angle between the yellow line and the red line are small ...
2
votes
0answers
89 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 ...
19
votes
3answers
1k views
Is there a 3D equivalent of hex tile maps?
Probably the biggest advantage of a hex-based versus square-based map tiling is that the center of each hex has the same distance to all its neighboring hexes. Is there a similar shape that tiles this ...
3
votes
2answers
186 views
Displaying (3D) objects' name above them
The Elder Scrolls: Morrowind has a rather interesting way to display each focused objects' name. It's all a bit fuzzy in my memory right now, but the most important part I remember perfectly: the ...
1
vote
0answers
61 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. ...
5
votes
6answers
241 views
How do I calculate distance from a point to a rectangle?
I have a 2D rectangle with x, y position, height and width, and a randomly positioned point nearby.
Is there a way to check if this point might collide with the rectangle if it is closer than a ...
1
vote
1answer
81 views
Moving an object toward another object on sphere knowing their quaternions
I have a sphere centered in world origin. On the sphere surface I have two objects and I know their quaternions (rotation around sphere).
Currently my movement works on Vector2 inputs (cannot change ...
0
votes
1answer
125 views
Rotation of Rectangle along Y-axis transformed to parallelogram
After the rotation of a rectangular view along the Y-axis, about its center, transformed into parallelogram, how do I get the rotated parallelogram coordinates?
By Y-axis, I mean perpendicular to the ...
23
votes
1answer
748 views
How do you turn a cube into a sphere?
I'm trying to make a quad sphere based on an article, which shows results like this:
I can generate a cube correctly:
But when I convert all the points according to this formula (from the page ...
-5
votes
3answers
204 views
in the shadow of a sphere [duplicate]
(Related, but somewhat different, to my previous question)
How can I determine in a fragment shader if a fragment is in the shadow of a sphere?
That is, if it is occluded by the sphere and is past ...
1
vote
1answer
54 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 ...
3
votes
1answer
154 views
How do I render a filled and stroked path using OpenGL?
I want to render a 2-dimensional geometric path consisting of Bézier curves and straight lines. Paths can be concave.
What is the most efficient way to draw this using modern OpenGL? Can I do this ...
1
vote
2answers
2k 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 ...
0
votes
2answers
209 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 ...
2
votes
2answers
436 views
How can I transform a point from world space to object space?
If I have an object space described by transformation matrix that should be applied to object to transform it to world space, what I have to do to transform point (world space) to that object space.
...
0
votes
1answer
33 views
How to linearly blend between multiple points, deviating from a default point?
I have a set of 3D points that I need to "blend" between. Lets say I have points [A,B,C] and I have the amount I want to blend each as [0.5, 0.2, 0.8], how can I blend between these points with the ...
1
vote
1answer
74 views
How to linearly “blend” between multiple 3D points?
I have a set of 3D points that I need to "blend" between. Lets say I have points [A,B,C] and I have the amount I want to blend each as [0.5, 0.2, 0.8], how can I blend between these points with the ...
5
votes
4answers
245 views
Would like some help in understanding rendering geometry vs textures
So I was just pondering whether it is more taxing on the GPU to render geometry or a texture. What I'm trying to see is whether there is a huge difference in rendering two scenes with the same setup:
...
6
votes
3answers
375 views
Transforming a primitive tetrahedron into a primitive icosahedron?
I've created a tetrahedron by creating a BoundingBox and building the faces of the tetrahedron within the bounding box as follows (see image as well):
VertexPositionNormalTexture[] vertices = new ...
5
votes
2answers
607 views
Geometry System of Populous: The Beginning
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
- ...
2
votes
2answers
91 views
Splitting Graph into distinct polygons in O(E) complexity
If you have seen my last question:
trapped inside a Graph : Find paths along edges that do not cross any edges
How do you split an entire graph into distinct shapes 'trapped' inside the graph(like ...
3
votes
1answer
1k 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 ...
1
vote
2answers
799 views
Rotate an object given only by its points?
I was recently writing a simple 3D maze FPP game. Once I was done fiddling with planes in OpenGL, I wanted to add support for importing Blender objects. The approach I used was triangulization of the ...
5
votes
1answer
97 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 ...
5
votes
3answers
1k views
2D isometric: screen to tile coordinates
I'm writing an isometric 2D game and I'm having difficulty figuring precisely on which tile the cursor is. Here's a drawing:
where xs and ys are screen coordinates (pixels), xt and yt are tile ...
2
votes
1answer
93 views
Finding the normals of an oriented bounding box?
Here is my problem.
I'm working on the physics for my 2D game.
All objects are oriented bounding boxes (OBB) based on the separate axis theorem.
In order to do collision resolution, I need to be ...
18
votes
5answers
475 views
Moving CW or CCW?
Lets say we have a jagged shape:
And two creatures moving along it's outline.
Then we smooth the shape completely by pulling the corners out.
We get this:
It is easy to see now that Orange is ...
0
votes
1answer
394 views
“LNK2001: unresolved external symbol” when trying to build my program
I get the following error(s) on my program that captures the mouse and then draws a line.
Errors:
1>------ Build started: Project: Capture_Mouse_Line, Configuration: Debug Win32 ------
1> ...
4
votes
3answers
240 views
How to get distance from point to line with distinction between side of line?
I'm making a 2d racing game. I'm taking the nice standard approach of having a set of points defining the center of the track and detecting whether the car is off the track by detecting its distance ...
8
votes
2answers
557 views
Arbitrary Rotation about a Sphere
I'm coding a mechanic which allows a user to move around the surface of a sphere. The position on the sphere is currently stored as theta and phi, where theta is the angle between the z-axis and the ...
9
votes
2answers
319 views
How to limit click'n'drag movement to an area?
I apologize for the somewhat generic title. I'm really don't have much clue about how to accomplish what I'm trying to do, which is making it harder even to research a possible solution.
I'm trying ...
1
vote
2answers
146 views
The distance to a line from a point, find the constant values?
I have 3 points, (x1, y1), (x2, y2), (x3, y3)
I should find the AH height. For this i must use:
How can i find each "a", "b" and "c" values?
1
vote
2answers
107 views
ricocheting off a wall
I have a capsule (sphere sweep) that I've computed the collision on a mesh with.
I know the point of impact and normal of the face it collides with.
My moving object - I'm using a capsule to ...
7
votes
1answer
2k views
Circle-Line Collision Detection Problem
I am currently developing a breakout clone and I have hit a roadblock in getting collision detection between a ball (circle) and a brick (convex polygon) working correctly. I am using a Circle-Line ...
9
votes
3answers
319 views
Are the first 3 parameters that describe a 3D plane actually a 3d vector?
A 3d plane is typically defined as a,b,c,d. Are a,b,c actually the x,y,z coordinates of a 3d vector, with d defining the rotation of the plane, something like axis-angle rotation data?
0
votes
2answers
228 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 ...
1
vote
1answer
88 views
Intersection of player and mesh
I have a 3D scene, and a player that can move about in it.
In a time-step the player can move from point A to point B. The player should follow the terrain height but slow going up cliffs and then ...
0
votes
1answer
143 views
moving in the wrong direction
Solution:
To move a unit forward:
forward = Quaternion(0,0,0,1)
rotation.normalize() # ocassionally
...
pos += ((rotation * forward) * rotation.conjugated()).xyz().normalized() * speed
I think the ...
0
votes
1answer
48 views
applying rotation and speed to move user
My player has a position (vec3), rotation (quaternion) and speed.
I have a fixed time step. At each tick, I work out from key-state etc what rotation and speed adjustments to make.
How do I now ...
3
votes
3answers
674 views
Textureing subdivided Icosahedron in XNA, seam problem
*Look below for the updated source code*
I have started to to make some different types of objects and create them by code in XNA. Right now I have finished the code for creating a Icosahedron. And ...
