Questions tagged [algorithm]
Questions about the rigorous usage of instructions used to solve a specific computer graphics problem.
9
questions
14
votes
1
answer
891
views
Why is it twice as expensive to make a noise function that can be tiled?
I've seen in several places that making Perlin noise loop seamlessly requires calculating it twice in slightly different ways, and summing the two results.
This Perlin noise math FAQ gives a formula:
...
9
votes
1
answer
5k
views
Understanding Jump Flooding Algorithm (JFA) for Voronoi Diagrams
I'm having trouble understanding the JFA. As far as I understood the algorithm, it walks log(n) times through every pixel (no matter if it is a seed or not) and looks at that pixel's neighbors in $(x+...
9
votes
1
answer
1k
views
How should I fill a shape consisting of Bezier curves and straight lines?
I have been working on a graphics library for some time now and have gotten to the point where I have to draw Bezier and line based fonts. Up to this point I am stuck with this:
The green lines are ...
8
votes
1
answer
896
views
How to implement a realtime 2D light renderer with fog/colored light on the GPU?
Since long ago I wanted to implement a 2D lightning algorithm based on an idea I saw on YouTube. The video is realtime, but it runs on the CPU and the resolution is pretty low. I'm curious if anyone ...
4
votes
4
answers
2k
views
How to build a 3d model from 2d pictures
I have a series of MRI images. I want to build a 3D model out of it, which not only presents the surface, but also contains the inside structures. What kind of photogrammetry based method can realize ...
3
votes
2
answers
1k
views
Finding the nearest neighbor of polygons
I have a set of non-convex polygons and I want to merge them. I am able to find the connection between two polygons. If there are more than two polygons, one connection can intersect another polygon ...
2
votes
1
answer
1k
views
Bresenham circle drawing algorithm, compute the distance?
In the Bresenham circle drawing algorithm, we have to choose between the top and bottom pixel, but what we always do is using the circle's equation ($f(x, y) = x^2 + y^2 = r^2$) to determine which of ...
1
vote
1
answer
832
views
How to handle Half edge boundary edge iteration from vertex?
Ok so let's say we have a portion of a mesh that looks somewhat like this:
A triangle fan with one of the triangles removed. If that triangles was not removed, we could get all the edges adjacent to ...
0
votes
2
answers
117
views
Rounding a 3D corner with Subdivisions
Following the instructions from this post on Stack Overflow, I have been able to find points A, B, and C from points V1, V2, and V3 and a radius value (code below). I would like to be able to find a ...