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

2D orientation test barycentric coordinates

If I have an ordered 3-tuple of points in integer barycentric coordinates, how do I test orientation on them? (I want to know if the points are collinear, form a left turn or a right turn) The "algorithm" has to be quite robust so I don't want to…
mrmax1
  • 15
  • 2
1
vote
1 answer

Estimating tilt angles of a body around three arbitrary axis

I know a rotation matrix (or quaternion) of a body in starting position and in end position. The body was tilted in between around three vectors which are known. Is there a way to estimate the angles the body was tilted around these vectors just by…
dgrat
  • 2,214
  • 4
  • 24
  • 46
1
vote
0 answers

Sweeping a B-rep body in 3D

Is it possible to sweep a BREP body along a curve? Are there any standard algorithms to do this? What I am trying to achieve is I have a body moving in 3D space. I want to generate a body out of the space which the moving body occupies during its…
Srikanth Muttavarapu
  • 756
  • 1
  • 10
  • 13
1
vote
1 answer

Maps api: check if a marker falls to the left or right of a polyline

I'm currently developing an app using maps API, I have a polyline that is that start as LatLnt one and ends at LatLng two creating a straight line. If I have a Marker that falls somewhere close to this polyline how would I tell if the marker is to…
1
vote
3 answers

How to Judge the Equality of 2 Triangular Meshes?

Given a triangular mesh A in 3D space. Rotate and translate all its points to generate a new mesh B. How to determine the equality of A and B, just by their vertices and faces? Topology of the mesh is not important, I only care about the geometric…
1
vote
0 answers

How to sort polygon edges

I'm using PyGTS to construct domain specific 3D geometry. It doesn't have binding to triangulation functions of GTS, so I'm using poly2try instead. I triangulate coplanar polygon with 6 vertices, then filter it's edges on number of faces that they…
skrat
  • 5,518
  • 3
  • 32
  • 48
1
vote
1 answer

Shortest distance between two polygonal lines

I'm trying to calculate the shortest distance between two polygonal lines. I had thought of using a sweep algorithm but I don't know what events to take into account because the vertical ray can intersect between two vertices, a vertex and an edge…
Paul94
  • 21
  • 1
1
vote
3 answers

cos^-1 in c++ wrong value

I am trying to get the degrees for angle a in my program but i am getting answers that are in the thousands and not related to a triangle. I cant seem to work it out. am I using cos^-1 correctly My formula is A=cos^(-1)⁡((b^2+c^2-a^2)/2bc) This is…
1
vote
1 answer

How can I use a diagonal line as a boundary?

Maybe I'm having a brainfart, it seems like this should be really simple. I've drawn a line in python using pygame: pygame.draw.line(screen, color, e.start, e.stop, 3) This draws a line on the object screen in the color color, from the tuple…
Rolan
  • 2,924
  • 7
  • 34
  • 46
1
vote
1 answer

Sorting points clockwise given triangulated mesh

Given a triangulated mesh (no self intersection, no holes, possibly concave) represented as an unordered list of triangles (list of 3 vertices) or rectangles (list of 4 vertices), i.e. [ [[x1, y1], [x2, y2], [x3, y3]], [[x4, y4], [x5, y5],…
Rufus
  • 5,111
  • 4
  • 28
  • 45
1
vote
1 answer

How do I find the Pareto-optimal points in O(nh) and O(nlog(h)) complexity?

Can anybody suggest an algorithm to find Pareto-optimal points (to form a staircase) just as given in diagram in O(n*h) and O(n*log(h)) time complexity, where h is the number of Pareto-optimal points? I used gift wrapping algorithm to solve this…
1
vote
2 answers

Given a convex polygon, add a point and recalculate the area

Assume you have a convex polygon P(defined by an array of points p), and a set of points S(all of them outside of P), how do you choose a point s in S such that it increases the most the area of P. Example I have a O(|P|) formula to calculate the…
1
vote
0 answers

Largest Area Axis-Aligned Rectangle Inside Convex Polygon

I am looking to find code or a data flow diagram that will describe the process for finding the largest-area axis aligned rectangle inside a convex polygon. I have looked at this post, and followed the suggested link to no avail. To date, I have…
ghubley
  • 11
  • 3
1
vote
1 answer

Calculate coordinates in different reference frames

I have a plane whose origin (ABC) and surface normal are defined in terms of a standard Cartesian coordinate system, XYZ. The plane is also constrained such that the line connecting the origin of the plane's coordinate system and the origin of the…
Thom DeCarlo
  • 159
  • 2
  • 12
1
vote
0 answers

Find the counts of all intersections in k-dimensions

Given an input set S of k-dimensional axis aligned rectangles, I would like to find all the k-dimensional intervals on which at least 2 k-dimensional rectangles overlap. If more than 2 k-dimensional rectangles overlap, I would like to find the count…
gohar94
  • 138
  • 1
  • 3
  • 11
1 2 3
99
100