vertices

Align point clouds via 3 points correlation?

Let's say I have 3 point clouds: first that has 3 points {x1,y1,z1}, {x2,y2,z2}, {x3,y3,z3} and second point cloud that has same points as {xx1, yy1, zz1}, {xx2,yy2,zz2}, {xx3,yy3,zz3}... I assume to align second point cloud to first I have to multiply second one's points by T[3x3matrix]. 1) So how do I find this transform matrix(T) ? ...

Best Algorithm to find the edges (polygon) of vertices

I have a large array of vertices, some of them are edges, some are redundant (inside the shape) and I want to remove those. The simplest algorithm I could think of is checking one by one if they hit the shape formed by the others. But it should be a very slow algorithm. I thought about picking one from the edge (the one farthest from o...

Minimize Polygon Vertices

What is a good algorithm for reducing the number of vertices in a polygon without changing the way it looks very much? Input: A polygon, represented as a list of points, with way too many verticies: raw input from the mouse, for example. Output: A polygon with much fewer verticies that still looks a lot like the original: something usa...

Most basic transformed vertex-drawing with Direct3D

I'm absolutely new to DirectX and I'd like to draw some untransformed primitives with the most basic Direct3D configuration (for learning purposes). I already drew some primitives with transformed vertices, that is vertices with the D3DFVF_XYZRHW flag set. Now I'm trying to get the same output with untransformed vertices, but I don't ge...

Planewidth after bending (using pv3d, as3dmod)

Hi there, I got a huge problem. I'm stuck there for two weeks now. It's seems pretty simple. I'm creating a plane, mapping a texture to it. After that I bend it, using the bend modifier from as3dmod. Of course the plane got smaller after the bending process. I've tried to calculate the first and last vertices. var sizeAfterBending:...

JUNG: how to shape pickable vertices

Hello everyone... I am using JUNG to make a network diagram. I want to shape the vertices depending upon its type. The vertices are pickable and colored. The code for vertices so far is as under: class VertexColors extends PickableVertexPaintTransformer<Number> { VertexColors(PickedInfo<Number> pi) { super(pi, Color.blue, Co...

Given a large set of vertices in a non-convex polygon, how can i find the edges?

I have a set of vertices(called A) and I want to find all the border vertices such that this border vertices set is an outline of the shape. Many of the vertices in A are redundant because they are inside the shape, I want to get rid of these vertices. My question is similar to http://stackoverflow.com/questions/477867/best-algorithm-...

Fill 2D area bound by vertices in XNA

I'm learning XNA by doing and, as the title states, I'm trying to see if there's a way to fill a 2D area that is defined by a collection of vertices on a plane. I want to fill with a color, not a file-based texture. For an example, take a rounded rectangle whose vertices are defined by four quarter-circle triangle fans. The vertices a...

Modifying OpenGL axis system

Hello, I'm using OpenGL with gluPerspective, what would I need to do to make it use an axis-system which the origin is top left instead of bottom left? ...

Could somebody explain how to use glDrawElements (iPhone)?

Sorry for the duplicaiton, but I've been googlin' for hours now without any result. I have this (optimized) data of a simple cube exported from a converter: // 8 Verticies // 4 Texture Coordinates // 6 Normals // 12 Triangles static GLshort cubeFace_indicies[12][9] = { // Box001 {2,0,3 ,0,0,0 ,0,1,2 }, {1,3,0 ,0,0,0 ,3,2,1 }, ...

XNA - Using Dynamic Vertex Buffer and only four(4) vertices.

Hiya! Just a quick question on drawing quads. I'm currently using: GraphicsDevice.DrawPrimitives(PrimitiveType primitiveType, int startVertex, int primitiveCount); This draws my quads perfectly fine but the only way I can make it work is to use six (6) vertices for my quads (drawing them as two triangles). I'm...

glDrawElements with indices applied to vertices and normals

Is it possible to use the glDrawElements method when you have lets say 2 arrays (one for Normals and one for Vertices) and use the Index-buffer interleaved between vertices and normals). EXAMPLE: rendering a Cube // 8 of vertex coords GLfloat vertices[] = {...}; // 6 of normal vectors GLfloat normals[] = {...}; // 48 of indices (even a...

Is there a performance penalty for creating Direct3D vertices with all semantic types?

In Direct3D, you can create any type of Vertex you like. You can have a simple Vertex with just positional information, or you could add colour info, texture info, etc etc. When creating your input layout, you define what parts of a Vertex you've implemented: D3D10_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B...

What is a 3D Vector and how does it differ from a 3D point?

Does a 3D vector differ from a 3D point tuple (x,y,z) in the context of 3D game mathematics? If they are different, then how do I calculate a vector given a 3d point? ...