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
58
votes
9 answers

Opencv polylines function in python throws exception

I'm trying to draw an arbitrary quadrilateral over an image using the polylines function in opencv. When I do I get the following error OpenCV Error: Assertion failed (p.checkVector(2, CV_32S) >= 0) in polylines, file …
Ashok
  • 1,079
  • 3
  • 10
  • 17
52
votes
8 answers

Pixels vs. Points in HTML/CSS

When creating an HTML page, should I specify things like margins with pixels or with points in CSS? Is one of them considered to be better practice than the other? Any advantages or disadvantages to either one?
user541686
  • 205,094
  • 128
  • 528
  • 886
46
votes
10 answers

Algorithm to cover maximal number of points with one circle of given radius

Let's imagine we have a plane with some points on it. We also have a circle of given radius. I need an algorithm that determines such position of the circle that it covers maximal possible number of points. Of course, there are many such positions,…
Oleh Prypin
  • 33,184
  • 10
  • 89
  • 99
34
votes
8 answers

Closest point to a given point

I have a set K of randomly selected pixels in a 2D image. For every other pixel in the image I need to find out which pixel in set K is closest to it (using the standard sqrt(dx^2 + dy^2) measure of distance). I am aware that there may be more than…
tw39124
  • 9,103
  • 2
  • 20
  • 14
26
votes
4 answers

How to check whether a NSPoint lays inside a NSRect

I've created a mutable array containing NSRect values. I want to check whether the NSPoint I created is within this rectangle. What is the best way to do this in cocoa.
Luuk
25
votes
5 answers

Finding points on a line with a given distance

I have a question i know a line i just know its slope(m) and a point on it A(x,y) How can i calculate the points(actually two of them) on this line with a distance(d) from point A ??? I m asking this for finding intensity of pixels on a line that…
Emre
  • 435
  • 1
  • 6
  • 13
23
votes
2 answers

How to reduce the number of points in a curve while preserving its overall shape?

I have a list of points that make a curve, and I would like to reduce the number of points, but still keep the overall shape of the curve. Basically, I want to go from this: To this: So the algorithm would remove the points that are redundant but…
laurent
  • 88,262
  • 77
  • 290
  • 428
19
votes
2 answers

Find bezier control-points for curve passing through N points

Considering the following nice solution for finding cubic Bézier control points for a curve passing through 4 points: How to find control points for a BezierSegment given Start, End, and 2 Intersection Pts in C# - AKA Cubic Bezier 4-point…
jwin68
  • 191
  • 1
  • 1
  • 4
19
votes
6 answers

Algorithm for arranging Cartesian points

I have few Cartesian points of the form : (x,y) where x and y both are non-negative integers. For e.g. (0,0) , (1,1), (0,1) I need an algorithm to arrange the above points in such a way that going from one point to other changes either x or y…
simplfuzz
  • 12,479
  • 24
  • 84
  • 137
19
votes
1 answer

Trying to plot coordinates around the edge of a circle

I am trying to plot coordinates around a circle programmatically. Here it is hard-coded to show what I am after: http://jsfiddle.net/jE26S/1/ var iteration = 4; var left = [94,200,104,-6]; var top = [-6,94,200,94]; for(var i=0; i
user1503606
  • 3,872
  • 13
  • 44
  • 78
16
votes
3 answers

Reputation and point system models

I'm looking to implement a reputation-based point system for a QA site. I like Stack Overflow's model, but I was wondering if there's anything else like this out there. I was doing some research on the web, but couldn't find a good compiled list of…
Denny
  • 163
  • 5
15
votes
3 answers

Find specific point between 2 points - three.js

How can I find a point ( C (x,y,z) ) between 2 points ( A(x,y,z) , B(x,y,z) ) in a thgree.js scene? I know that with this: mid point I can find the middle point between them, but I don't want the middle point, I want to find the point which is…
user1866818
15
votes
2 answers

OpenCV: How to get inlier points using findHomography()/findFundamental() and RANSAC

OpenCV does not provide a RANSAC-function per se or at least in such a form that you can just call it and be done with it (e.g. cv::ransac(...)). All functions/methods that are able to use RANSAC have a flag that enables it. However this is not…
rbaleksandar
  • 8,713
  • 7
  • 76
  • 161
15
votes
3 answers

FLOT: How to make different colored points in same data series, connected by a line?

I think I may have stumbled onto a limitation of Flot, but I'm not sure. I'm trying to represent a single data series over time. The items' "State" is represented on the Y-Axis (there are 5 of them), and time is on the X-Axis (items can change…
Matt
  • 23,363
  • 39
  • 111
  • 152
14
votes
2 answers

How to find the border points of a particular shape

Suppose I have a irregular, random, shape generated from a dataset. How do I find points that are situated on the shape's border? I am using R. Are there any packages in R for this purpose? For simplicity, just assume that I have a 2d dataset of…
Pradeep
  • 555
  • 8
  • 14
1
2 3
57 58