A branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space.
4
votes
1answer
127 views
Allowing a player to walk up and down slopes without resistance
I am trying to implement a platformer where both the player and the level are made up of arbitary polygons. One requirement is that the player can stand still on slopes, and walk up and down them ...
1
vote
0answers
41 views
Geometry shader and triangle adjacency
I'm currently trying to change my project to use GL_TRIANGLE_ADJACENCY instead of GL_TRIANGLES.
Following this question, I have managed to construct my index buffer fine, but when it comes to the ...
2
votes
1answer
28 views
GL_TRIANGLE_ADJACENCY and glDrawElements
So I've not been able to find much online about how data should be stored for triangle adjacency.
Currently I calculate my adjacent using half-edges (mention in an answer here).
But do I store this ...
2
votes
2answers
61 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 ...
1
vote
1answer
106 views
How do I find the circumcenter of a triangle in 3D?
I want to find the circumcenter of a triangle. Wolfram only shows how to find the circumcircle of a triangle in R2. How can I find the circumcenter of a triangle in R3?
1
vote
1answer
124 views
Batching and performances
I'm trying to understand batching and I'm not sure to understand how to do that, can I have more informations please? Here is what I found for the moment:
Batching informations
There is many types ...
10
votes
2answers
432 views
World Bounds - (0, Size) or (-HalfSize, HalfSize)?
When creating a game space in which to move, draw and collide objects, is it better to have the (0,0) point, or the (0,0,0) point, be in the very center of your space, such that the bounds of the ...
8
votes
3answers
238 views
Largest sphere inside a frustum
How do you find the largest sphere that you can draw in perspective?
Viewed from the top, it'd be this:
Added: on the frustum on the right, I've marked four points I think we know something about. ...
7
votes
3answers
284 views
How do I target a tank turret with an offset barrel?
I have a tank model consisting of multiple parts, a body, a turret and the barrel of the gun. The turret is offset from the body origin and can rotate around the Y axis(up). The barrel is connected to ...
0
votes
1answer
138 views
DirectX 11, using Tessellation & Geometry shader in a single pass
Before all, sorry for my poor english !
With DirectX 11, i'm trying to create a random map full with GPU.
Using Hull shader stage, I'm managing LOD with tessellation.
Using Domain shader stage, I'm ...
1
vote
1answer
71 views
Which Graphics/Geometry abstraction to choose?
I've been thinking about the design for a browser app on the HTML5 canvas that simulates a 2D robot zooming around, sensing the world around it. I decided to do this from scratch just for fun. I need ...
4
votes
1answer
109 views
A* search in hexagonal grid with minimum turn radius
I need to run an A* search through a hexagonal grid. However, I have one nasty constraint: my vehicle can only turn so sharp. It has a specified minimum turn radius. I can't quite see how to translate ...
3
votes
1answer
66 views
Vertices shaking with large camera position values
Basicly when i set the position of my camera (my character in game) to a high value, the geometries seems to be shaking, the higher the position value, the more they shake. On low position values you ...
0
votes
0answers
41 views
“Walking” along a rotating surface in LimeJS
I'm trying to have a character walk along a plank (a long, thin rectangle) that works like a seesaw, being rotated around a central point by box2d physics (falling objects). I want the left and right ...
21
votes
4answers
1k views
Is the Manhattan distance monotonic when used as heuristic function?
I have a square-based map. Only horizontal and vertical movement is allowed (no diagonals). Movement cost is always 1.
I'm implementing an A* algorithm on that map, using the Manhattan distance as a ...
2
votes
2answers
119 views
Calculating specific coordinate along a path
Let's say I have a path comprised of a sequence of points that are connect by lines and arcs. The entire path has some specific length. Let's call that length 100.
What would be the mechanism to ...
2
votes
1answer
147 views
Collision avoidance (AI)
Now my 3D model has complete AI behaviours, but my model has no collision avoidance while he is moving towards the player! Because of this, he gets stuck in front of 3D blocks sometimes.
I think the ...
5
votes
1answer
230 views
Procedural Geometry Generation
I have recently been looking into SceneKit for OS X and noticed that there are several factory methods to create geometric shapes such as:
Box, Capsule, Cone, Cylinder, Plane, Pyramid, Sphere, Torus ...
0
votes
1answer
123 views
enemy View Range , chase player
for 3D:
Q1 : I want to make zone range for each enemy in the game , so that when the player in the view range he will be chased .
Q2 :if I want to make enemy walk a little bit around his position ...
-1
votes
1answer
80 views
chasing , zone range
here is an image show what I am gonna to do in my XNA game , I want to check if the player is inside zone range and if yes then attack the player , I tried to do this using checking ray but it's odd ...
27
votes
6answers
1k views
Hexagon collision detection for fast moving objects?
A object has a position and a speed vector. Usually only the position is used to check if two objects collide, this is problematic for very fast moving objects as it can happen that the object moves ...
1
vote
0answers
40 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
115 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
140 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) ...
0
votes
0answers
71 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
139 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 ...
2
votes
0answers
152 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 ...
4
votes
2answers
260 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
1answer
94 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:
...
2
votes
0answers
96 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
112 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
204 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 ...
1
vote
3answers
160 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 ...
-5
votes
3answers
239 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
62 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 ...
2
votes
1answer
369 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" ...
3
votes
1answer
224 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 ...
0
votes
1answer
37 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
82 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 ...
6
votes
3answers
432 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 ...
6
votes
6answers
437 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 ...
23
votes
1answer
936 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 ...
2
votes
2answers
95 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 ...
5
votes
1answer
114 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 ...
1
vote
2answers
1k 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 ...
2
votes
1answer
107 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
526 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
525 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> ...
8
votes
2answers
828 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
380 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 ...