point

Query points epsilon-close to a cut plane in point cloud using the GPU.

Hello everybody, I am trying to solve the current problem using GPU capabilities: "given a point cloud P and an oriented plane described by a point and a normal (Pp, Np) return the points in the cloud which lye at a distance equal or less than EPSILON from the plane". Talking with a colleague of mine I converged toward the following so...

How to convert Pixels to Points (px to pt) in .NET? (C#)

I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate this conversion? ...

C++ library for rotating a point over a given axis?

Does anyone know of a graphing library for simple transformation of a point from one coordinate system to another coordinate system which is rotated by a angle and some point transformation and just for 2d? And any graphing tool for plotting and verifying the same visually? ...

Store 2D points for quick retrieval of those inside a rectangle

I have a large number of 2D points and I want to quickly get those that lie in a certain rectangle. Let's say a '.' is any point and 'X' is a point I want to find inside a rectangle which has 'T' as TopLeft and 'B' as BottomRight points: . . . . . . . T-----+ . . | X X | . . +-----B . . . . . . . I have tried a std::set with a sort fu...

Find all the line points by VC++

if we know the start point and the end point for an line how can you find the all point that line pass it ?? ...

Transforming Point object when using simple-xml

I am serializing a class using simple-xml (http://simple.sourceforge.net/) but when i try to use @Element on a Point object i get an error, how can i transform this Point object? ...

sun.java2d.loops.ProcessPath$Point

I am profiling an application suddenly using a lot of memory, and i am getting this: sun.java2d.loops.ProcessPath$Point As being allocated almost 11.000.000 times. What is it, and is there a solution to this? ...

Twips, pixels, and points, oh my!

or "How I learned to stop worrying and learned to love measurement systems" I wanted a central spot that I can refer to later to give me a quick low-down on various units of measurement used in programming. SO seemed the best place to put it, and while I could go ahead and answer the question myself, y'all are a much smarter bunch than...

retrieve perimeter points relative to center point in grid

Given p(0,0), how do I retrieve points{(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1),(-1,0),(-1,1)} which are the perimeter points relative to p offset by 1. ...

Converting x/y values in camera view to pan/tilt values

Hi, I'm not very good with more advanced maths, so I have to ask this: If I have a camera which gives out 360 degree pan (x) and tilt (y) values, and I want to get the pan and tilt values of where I have my cursor in the camera's view, how would I convert that? More info: It's a Flash/AS3 project. The pan and tilt values are from the c...

distance from point within a polygon to polygon edge

I am working with a huge area, 7 states of forest and nonforest using the NLCD data. Within some of the forested areas is a plot (this is my master's thesis I am working on). I have stumped everyone I have asked with this large dataset but we are certain there is a resolution out there. The forest/nonforest area is a signed and discrete ...

Determine if a 3D point is within a triangle

Given a 3D point (x, y & z), and a triangle made of three other 3D points, how can I determine if the point is in triangle? I've read a lot about doing this in 2D, the most helpful being http://imusthaveit.spaces.live.com/blog/cns!B5212D3C9F7D8093!410.entry, but I'm struggling to move the concept to 3D - could anyone help with either th...

C++: How to Convert From Float to String Without Rounding, Truncation or Padding?

I am facing a problem and unable to resolve it. Need help from gurus. Here is sample code:- float f=0.01f; printf("%f",f); if we check value in variable during debugging f contains '0.0099999998' value and output of printf is 0.010000. a. Is there any way that we may force the compiler to assign same values to variable of float ty...

svg problems

My task is to develop an algorithm that fits different kinds of curves onto a given point-sequence in 2 dimensional space. To be able to test my algorithm, I have chosen SVG to display the result. I have several problems with it. As there may be very different inputs and outputs of my algorithm, it is essential that I could view the ge...

Distance from Point To Line great circle functino not working right. Need help

Howdy. I need to get the distance from a lat/lng point to a line. Of course needs to follow the Great Circle. I found a great article on this at http://www.movable-type.co.uk/scripts/latlong.html but the code is not working right. Either I am doing something wrong or there is something missing. Here is the function in question. See t...

See if lat / long falls within a polygon using mysql

I have the created the table below CREATE TABLE geom (g GEOMETRY); and have inserted many rows, example below: INSERT INTO geom (g) VALUES(PolygonFromText('POLYGON(( 9.190586853 45.464518970, 9.190602686 45.463993916, 9.191572471 45.464001929, 9.191613325 45.463884676, 9.192136130 45.463880767, 9.192111509 45.464095594, 9.192427961 4...

2D geometry: how to check if a point is inside an angle

hello, i have the following geometrical issue in 2D: i have a point from which i cast an infinite angle (2D-cone) which is given by a direction and an angle. (the point and the direction form a vector and to each side half of the angle forms the 2D-cone) now i want to check if another point in 2D is inside this cone or outside. how c...

How to calculate a grid based on 4 curved edges?

How can I calculate the points on a 2D grid where the the edges are 4 curved beziers? (see picture): ...

What is the fastest way to find the center of an irregularly shaped polygon?

I need to find a point that is a visual center of an irregularly shaped polygon. By visual center, I mean a point that appears to be in the center of a large area of the polygon visually. The application is to put a label inside the polygon. Here is a solution that uses inside buffering: http://proceedings.esri.com/library/userconf/pro...

WPF: System.Windows.Int32Rect ---> System.Windows.Int32Point?

You know how System.Drawing.Rectangle was replaced by System.Windows.Int32Rect? (As far as non-floating-point shapes are concerned ...) Is there a similar new object for an integer point or size? If not, I'll just use System.Drawing - but that kinda seems like a minor mix of two platforms that ought not to me mixed. Anyway, what do...