Questions tagged [points]

A scoring system for games or algorithms. Geometric items should be tagged with coordinates or point.

This tag represents:

  • an arbitrary numerical counter for games or scoring algorithms

Please do not use this tag for:

  • a dimensional measurement for geometric calculations, such as [x, y, z] -- instead use
  • a coordinate in GPS mapping -- instead use
866 questions
14
votes
4 answers

How to avoid overplotting (for points) using base-graph?

I am in my way of finishing the graphs for a paper and decided (after a discussion on stats.stackoverflow), in order to transmit as much information as possible, to create the following graph that present both in the foreground the means and in the…
Henrik
  • 14,202
  • 10
  • 68
  • 91
12
votes
5 answers

How to get the K most distant points, given their coordinates?

We have boring CSV with 10000 rows of ages (float), titles (enum/int), scores (float), .... We have N columns each with int/float values in a table. You can imagine this as points in ND space We want to pick K points that would have maximised…
DuckQueen
  • 772
  • 10
  • 62
  • 134
12
votes
2 answers

A O(n*log(n)) algorithm to find the segment (among n*n segments) with the lowest slope

Given P={p1,...,pn} of different points which define n2 lines, write an algorithm that finds the line which has the lowest slope (smallest absolute value) with O(n*log(n)) time complexity in the worst case.
user1387682
  • 265
  • 2
  • 9
12
votes
3 answers

OpenLayers : How to calculate distance between two points?

How can one calculate the distance in OpenLayers between 2 points using Mercator projection? Thanks
Jimmy
  • 123
  • 1
  • 1
  • 5
11
votes
5 answers

Generator of evenly spaced points in a circle in python

I am tasked with generating evenly (more or less) spaced points on concentric rings of an invisible circle. The function should take a list of radii, and number of points to plot for a given radius as arguments. For example for a radius of 0 it…
Oli Ryan
  • 171
  • 1
  • 1
  • 5
11
votes
2 answers

How do browsers convert a point-based font-size to pixels?

If a browser has to deal with the following CSS: font-size: 12pt;, how does it calculate the effective size on the screen? Can it know the dpi's of the screen (via some OS function) or is it just an approximation? If it is an approximation - is it…
Teetrinker
  • 850
  • 1
  • 15
  • 30
11
votes
3 answers

Return surface triangle of 3D scipy.spatial.Delaunay

I have this problem. I try to triangulate points cloud by scipy.spatial.Delaunay. I used: tri = Delaunay(points) # points: np.array() of 3d points indices = tri.simplices vertices = points[indices] But, this code return tetrahedron. How is it…
s.t.e.a.l.t.h
  • 440
  • 2
  • 4
  • 14
11
votes
4 answers

How to draw a lines between points and pull those points?

I want to draw the lines between points on the view, and then pull those points upto desired positions even the shape will change. i know how to draw the line between two points canvas.drawLine(10, 10, 90, 10, paint); by using this i can draw the…
RajaReddy PolamReddy
  • 22,428
  • 19
  • 115
  • 166
10
votes
3 answers

Individual point coloring in ListPlot, ErrorListPlot in Mathematica

I can get a colored ListLinePlot by doing something like ListLinePlot[Range[420, 680, 20], ColorFunction -> "VisibleSpectrum", ColorFunctionScaling -> False] However, as indicated by the help file ("ColorFunction requires at least one dataset to…
Jason Gross
  • 5,928
  • 1
  • 26
  • 53
10
votes
3 answers

Fastest way to find the closest point to a given point in 3D, in Python

So lets say I have 10,000 points in A and 10,000 points in B and want to find out the closest point in A for every B point. Currently, I simply loop through every point in B and A to find which one is closest in distance. ie. B = [(.5, 1, 1), (1,…
Saebin
  • 404
  • 6
  • 14
10
votes
3 answers

Calculating angle between two points - java

I need to calculate the angle in degrees between two points, with a fixed point that is connected with the given two points by a line. Here is an image that illustrates what I need: Here is what I have tried so far: public static float…
David Lasry
  • 1,407
  • 4
  • 26
  • 43
10
votes
1 answer

Ordering of points in R lines plot

I want to add a fitted line of a quadratic fit to a scatteprlot, but the ordering of the points is somehow messed up. attach(mtcars) plot(hp, mpg) fit <- lm(mpg ~ hp + I(hp^2)) summary(fit) res <- data.frame(cbind(mpg, fitted(fit), hp)) with(res,…
phildeutsch
  • 683
  • 1
  • 8
  • 18
10
votes
4 answers

Find equidistant points between two coordinates

I have a function which needs to take out equidistant points between two points on the screen(2d). Like this - |--------------| The distance is already decided. For example, I take it as 2 here, then the points I need the - |--.--.--.--.--| The…
svineet
  • 1,859
  • 1
  • 17
  • 28
10
votes
4 answers

Given a set of points, how do I find the two points that are farthest from each other?

Possible Duplicate: Greatest linear dimension 2d set of points I could compute the distance between each point and take the largest but that doesn't sound like a very efficient way to do it when there are a large (> 1000) number of points. Note:…
willc2
  • 38,991
  • 25
  • 88
  • 99
9
votes
2 answers

Add XY points to raster map generated by levelplot

I have raster maps which are generated using the raster package in R. These raster layers can be visualized using the rasterVis package's levelplot function: levelplot(rasterstack, layout=c(1, 2), col.regions=colorRampPalette(c('darkred',…
code123
  • 2,082
  • 4
  • 30
  • 53
1
2
3
57 58