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
8
votes
3 answers

opencv finding image cordinates on another image

How to find image "A" coordinates on image "B" which contains image "A". I wrote this program which is only checking pixel values, does anyone know is there any library tool do this.
haykart
  • 957
  • 5
  • 14
  • 34
8
votes
5 answers

Android, How can I rotate an arrow (image) around a fixed point?

I have an arrow image that I want to rotate from 0 to 180 degree (like the needle in a meter.) One point of the arrow is fixed in middle and at bottom of the screen and head of arrow should move. Length of arrow is fix (it is image). Also I have two…
Hesam
  • 52,260
  • 74
  • 224
  • 365
8
votes
2 answers

How to offset polygon edges?

I have a list of point2D that makes a closed polygon. Now I want to create another set of 2D points by offsetting the polygon given an option inside or outside and an offset value. How can I do it?
N.T.C
  • 658
  • 2
  • 9
  • 20
8
votes
3 answers

converting double values for making a Point type

I want to draw a curve (a diode curve) in a picturebox using imagefrom bitmap. I have a problem now and it is my point data are saved as Double and it is really important to keep the precesion. for example a point in the plot I have is like…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
8
votes
1 answer

Order by distance on POINT in Laravel 5.1 via associated tables

I'm attempting to order events by their distance from a user submitted postcode and distance. I've attached a sample of my database tables and their relationships, as you can see geom is associated with multiple addresses via postcode and addresses…
HelloSpeakman
  • 810
  • 9
  • 22
8
votes
2 answers

How to style points in openlayers 4

I'm trying to style points in a vector source in OpenLayers 4. I've defined a style: var pStyle = new ol.style.Style({ stroke: new ol.style.Stroke({ width: 6, color: [255, 0, 0, 1] }) }); and added the style in the…
und
  • 81
  • 1
  • 1
  • 2
8
votes
2 answers

Draw line between two given points (OpenCV, Python)

I am struggling with this problem for an hour by now... I have an image with a rectangle inside: This is the code I wrote to find the points for the corners: import cv2 import numpy as np img = cv2.imread('rect.png') gray = cv2.cvtColor(img,…
BlueTrack
  • 442
  • 3
  • 7
  • 19
8
votes
1 answer

Point in Polygon using Winding Number

The question is: how do you determine if a point is within a polygon? This question has been asked and answered many times. There are multiple methods for determining whether a point is within a polygon. I've grokked the Winding Number algorithm,…
Jim Speaker
  • 1,303
  • 10
  • 28
8
votes
3 answers

Javascript: rect.contains(point)

I like to see if mouseclick is in a rectangle area (in canvas). In C# i would do this. var point = new Point(x, y); var rectangles = new List(); //rectangles.add(new Rect(x,y,h,w)); foreach(var rectangle in rectangles) { …
user3432681
  • 564
  • 4
  • 10
  • 25
8
votes
1 answer

Finding an inner circle/ellipse of a 2D point cloud

I have a bunch of 2D-points. You can see them on the left picture. They form some sort of ring with a few bunny ears. My goal is to find the big inner cycle/ellipse, which you can see on the right side. What kind of algorithms are useful for such…
Jakube
  • 3,353
  • 3
  • 23
  • 40
8
votes
4 answers

Calculate middle point of Bezier Curve

I have a function to draw Bezier Curve through three points. I have already 2 points (start and end) - A and B. How do I calculate middle point between those two points as middle point would be always a little higher or lower than linear function of…
morad1n
  • 119
  • 1
  • 7
8
votes
2 answers

Geodjango: PointField and GEOSGeometry

If I can do this: >>> from django.contrib.gis.geos import GEOSGeometry >>> from django.contrib.gis.geos import Point >>> point = GEOSGeometry('POINT(1 5)') >>> print point POINT (1.0000000000000000 5.0000000000000000) Why can I not do this: >>> lat…
Nick B
  • 9,267
  • 17
  • 64
  • 105
8
votes
10 answers

Algorithm for spread-out 2D point distribution

In a 2D pixel array, I need an efficient algorithm that will select p% of pixels that are the most spread out. This can be done adaptively by selecting points, then repeatedly adjusting the positions of points that are too close together. But this…
user20493
  • 5,704
  • 7
  • 34
  • 31
7
votes
1 answer

Why does java.awt.Point provide methods to set and get doubles but store x and y as int's?

As you can see in the Oracle Documentation for java.awt.Point, x and y are stored as int. However, getX and getY return double. While there is a setLocation method that takes 2 double types, there is no constructor that does. Furthermore, the…
Luke
  • 3,742
  • 4
  • 31
  • 50
7
votes
3 answers

Whether multiple points make up for a circle?

If I have e.g. 20 points, how can i check to see if those points make up for a circle? It doesnt have to be a perfect circle. For example if I store the coordinates of my mouse every 200ms (as the user moves the mouse), I want to see if the user…
Afra
  • 2,502
  • 3
  • 24
  • 27