FAQ Database Discussion Community

## Determine whether a point lies in a convex hull in O(log n) time [duplicate]

performance,algorithm,computational-geometry,point,convex-hull
This question already has an answer here: Test point for its position relative to the convex hull in log(n) 3 answers I've researched several algorithms for determining whether a point lies in a convex hull, but I can't seem to find any algorithm which can do the trick in...

## What is the difference between Depth Data and Point Cloud?

kinect,point,point-cloud-library,point-clouds
I cant figure out the difference between depth data that we get from device like Kinect which contains xyz and depth information and the point cloud data. can someone please explain it to me. thanks in advance.

## SAGE - Listing points on an elliptic curve

math,point,sage,elliptic-curve
I have a generated elliptic curve of a modulus. I want to list just a few points on it (doesn't matter what they are, I just need one or two) and I was hoping to do: E.points() However due to the size of the curve this generates the error: OverflowError:...

## Size of data type Geography(Point, 4326) in PostGIS?

size,postgis,point,geography
Its constructor takes a POINT and a SRID. Since POINT is two doubles (8 bytes each), SRID is an integer (4 bytes), can one assume that the full structure takes 8*2+4=20 bytes of storage space?

## Add a single point in plot with scaled and offset axes?

r,plot,point
I have the next code which represents a plot. x1<-0:200 a1<-dnorm(x1,88.24,15) b1<-dnorm(x1,92,16) c1<-dnorm(x1,104,15) x2<-400:1200 a2<-dnorm(x2,747.88,65.9792) c2<-dnorm(x2,835,117) scale<-range(pretty(range(a1,a2,b1,c1,c2))) remap<-function(x, to, from=range(x)) { (x-from[1]) / (from[2]-from[1]) * (to[2]-to[1]) + to[1] } plot(NA, NA, xaxt="n", yaxt="n", type="n", xlim=scale, ylim=scale, xlab="X", ylab="Y") rect(remap(83, scale, range(x1)), scale[1], remap(93, scale, range(x1)), scale[2], col="#ff606025", lty=0)...

## How to get the closest 2 Points from 2 List

c#,algorithm,list,point
I have 2 Lists of Points: var listA = new List<Point>(); listA.Add(new Point(10, 1)); listA.Add(new Point(5, 5)); listA.Add(new Point(15, 35)); var listB = new List<Point>(); listB.Add(new Point(1, 1)); listB.Add(new Point(5, 4)); listB.Add(new Point(35, 15)); Now I would like to do something like: getClosesPoints(listA,listB, Out pointA, Out pointB); I'm currently at...

## storing a matrix as a collection in MongoDB

mongodb,matrix,distance,point,asymmetric
I have a bunch of points {A, B, C, ...., X} and I want to store their distances in a matrix. One extra complication is that the distance from A to B and not the same as the distance from B to A, they are asymmetric. My aim is to...

## JUnit's assertEquals denies assertTrue [duplicate]

java,junit,double,point
This question already has an answer here: JUnit assertEquals( ) fails for two objects 2 answers Let's say I've got my own class Point with double X, double Y; public class Point { private final double x; private final double y; public Point(double x, double y) { this.x =...

## jquery extract float point number with 2 decimal places

jquery,regex,point,floating
I want to extract a float number from a string with 2 or 3 decimal places after coma without rounding (not toFixed) in jquery Examples (2 decimals) '43,999999' => 43.99 '324324243,669' => 324324243.66 '0,229' => 0.22 '0,2' => 0.2 or 0.20 '0.9' => 0.9 or 0.90 Examples (3 decimals) '43,999999'...

## Animating object angle to target angle

java,point,angle,animated
I am working on programming a game. In this game, there is an object that needs to rotate to face another object. Code: Here is what I have done: //targetAngle is defined to be the angle pointing towards the other object //angle is the angle of this object angle +=...

## What is the relationship between marks and covariates in point process

process,statistics,point,spatstat
I am confused about marks and covariates in point process. I am trying to create a model of a marked point pattern with few covariates in R by using spatstat, but I am not sure the relationship between marks and covariates. Could anyone help me? Thanks. ---- update I have...

## openni grabber on linux

linux,cloud,kinect,point
I am using Point Cloud Library 1.7.2 on Linux. PCL is working fine though the pcd_write example works. But when trying to run openni_grabber it displays a window screen with three rectangles red, green and black. I have checked that the Kinect XBox is working by running NiViewer and it...

## How to detect boundary points

c++,c,algorithm,point,area
I have a set of points in a 2D plane. I need to detect only the points that belong to the shape that borns from the union of this subset of points in order to cover the largest area: that is, the boundary points. The following figure is an example:...

## Check if Rectangle is between two points [closed]

java,point
If I have point A, point B and point C. In Java, how would I check if any of the rectangle is in-between the two points?

## Calculating floating points as binary

double,bit-manipulation,point,floating
The question is : x and y are two floating point numbers in 32-bit IEEE floating-point format (8-bit exponent with bias 127) whose binary representation is as follows: x: 1 10000001 00010100000000000000000 y: 0 10000010 00100001000000000000000 Compute their product z = x y and give the result in binary IEEE...

## What's a const variable inside? [duplicate]

c++,c,const,point
This question already has an answer here: Const variable changed with pointer in C 5 answers #include <stdio.h> int main() { const int a=1; printf("a's address is %p\r\n",&a); printf("input a's address\r\n"); int *p=NULL; //here let p point to a; scanf("%p",&p); printf("p point to %p\r\n",p); *p=100; // I suppose a...

## How is jitter determined in ggplot?

r,ggplot2,data-visualization,point,jitter
I was looking over the documentation on jitter in ggplot while making some plots, and I realized that I don't really understand the argument. It states that the arguments are: Width: degree of jitter in x direction. Defaults to 40% of the resolution of the data. and height: degree of...

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

java,field,point,getter
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...

## How to plot a sequence of points?

r,point
All info I found so far about R deals with more complex cases than I have. And I have dead simple list of points in form of XY coordinates. Now I would like to plot them, something like: plot(c(3.1,4.4),c(17.2, 5),c(13.0,7.1), ...) How to do it? I chose R because it...