Questions tagged [computational-geometry]

Problems involving meshes and other geometry representations, and manipulating, transforming, or extracting information from them; algorithms for solving geometrical problems such as computing intersections, filling holes, triangulating a shape, etc.

Computational geometry encompasses a wide variety of topics, including:

  • Modeling surfaces and solids using meshes, splines, and other geometry representations
  • Generating geometry from implicit or parametric functions, point sets, or other data
  • Processing geometry to extract information about orientation, topology, curvature, or other quantities
  • Performing operations on geometry such as tessellation or triangulation, simplification, CSG operations, feature extraction, UV mapping, and cleaning up mesh errors
187 questions
10
votes
2 answers

Reliable test for intersection of two Bezier curves

How to reliably find out whether two planar Bezier curves intersect? By "reliably" I mean the test will answer "yes" only when the curves intersect, and "no" only when they don't intersect. I don't need to know what parameters the intersection was…
Ecir Hana
  • 1,459
  • 11
  • 20
9
votes
1 answer

Find the longest straight line between two points on surface of polygon

My shape is a slightly concave polygon, and I'd like to know the maximal diameter. I imagine a straight line between two points on the surface of the polygon, such that the line does not pass outside the polygon. Is there a general algorithm for…
jiggunjer
  • 191
  • 3
8
votes
1 answer

Apply distortion to Bézier surface

I am trying to simulate the image warp effect, that is used in Adobe Photoshop. The rectangular image is warped according to a cubic Bézier surface (in 2D, all Z components are 0). Having any Bézier surface, vertical distortion $d \in[0,1]$ can be…
8
votes
1 answer

Computational Geometry - Triangulation

I'm trying to triangulate complex 3D objects, that may have holes in them. Now I tried going over the problem myself, after a few hours I didn't get anything that would work all of the time, so I've been searching around and without much luck. Does…
Aaron
  • 81
  • 1
7
votes
1 answer

How can I check if a polygon can completely contain a circle of a certain radius?

How can I check if a polygon (can also be irregular) can completely contain a circle of a certain radius? I do not want to actually draw a circle inside the polygon but just a boolean outcome whether or not it can be fit. I need this for an…
user7413
  • 123
  • 3
7
votes
0 answers

Bump mapping a ray-traced sphere

I'm attempting to apply a height map to a ray-traced sphere. The height map is stored as a texture. I have the intersection point on the sphere $p$, and I compute the normal vector at that point $N = normalize(p - c)$, where $c$ is the center of the…
7
votes
1 answer

Creating a mesh from a point cloud?

I'd like to create a mesh from a point cloud generated by video tracking, ideally using python for some kind of prototype at least. Initially I thought this is a fairly easy task, connecting the vertices, creating the faces, done ;) Then I've read…
p2or
  • 596
  • 1
  • 7
  • 15
7
votes
1 answer

Estimating the area of a triangle-circle intersection

I am trying to implement Ray Tracing with Cones (Amanatides 1984). Instead of rays, cones are shot into the scene and intersected with geometry. Since multiple triangles can occupy the cone's aperture, we need to calculate (or rather quickly…
7
votes
2 answers

OpenGL with SFML, create an n-pointed star?

Completely stuck on how to do this. Yes, it is a homework problem, but its the first we've had in the class so not too familiar with graphics. Also, seeing as its homework, please don't just give the answer, just some pointers in the right direction…
user2645
  • 71
  • 2
7
votes
2 answers

Best technique to draw overlapping colored line segments that follow the same route

I'm not too versed in computer graphics so my question may be vague. I'm given a sequence of GPS coordinates which I draw on an iOS map, and they define bus routes. Some of the bus routes happen to share sections of certain streets however, and when…
7
votes
1 answer

After a deformation operation on polygons, how can I check for and fix inverted polys?

I'm doing a quick and dirty automated deformation routine on a polygon body. If it was a tree, and my axis was in the center of the tree, I would like to bend the body by bending the axis. I would use a simple influencing algorithm to determine…
6
votes
1 answer

Radiative Transfer Equation for Photorealistic Rendering

I've recently become interested in photorealistic rendering, and I've been looking at the different rendering philosophies. I read this Disney Research bachelor's thesis, which states both the radiative transfer equation…
6
votes
1 answer

What's the difference between geometric surface normal and shading surface normal?

In my opinion, geometric surface normal is the cross product of triangle edge vectors, and shading surface normal is the interpolation of the predefined normals at the three vertexes. I used Mitsuba to render the geometric normal channel and the…
chaosink
  • 561
  • 1
  • 3
  • 13
6
votes
1 answer

List of triangles to minimum amount of convex polygons

I'm in search for an algorithm that takes the left side of the following graphic as an input and outputs a minimal amount of convex polygons as seen on the right side of the graphic. The input mesh can be very complex and could contain several…
Timm
  • 538
  • 2
  • 11
6
votes
3 answers

Computing a rotation: complex numbers vs rotation matrix

A 2D vector can be rotated by an angle $\theta$ using the rotation matrix: \begin{bmatrix} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} Or, it can be rotated by multiplying the vector by the complex number $c$: $$c =…
Vermillion
  • 297
  • 2
  • 7
1
2 3
12 13