A branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space.
3
votes
2answers
115 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) ...
3
votes
1answer
101 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 ...
3
votes
1answer
157 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 ...
3
votes
3answers
190 views
Adding tolerance to a point in polygon test
I've been using this method which was taken from Game Coding Complete to detect whether a point is inside of a polygon. It works in almost every case, but is failing on a few edge cases, and I can't ...
3
votes
1answer
273 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, ...
3
votes
2answers
223 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 ...
2
votes
2answers
452 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.
...
2
votes
1answer
206 views
How do I make a low pass filter (average of readings over time) for compass?
I'm making a prototype for android that pulls compass data from the phone. I want to stabilize it so it is less jerky, by taking the average of the last couple of readings.
I have done this for ...
2
votes
1answer
3k views
How to calculate a 3x3 rotation matrix from 2 direction vectors?
I've got 2 direction vectors, for the X axis and the Y axis of the object. How do I calculate the rotation matrix of the object using these?
2
votes
1answer
283 views
High school-level geometry book focusing on game dev for struggling student?
Here's the situation. My brother, a freshman in high school, isn't doing too well in geometry. Partially because he doesn't do half the work, but partially because he seems to have genuine ...
2
votes
1answer
513 views
Can Bullet Physics (or another 3d physics engine) use callbacks in my engine to check static geometry?
I'm wondering if it's possible to use or hack Bullet 3d Physics (or another free 3D physics engine) so that I don't need to "import" my static geometry into Bullet - instead I want to do it the other ...
2
votes
2answers
130 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 ...
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 ...
2
votes
1answer
280 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" ...
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 ...
2
votes
1answer
766 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 ...
2
votes
0answers
91 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 ...
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
1answer
619 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 ...
1
vote
2answers
816 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 ...
1
vote
6answers
305 views
Testing whether two cubes are touching in space
Does anyone have any clean ideas on testing whether two cubes in 3D space touch? By touch I mean, touch at corners or on a face or on an edge. Say that the cubes are axis aligned and there is no ...
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 ...
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 ...
1
vote
2answers
650 views
Render a polyline with rounded joints
I have a list of points (3D) and want to draw a line connecting all points with a specified width. The line should be rendered in OpenGL (using OSG) as triangles.
The real challenge of this task is to ...
1
vote
1answer
83 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 ...
1
vote
1answer
56 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 ...
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 ...
1
vote
2answers
681 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 ...
1
vote
2answers
305 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 ...
1
vote
1answer
251 views
How do I determine if a tile is a slope based on the tile image?
In my game, every tile is a 32x32 texture. All the slopes are a 0 - 45 degree angle. I would like to determine, at the time I load the tile, if the is sloped by examining its texture/bitmap data. How ...
1
vote
2answers
428 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 ...
1
vote
2answers
99 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 ...
1
vote
1answer
67 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:
...
1
vote
2answers
210 views
Separation of axis theorem implementation
I have been following the this guide to implement this. My current implementation is the following:
class SAT {
SAT();
bool collides(Rectangle rect1, Rectangle rect2){
var axises = [
...
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 ...
1
vote
1answer
254 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 ...
1
vote
0answers
30 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 ...
1
vote
0answers
62 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
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 ...
1
vote
0answers
293 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 ...
0
votes
1answer
83 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 ...
0
votes
1answer
262 views
Determining and culling non-visible vertices
Ahoy!
After posting my previous question on tile maps, i've been tinkering with an implementation i'm rather pleased with so far but would like to gather some more information about submitting ...
0
votes
1answer
65 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 ...
0
votes
1answer
128 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 ...
0
votes
1answer
677 views
Generating spherical world from heightmapped terrain
I am using a standard heightmapped procedural terrain in my project. However, I want the terrain to appear spherical when the user zooms out. This is an attempt to simulate the appearance of a ...
0
votes
2answers
484 views
Ways to define a curve
I'm trying to give shapes in my physics engine roundness/ curvature.
I am aware of various methods for mathematically defining curves; such as bezier-cruves, ellipses, etc. However I am not sure ...
0
votes
2answers
210 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 ...
0
votes
1answer
34 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 ...
0
votes
1answer
398 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> ...
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 ...

