Questions tagged [point]

A point is a fundamental geometry entity.

Points are the basis for any other geometry entities, like lines, boxes, polygons, etc.

Find more information on points here.

2011 questions
17
votes
2 answers

How do I find all the Points in a Path in Android?

Awhile back I asked a question to see if I was able to find a pair of specific points in a path; however, this time I want to know if there is a way to know all points in a path? (I couldn't find a method that did so, which is unfortunate because…
StartingGroovy
  • 2,802
  • 9
  • 47
  • 66
17
votes
2 answers

Projection of a point to a line segment Python Shapely

I have a LineString defined by two points, so essentially a straight line segment, and I wanted to project a point on to it. I am aware of .project and .interpolate. However when the point is "outside" the segment, I don't want the closest point on…
sofaruntitled
  • 275
  • 1
  • 2
  • 6
17
votes
1 answer

Point cloud XYZ format specification

Is there an official specification for the XYZ format for point clouds? I've been searching all over and I didn't find it. I've seen that there are some files which line contains: points coordinates, (X Y Z for each point ) others contain…
andrea.al
  • 175
  • 1
  • 2
  • 9
17
votes
7 answers

How do I draw a point using Core Graphics?

I see APIs in Quartz for drawing lines and circles. But all I want to do is to specify the (x,y) cartesian coordinate to color a pixel a particular value. How do I do that?
Siddharth
17
votes
7 answers

Re-distort points with camera intrinsics/extrinsics

Given a set of 2D points, how can I apply the opposite of undistortPoints? I have the camera intrinsics and distCoeffs and would like to (for example) create a square, and distort it as if the camera had viewed it through the lens. I have found a…
Andy
  • 171
  • 1
  • 1
  • 3
16
votes
2 answers

How to know that whether a tap is inside a view or outside in swift

I'm try to develop code part, to check whether mine tap is inside a view or outside a view, i tried with pointInside method. If A is main View Controller and B is subView of A, How can i get to know that user tapped inside B.
Joe
  • 859
  • 2
  • 10
  • 27
15
votes
4 answers

Draw line between two points using OpenLayers

I have two points having lolLat as 0,10 and 30,0 Now to draw a marker at this point i use this transform while generating marker for it lonLat.transform( new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984 …
RPB
  • 16,006
  • 16
  • 55
  • 79
15
votes
5 answers

How do I know if a Lat,Lng point is contained within a circle?

Ok pretty self explanatory. I'm using google maps and I'm trying to find out if a lat,long point is within a circle of radius say x (x is chosen by the user). Bounding box will not work for this. I have already tried using the following…
Stuart Beard
  • 180
  • 1
  • 2
  • 12
15
votes
6 answers

Finding all points in certain radius of another point

I am making a simple game and stumbled upon this problem. Assume several points in 2D space. What I want is to make points close to each other interact in some way. Let me throw a picture here for better understanding of the problem: Now, the…
Saraph
  • 992
  • 1
  • 11
  • 25
15
votes
2 answers

R draw (abline + lm) line-of-best-fit through arbitrary point

I am trying to draw a least squares regression line using abline(lm(...)) that is also forced to pass through a particular point. I see this question is related, but not quite what I want. Here's an example: test <- structure(list(x = c(0, 9, 27,…
thelatemail
  • 91,185
  • 12
  • 128
  • 188
14
votes
5 answers

How can I vary the point size in OpenGL glBegin(GL_POINTS)?

Is there any way to vary the point size when drawing lots of points? I know there's the glPointSize(float), but is there a way to do it in a 'batch' or array? I would like the points to have different sizes based on an attribute of the data. Such as…
max
  • 2,346
  • 4
  • 26
  • 34
14
votes
7 answers

How to generate random points in a circular distribution

I am wondering how i could generate random numbers that appear in a circular distribution. I am able to generate random points in a rectangular distribution such that the points are generated within the square of (0 <= x < 1000, 0 <= y < 1000): …
Jack8246
  • 153
  • 1
  • 3
  • 10
14
votes
3 answers

calculate a perpendicular offset from a diagonal line

I am writing a music display program and need to draw a 'slur' between two notes. A slur is a curved line linking two notes - just to be clear. I know the note positions and calculate where the start and end points of the curve should be - Start…
Simon
  • 2,208
  • 4
  • 32
  • 47
14
votes
3 answers

Is there Point3D?

Is there a built in type Point3 in .Net? Some kind of this public class Point3D { public double X { get; set; } public double Y { get; set; } public double Z { get; set; } } but built in. It is not hard to implement it myself, but..
steavy
  • 1,483
  • 6
  • 19
  • 42
14
votes
4 answers

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…
Josh Morgan