Questions tagged [computational-geometry]

is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry.

The computational-geometry tag should be assigned to questions about computation and manipulation of locations or properties of geometric identities or objects. Since geometry computations are highly tolerance dependent, definition and computation of tolerances are welcome, too. Sample Questions are: How to compute line-line intersection on 3D? What is the better way of handling geometrical identities as data structures? How to compute volume of a solid? How to deform a solid? How to obtain parametric solids or surfaces?

2743 questions
1
vote
1 answer

Find largest circle that fits within a set of points given a starting point (numpy)

Given a starting point (82, 186) and a collection of surrounding points [(105, 186), (95, 157), (81, 159), (64, 173), (52, 188), (127, 195)], how can I determine the largest circle that will fit within those points? Note: The center need not be the…
ovg
  • 1,486
  • 1
  • 18
  • 30
1
vote
1 answer

How can I prove a lower bound that is \Omega{(n (logn)^k)} ? [k>1]

There are many algorithms run in O(n {log n}^k)-time, where k>1. It would be very helpful if you could provide me some reference about any problem that has: \Omega{(n {log n}^k)} lower bound, where k>1. I know that there are many examples for…
1
vote
1 answer

Efficient algorithm to find rectangles from lines?

Given a list of paths(with start and end coordinates) that are only horizontal and vertical, how can I find all the rectangles that they form? Details: The end points of the rectangle must be end-points of their constituent edges. i.e rectangles…
Veneet Reddy
  • 2,707
  • 1
  • 24
  • 40
1
vote
0 answers

Dual Contouring: Refactoring a complex head-recursion octree dual traversal algorithm to be iterative

Introduction: I have successfully implemented Dual Contouring of Hermite Data by Ju et. al. Dual Contouring is an approach to contour volumetric data obtained by adaptively sampling a signed distance field using an octree. The algorithm has two…
Jacques Nel
  • 581
  • 2
  • 11
1
vote
1 answer

Straight section of a digital curve

I have continuous digital curves that are close to a line segment, except maybe at both ends. How would you delimit the linear section (say remove the red parts) ? The solution needn't be very accurate, but fast.
user1196549
1
vote
0 answers

Nonclosed union of tetrahedra in CGAL

I have two tetrahedra T1 and T2 and I compute their union with CGAL. This is the result: Quite nice. To compute the union, I convert the tetrahedra to nefs and I use the union operator +. But now, I have a third tetrahedron T3, and I would like to…
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
1
vote
3 answers

Queries to figure out if point lies inside polygon

I have been given a strictly convex polygon of S sides and Q queries to process. All points of polygon and query points are given in (x,y) pairs.The points of the polygon are given in anti-clockwise order. The aforementioned variables are limited…
1
vote
1 answer

Rotating line sweep - sorting edges

I'm trying to implement Lee's visibility graph. There might be n number of polygons, where each side of the polygon is an edge. Let's say there is a point p1, and a half-liner parallel to the positive x-axis start at p1. I need to find edges that…
1
vote
2 answers

Trying to find 2D coordinates of point along straight line, given one coordinate

I have game object that moves along a path on a 2D plane, between 2 points (x1,y1) and (x2,y2). Occasionally it gets moved off the path and needs to be put back on it. When this happens I'll know the x-coordinate, but need to calculate the…
Rich
  • 29
  • 3
1
vote
3 answers

Hit-testing / finding intersection in a distorted rectangular mesh

I have a rectangular mesh that is represented as a bidimensional array of bidimensional points. Something like this (C#-inspired pseudo-code): Point2D[,] mesh = CreateSampleMesh(); mesh.Plot(); Important characteristics are: The mesh is…
1
vote
1 answer

Convert curved line between two points to straight connection

I have the two points p1 and p2 and the line l (black). The line is made of 100+ internal points arranged in an array starting from p1 and ending in p2. Now, I would like to convert the curved line to a "straight" line like the red line on the…
MortenGR
  • 803
  • 1
  • 8
  • 22
1
vote
1 answer

Overlapping segments in Bentley-Ottmann Algorithm

I'm trying to implement Bentley-Ottmann Algorithm according to description found in Mark de Berg, et al. Computational Geometry Algorithms and Applications Third Edition book. There is not clear statement about support of overlapping (collinear and…
user8044236
1
vote
2 answers

Distance between two lat/long points in Classic ASP

I have two pairs of latitude/longitude, and want to find the distance between them. I am stuck with using Classic ASP on this particular website. I found plenty of code examples using the Haversine equation, but not in ASP (which lacks the ACos…
Magnus Smith
  • 5,895
  • 7
  • 43
  • 64
1
vote
0 answers

How to generate multiple convex hulls to cover a 3D concave trimesh

I am working on a 3D physics simulation environment and have run into the problem of concave shapes being hard to model physically. I'm currently using Bullet Physics to do the heavy lifting and it does not support dynamic concave shapes at all. My…
koreus737
  • 661
  • 3
  • 9
  • 18
1
vote
2 answers

How do I calculate the area of a 3 dimensional projection?

For example, using the following code, I have a coordinate matrix with 3 cubical objects defined by 8 corners each, for a total of 24 coordinates. I apply a rotation to my coordinates, then delete the y coordinate to obtain a projection in the x-z…
g0dspl4y
  • 27
  • 1
  • 4