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
26
votes
2 answers

Why is the ELF execution entry point virtual address of the form 0x80xxxxx and not zero 0x0?

When executed, program will start running from virtual address 0x80482c0. This address doesn't point to our main() procedure, but to a procedure named _start which is created by the linker. My Google research so far just led me to some (vague)…
Michael L.
  • 263
  • 1
  • 3
  • 5
24
votes
4 answers

Moving lat/lon text columns into a 'point' type column

I've got a table in my MySQL database called house. Within the house table, there are a couple of text columns called latitude and longitude. I've added a new column called coords, of type point -…
cannyboy
  • 24,180
  • 40
  • 146
  • 252
24
votes
1 answer

Draw a line using an angle and a point in OpenCV

I have a point and an angle in OpenCV, how can I draw that using those parameters and not using 2 points? Thanks so much!
DualSim
  • 279
  • 2
  • 4
  • 7
23
votes
9 answers

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…
Adam Davis
  • 91,931
  • 60
  • 264
  • 330
23
votes
8 answers

Finding translation and scale on two sets of points to get least square error in their distance?

I have two sets of 3D points (original and reconstructed) and correspondence information about pairs - which point from one set represents the second one. I need to find 3D translation and scaling factor which transforms reconstruct set so the sum…
user1476710
22
votes
3 answers

How to move the mouse to an arbitrary point using Protractor/Selenium

Is it possible to move the mouse to arbitrary coordinates on the screen/relative to an element in Protractor tests? I see people recommend using Robot for Java users, but of course I can't use that in JavaScript.
Andy
  • 7,885
  • 5
  • 55
  • 61
20
votes
6 answers

Rotate a point around a point with OpenCV

Does anyone know how I can rotate a point around another in OpenCV? I am looking for a function like this: Point2f rotatePoint(Point2f p1, Point2f center, float angle) { /* MAGIC */ }
user1021793
  • 213
  • 1
  • 2
  • 5
20
votes
5 answers

Point and ellipse (rotated) position test: algorithm

How to test if a point P = [xp,yp] is inside/outside some rotated ellipse given by the centre C=[x,y], a, b, and phi ( angle of rotation)? At this moment I am using the following solution: rotate ellipse and point by the angle -phi and then the…
justik
  • 4,145
  • 6
  • 32
  • 53
20
votes
6 answers

Meaning of the word yield

Currently, I'm reading "The Well-Grounded Rubyist" by David A. Black, and I'm stuck at chapter 10.9 (Enumerators and the next dimension of enumerability). My question is about the yield method. What is the meaning of the word yield in the Ruby…
kyrylo
  • 1,691
  • 1
  • 15
  • 22
20
votes
2 answers

How to make scatter plots with semitransparent points in Gnuplot?

How can I plot an image with partially transparent scatter points, just like in the picture below, with Gnuplot? The problem is that I don’t know how to set the points to be transparent.
Dd H
  • 331
  • 1
  • 3
  • 9
20
votes
1 answer

How to calculate in JavaScript angle between 3 points?

I want to get angle between 3 points in JavaScript. If I have points A(x1,y1), B(x2, y2) and C(x3, y3), I want to get angle that is formed with lines AB and BC. let A = {x:x1, y:y1}, B = {x:x2, y:y2}, C = {x:x3, y:y3}
DejanG
  • 525
  • 1
  • 10
  • 17
20
votes
3 answers

How to make UIImageView automatically resize to the size of the image loaded

I have put an UIImageView control on my view with IB. The size of the control is just something I decided upon, pretty random size really What I want to do is the control to resize automatically whenever I set the image property to a new image. I…
Louis Shraga
  • 773
  • 1
  • 7
  • 26
19
votes
7 answers

How do I find the center of a number of geographic points?

If I have a series of points as longitude and latitude, how would I calculate the center of all of those points?
dvorak
  • 31,281
  • 4
  • 27
  • 29
18
votes
5 answers

What is an appropriate `GetHashCode()` algorithm for a 2D point struct (avoiding clashes)

Consider the following code: struct Vec2 : IEquatable { double X,Y; public bool Equals(Vec2 other) { return X.Equals(other.X) && Y.Equals(other.Y); } public override bool Equals(object obj) { if (obj…
John Alexiou
  • 28,472
  • 11
  • 77
  • 133
18
votes
3 answers

Delphi array initialization

I currently have this, and it sucks: type TpointArray = array [0..3] of Tpoint; class function rotationTable.offsets(pType, rotState, dir: integer): TpointArray; begin Result[0] := point(1, 1); Result[1] := point(1, 2); Result[2] := point(1,…
Alex O
  • 181
  • 1
  • 1
  • 3