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
7
votes
5 answers

Simple math algorithm: Center point of a line

I have an algorithm as follows for finding the center of a line (midpoint). public DoublePoint getMidPoint() { return new DoublePoint((origin.x + endPoint.x) / 2, (origin.y + endPoint.y) / 2); } It seems to work for any values. But I seem to…
William the Coderer
  • 708
  • 1
  • 7
  • 19
7
votes
2 answers

How to plot a list of Shapely points

I created a list of Shapely Point objects based on the point data set. How can I plot this list of points below? points = [Point(-4.85624511894443, 37.1837967179202), Point(-4.855703975302475, 37.18401757756585), …
Hello-experts
  • 113
  • 1
  • 1
  • 10
7
votes
2 answers

Find point on Circle on Android

Everything seemed so plain and simple until I had to actually program it. What I've got I uploaded an image to explain it better. I have a circle and I know it's radius center point coordinates each button's initial coordinates (the red…
Alin
  • 14,809
  • 40
  • 129
  • 218
7
votes
3 answers

Find most unpopulated points in a coordinate system

I have a coordinate system which basically represents a screen. And I have an arbitrary amount of positions. E.g.: population = [ {x: 100.44, 200.54}, {x: 123.45, 678.9}, {x: 1300.23, 435.81}, {x: 462.23, 468.37}, {x: 956.58,…
Forivin
  • 14,780
  • 27
  • 106
  • 199
7
votes
4 answers

c# - how to move point a given distance d (and get a new coordinates)

Hi I was wondering if there is any efficent way to calculating coordinates of point (which was moved distance d from it's original location). Let's say I have a point P(0.3,0.5) and I need to move that point random direction with distance d. So far…
geronimo
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

Unpredictable return time for currentDrawable

I’m writing a view to plot real time data in Metal. I’m drawing the samples using point primitives, and I’m triple buffering both the vertices, and the uniform data. The issue I’m having is that the time it takes for a call to currentDrawable to…
vegather
  • 470
  • 4
  • 14
7
votes
5 answers

Calculate curvature for 3 Points (x,y)

I have a two dimensional euclidean space. Three points are given. For example (p2 is the middle point): Point2D p1 = new Point2D.Double(177, 289); Point2D p2 = new Point2D.Double(178, 290); Point2D p3 = new Point2D.Double(178, 291); Now i want to…
Spenhouet
  • 6,556
  • 12
  • 51
  • 76
7
votes
1 answer

Using R, how to calculate the distance from one point to a line?

Suppose we have three points, a, b, c. b and c are linked to become a line. how to use R to calculate the distance from a to this line? Is there any function?
Feng Chen
  • 2,139
  • 4
  • 33
  • 62
7
votes
6 answers

Most common way to compute line line intersection C++?

Seems there is no way to compute line line intersection using boost::geometry, but I wonder what is the most common way to do it in C++? I need intersection algorithms for two infinite lines in 2D, if it will be faster it can be two different…
mrgloom
  • 20,061
  • 36
  • 171
  • 301
7
votes
1 answer

Infinite Blue Noise

I am looking for an algorithm which produces a point placement result similar to blue noise. However, it needs to work for an infinite plane. Where a bounding box is given, and it returns the locations of all points which fall inside. Any help…
7
votes
3 answers

How do I enter an "empty" POINT() geometry value into a MySQL field of type POINT?

I have a table with a POINT geometry field. I enter latitude/longitude points into it like this: INSERT INTO table( point ) VALUES( POINT( lon_value, lat_value ); Sometimes I do not have lat/lon values to enter. I am unable to enter a blank, a…
T. Brian Jones
  • 13,002
  • 25
  • 78
  • 117
7
votes
4 answers

Should I use Point.x or Point.getX()?

I have a Point. I am trying to get x as an int. If I use Point.x, I will get x as an int. But I am under the impression that I should be using a getter whenever possible (Why use getters and setters?). The issue with Point.getX() is that it…
Evorlor
  • 7,263
  • 17
  • 70
  • 141
7
votes
1 answer

How to insert [Spatial Point] values with a query in MySQL in Laravel

I have a table with a column of type Spatial point ,, I want the query to insert the values of that column with laravel and if there a queries to get items within a specific range ? any help here ?? That's my table here : public function up() { …
Mahmoud Nassar
  • 609
  • 7
  • 16
7
votes
2 answers

Cannot find System.Windows.Point

I am using UIAutomation with the method System.Windows.Automation.AutomationElement.FromPoint(System.Windows.Point) to get the element by the mouse cursor, but I cannot find the type System.Windows.Point. I looked up object library and it is still…
Sam Huang
  • 99
  • 1
  • 7
7
votes
1 answer

setting point sizes when using Gadfly in Julia

In my attempts to practice Julia, I've made a program which draws a bifurcation diagram. My code is as follows: function bifur(x0,y0,a=1.3,b=0.4,n=1000,m=10000) i,x,y=1,x0,y0 while i < n && abs(x) < m x,y = a - x^2 + y, b * x …
Ali
  • 503
  • 6
  • 20