Questions tagged [algorithm]
Questions about the rigorous usage of instructions used to solve a specific computer graphics problem.
191
questions
1
vote
0
answers
35
views
How to get the shortest segment AB between 2 SDF (Signed distance field) in 3D?
Is there a method to find the shortest segment between 2 Signed distance field?
I know how to calculate this segment for a limited number of SDF like from sphere to sphere, from capsule to sphere, ...
1
vote
0
answers
41
views
Automating equirectangular horizon detection in 360 images
I would like to programatically identify pitch and roll numbers that will level the horizon on each frame in a series of equirectangular 360 panorama images.
Here's why. I recently ended up with a ...
1
vote
0
answers
26
views
How to morph a enclosing mesh according to the enclosed mesh?
I am quite new to meshing and mesh manipulation. I am working on a problem consiting of meshes $A$, $B$, and $C$. The mesh $C$ completely encloses the meshes $A$ and $B$ as shown in the attached ...
1
vote
1
answer
46
views
L-System to generate the Penrose P3 tiling
I am trying to write an L-System to generate the Penrose P3 tiling (with thin and thick rhombi, I will call them Rhombus-A and Rhombus-B.
For render, I am planning to use the following chars.
'+' ...
1
vote
1
answer
142
views
Constructing half-edges table from triangle list without hash
Motivation
I am trying to refine a mesh such that each triangle gets subdivided into 4 triangles, but I want the vertices to be shared. For that purpose I need a half-edge data structure so I can ...
0
votes
0
answers
31
views
Normal blend mode math
I have one question.
How to calculate source color after blending operation.
For example. I have
1 - Background color (r-115, g-94, b-67, a-1)
2 - Foreground color above background color, which ...
0
votes
1
answer
114
views
Extrapolating geometry across a triangle mesh?
Say you have 2 parametric cylinders represented as triangle meshes with very different geometries and you connect them together.
Is there a method that allows you to join them together such that the ...
1
vote
0
answers
64
views
Piecewise smoothing of a mesh?
Kobbelt et al. published a paper some 20 years ago where they specified how solving Poisson equations on the positions of a mesh lead to removing noise. This can be used for reconstructing mesh ...
0
votes
0
answers
20
views
How is re projection usually implemented in remeshing?
I was reading "Polygon Mesh Processing" and in chapter 5 the authors present this little algorithm:
...
2
votes
1
answer
58
views
What is a smart way to fill in the 'next' pointer of a opposite half-edge of a boundary?
I was reading this question regarding half edges from 3 years ago and the selected answer seemed pretty smart to me. However, while actually implementing it I'm confused at the part where I have to ...
0
votes
0
answers
68
views
What algorithms are typically used for finding 'PCB Trace'-like paths?
I am analyzing a large amount of Layers 0-4 Network Data. I am trying to render diagrams dynamically showing the Network Devices involved in the data (Desktop, Switch, Router, Server, etc.) and how ...
0
votes
1
answer
58
views
Why capsule box intersection algorithms not widely used
I have searched through a lot of libraries and sources, that include very diverse intersection algorithms, for computer graphics. And I've never found a capsule-box intersection algorithm. Despite ...
0
votes
2
answers
217
views
Relative coordinates -- cumulative sum
I have a vertex shader happily producing all the vertices I want for a 2D plot. Now I want to also render a plot of the same data, but each point relative to the previous one, like SVG Paths using <...
1
vote
1
answer
45
views
Are systems like double pendulum used for generating terrain?
Looking at the output of the angle of this double pendulum made me think this was a good candidate for generating realistic looking terrain profiles. I can't be the first to notice this so I was ...
4
votes
2
answers
856
views
Can you explain to me the Bresenham's line algorithm in simple terms?
I've been trying to wrap my head around this algorithm, and I need it for my drawing function. But I can't seem to understand it.
The Wikipedia page gives this piece of code right at the end:
...
4
votes
1
answer
344
views
How to find the nearest palette color when dithering in RGB
I maintain an image dithering library and command line tool. When I was initially developing the library, I was trying to figure out how to match dithered RGB values (containing quantization error or ...
3
votes
1
answer
247
views
Algorithms for rendering overlapping (floating) windows in 2D
I'm trying to figure out a solution to a problem that looked simple at first: how to render overlapping windows in a 2D windowing system. Originally I was thinking about implementing a text-based UI ...
1
vote
0
answers
93
views
Temporal reprojection of specular reflection - finding previous frame color
In specular reflection result depends on view vector from camera to point. Because of that, when doing temporal reprojection and reprojecting position of current fragment while camera is translating, ...
0
votes
1
answer
153
views
Plot inverse of emulated double-precision floats
I need to accurately plot a line chart using WebGL. The numbers have a precision of around 33 bits - that's too many to fit into a single-precision float's mantissa. WebGL does not support the double-...
4
votes
1
answer
2k
views
How to calculate volume of any given 3D mesh
Given 3D mesh with a closed surface. (solid object without hole).
I'm looking for an algorithm to calculate its volume.
There are several ideas, Such as
Voxelized and count voxels
Point cloud and ...
1
vote
0
answers
135
views
Turning colorized comic-art into uncolorized monochrome (line-art-inks-only B&W), not just very-light-grayscale
I'm trying to figure out how to go about removing the "colorization" of comic/cartoon/manga/etc drawn-art inputs where the black-ink strokes ("the line-art") are to be retained ...
1
vote
0
answers
47
views
Algorithm for transforming PNG anti-aliasing to smooth paths
I read the pixels of PNG files via libpng and creates an array of alpha channels (showing visible pixels for a monochromatic image).
int pixels[height][width];
<...
1
vote
0
answers
138
views
Extrusion Algorithm For Bezier Curves
I just posted this to SO but the question got closed, so I hope it's OK if I try it again here. They say "we don’t allow questions seeking recommendations for books, tools, software libraries&...
1
vote
1
answer
184
views
What does an algorithm which handles mesh-based image morphing look like?
In recent years, the technology of Live2D has become particularly popular and I have been attempting to find any papers or articles which explain what the mathematics for the mesh-based image morphing ...
2
votes
1
answer
510
views
Having trouble implementing distance transform with jump flood
I'm attempting to use the jump flood algorithm to compute distance transforms of an arbitrary texture derived from a canvas2d context, roughly following the explanations detailed here/here.
In the ...
1
vote
1
answer
71
views
How is the beam transmittance calculated in PBRT V3?
In pbrt v3, the book gives this description of beam transmittance, but I don't know how to solve the differential equation like it says to get Tr , can someone please tell me how to solve the ...
0
votes
0
answers
52
views
Efficient method of mapping any RGB tuple onto a list of RGB indices, is using some kind of partition plane viable?
Suppose we want to convert an RGB image into a paletted image. As an example, we may have a 1024x1024 image, and we want to map it onto 512 unique colors. All the colors are RGB. This is a problem of ...
2
votes
1
answer
127
views
How is raytracing performed in anisotropic media?
I wish to determine the path taken by a light ray between two points, $a$ and $b$, through an anisotropic medium. More specifically, this medium has an index of refraction which varies as an ...
1
vote
1
answer
133
views
wall clock using bresenhams circle drawing algo
I am new to CG and I need to draw a wall clock using bresenhams circle algo . I have drawn a circle using this algo but how do I add minute and hour needle in it basically how do i add lines inside a ...
0
votes
0
answers
59
views
Fractal dimension of landscape generated with Fournier's midpoint algorithm (recursive subdivision) is 2.0 no matter what. Why?
I am using Fournier's midpoint algorithm (recursive subdivision) to construct a landscape of 1025 x 1025 gridpoints, then I am using an advanced version of box counting to find fractal dimension, D. ...