Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [algorithm]

The tag has no usage guidance.

0
votes
1answer
36 views

Bresenham's algorithm next pixel?

In line drawing, bresenham's algorithm was explicitly derived for lines with slopes between 0 and 1 in the first octant from point P1 to point P2, where the x value of P1 is less than that for P2. In ...
5
votes
1answer
653 views

Why are oct trees so much more common than hash tables?

When reading papers I commonly find Oct tree implementations of geometry representations to sort the data. However whenever I think about the problem hash tables seem better overall. Hash tables have ...
0
votes
0answers
22 views

What are some textbooks on color? [on hold]

I like to learn some basics (what exactly is hue), and to understand how different blending modes (in Photoshop) and color adjustments (inversion, contrast/brightness, exposure, etc) operate.
0
votes
1answer
43 views

Z-Buffer algorithm vs Painter's algorithm?

In hidden surface removal, how does the Z-buffer algorithm work vs. painter's algorithm?
1
vote
1answer
86 views

Flood-Fill and scanLine algorithms are line-based floods but I want square based floods

I have a flood-fill algorithm (Flood-fill) to fill a 24x24 matrix as follows (matrix is 24x24 here but will be much bigger in production): ...
2
votes
0answers
25 views

How can I register an articulated model to noisy predictions?

Given point sets $Y$ and $M$, I'd like to register articulated $M$ to $Y$ without changing the edge distances of $M$. The point correspondences between $Y$ and $M$ are known and points have a fixed ...
1
vote
0answers
34 views

Why the interval for which there are more number of steps is chosen while implementing DDA Algorithm?

I was studying the DDA Algorithm and learnt that initially we calculate both the x-difference and the y-difference between the start and the end points of the given line, and if dx > dy, we choose ...
1
vote
0answers
45 views

Deciphering Affine/Projective Transformation Code

I've spent about 2 days trying to understand this piece of code (from here) that applies an affine/projective transformation to an image. I will link bits of the code that I'm struggling to understand ...
2
votes
0answers
36 views

Cem Yuksel's “Mesh colors” implementation/demo?

Are you aware of any sample implementation or demo application of Cem Yuksel's "Mesh Colors" or "Mesh Color Textures" (http://www.cemyuksel.com/research/meshcolors/) ? The author does not provide any ...
1
vote
1answer
182 views

Feeding vertex data to a compute shader

I'm writing a CAD program in vulkan. In my current design, I have line paths represented as large vertex buffers for rendering. I would like to implement an algorithm for extruding the path outwards, ...
1
vote
1answer
86 views

How can I draw a filled circle on a grid with the less rectangle as possible?

I have a grid with a variable width/height spacing. Let's say 100 horizontal lines separated by 80 pixels and 100 hundred vertical lines separated by 50 pixels. Each cell of the grid in my logic have ...
1
vote
0answers
26 views

How are non-triangular wavefront meshes handled?

I have a wavefront loader, however it only works with triangular meshes. I have been trying to think how to handle faces with arbitrarily many vertices but I have no idea how they are to be handled ...
0
votes
0answers
17 views

How to map a subdivided cube into an array

Assume we start with an axis aligned cube at known origin/corner Origin with known dimension Dim. This cube is divided into 8 equally big cubes with length Dim/2 and corners Origin, Origin + (0,0,...
1
vote
1answer
96 views

How does the Painter's Algorithm handle transparency?

I was wondering if anyone could explain how the Painter's algorithm would handle transparent objects? Can the Painter's algorithm handle transparency?
3
votes
1answer
240 views

What is the use of epsilon in the Möller–Trumbore intersection algorithm?

The Möller–Trumbore intersection algorithm compares the determinant with an epsilon. What is this epsilon and how is its value chosen?
-1
votes
1answer
60 views

How to test my triangle intersection implementation?

I've been thinking about this question for a quite long time.And my implementation seems to be correct for some cases but wrong with few others. How can I comprehensive test the algorithm? Is there ...
1
vote
1answer
59 views

Quick 2-color quantization for small images

So I have a small (8x8 pixel) image in 24-bit color. I want to be able to (quickly) generate a color-quantized version of the image that only has two colors. One naive approach is to cluster a luma ...
4
votes
1answer
101 views

Can someone explain this formula for parse RGB to HSL?

Im trying to complain the algorithm to calculate the HSL value form a RGB color. I understand the algorithm for the Hue, but im lost with the Lightness and saturation. Someone can explain why? There ...
1
vote
0answers
59 views

How to guarantee rasterization of triangles in a voxel representation

There are 2 problems i am trying to solve involving rasterization of geometry in 3D. The first is, my 3D texture is created with a top down viewd, so triangles that are perfectly orthogonal to the ...
1
vote
0answers
36 views

Which vertices to use to create side of model

I hope I'm asking on the right StackExchange site. Apologies if I'm not. I want to generate 3D triangulated models of optical lenses, circular in shape. I can create the meshes for the front and back ...
1
vote
0answers
27 views

How to obtain a parametric equation out of a part designed in Autodesk Inventor?

Whenever you make a part in inventor, the software calculates de properties of the whole body given a constant density. Then, automatically, it shows the inertial tensor. As you can recall from math, ...
3
votes
1answer
123 views

How to smooth out a voxel grid?

So I am facing the following issue. Say I have a minecraft like mesh (i.e I have a bunch of cubes on top of one another). I wish to smooth out this mesh in such a way that only the regions where ...
2
votes
1answer
110 views

how to build the feature curves of this algorithm?

I hope this is the right group to be able to expose my doubts about the implementation of the algorithm shown in this article. The question I have is how to do the feature curves, what I do not ...
4
votes
1answer
206 views

Simple Intersection Algorithm for Ray and 3D Bézier Curves of Varying Thickness

I'm trying to get an algorithm for intersecting a "tube" (a 3D cubic Bézier curve extruded by a possibly-changing radius) with the following required properties: Computes intersections of ray and a ...
5
votes
1answer
213 views

How to calculate curvature of isoline of image

I've got a discrete grayscale image (a.k.a. 2D rectangular array of floats). Its continuous representation (whether received via reconstruction with sinc, with a cubic kernel, with a triangle kernel......
4
votes
2answers
669 views

How to modify Perlin (not simplex) noise to create continental like terrain generation

I have been playing around for a day with Perlin noise, and I am currently stuck. Most of the modifications I have made to the algorithm produce more or less the following: Now, this is a very good ...
4
votes
1answer
138 views

Help understanding Perlin Noise

I am following this tutorial: Understanding Perlin Noise | Blog To understand Perlin Noise. In particular, right now I am focusing on the following code section: ...
1
vote
1answer
59 views

Are there LOD Algorithms that work through removing objects?

I want to implement a LOD algorithm that reduces the number of objects rather than the number of vertices of the objects. Imagine a forest, then close up I want to see all the trees but moving away ...
3
votes
1answer
44 views

Calculate set of rectangles covering pixel diffs?

I'd like to develop a system for web animation similar to animated gifs, like this one. I capture a series of screenshots at fixed time intervals, and then I'd like to animate them. I can trivially ...
6
votes
1answer
197 views

Visualizing the Lane-Riesenfeld Algorithm

Ok so, I keep reading papers about this and non of them have pictures. The lane Riesenfeld algorithm provides a way to subdivide set of points with B-spline conversion. The quesiton is simple HOW? If ...
2
votes
0answers
56 views

Algorithm for 3D mesh model segmentation to chart

I'm trying to implement a segmentation model which will divide a 3d mesh model into charts. But I'm having really hard time to find resources in the web. The papers and some other places these ...
2
votes
1answer
129 views

What is a common approach to smooth structures in textures?

I have a screen-aligned texture resulting from multiple rendering passes. It looks about this: I want the edges to appear smoother than they do now (but still keep their characteristic shape). When ...
1
vote
1answer
54 views

Finding all possible reflection matrices for a given Wythoff construction

As a pet project, I'm trying to build a small app that visualizes 4D polytopes. I want to use the Wythoff Construction method, where the shape is generated kaleidoscopically by the interaction of 4 ...
1
vote
0answers
87 views

Algorithm for clipping convex quadrilaterals

I'm dealing with hardware that uses quads as its polygonal primitive. Not triangles. A triangle can be expressed by setting 2 of the 4 vertices equal to each other for a degenerate quad. For the 3D ...
4
votes
0answers
66 views

Slope Based Texturing

On the main page for Allegorithmic's Bitmap2Material, it mentions that the software uses a Slope Based approach over a Luminance Based approach. What exactly does this mean?
7
votes
1answer
137 views

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 ...
7
votes
1answer
547 views

Seamless Textures

I understand how an artist would make seamless textures by hand, but how can a computer program automate that process? Software like PixPlant is capable of doing this, but I don't understand how it ...
3
votes
1answer
117 views

Image resize with pixel accumulation?

I have a grayscale image and want to "resize" it in terms of "pixel concentration". That means I divide the source image x_old * y_old into ...
5
votes
1answer
116 views

How can I verify if a selection area is over a shape in SVG?

I'm creating an SVG editor. I have a simple selection tool that appears when I click and move my mouse from a blank area in my SVG. My SVG is populated with rectangles that can have a rotation ...
7
votes
2answers
209 views

Color transform algorithm (that also works on saturation and value/lightness)?

To change particular colors in an image, generally you multiply the RGB by a transformation matrix. Image manipulation programs such as gimp & photoshop have a selective color change function that ...
7
votes
2answers
506 views

Algorithms to Remove High Frequency Noise from Path Tracing

I have been working on my own renderer for a while, and I'm wondering if there's any way to remove the Monte Carlo noise from the rendered image, besides waiting for a long time for it to converge? ...
5
votes
1answer
251 views

Explanation of the Marching Squares saddle points resolution

I was reading the Wikipedia entry on Marching Squares, and was confused by the explanation of the saddle point disambiguation: Ambiguous Case: Basically, given the saddle points, the ambiguity is ...
4
votes
1answer
110 views

Image regeneration with nearest neighbor search

So what I would like to achieve is this: User submits Image 1 - this image is then broken down into X by X sized blocks User submits Image 2 - then the program/algorithm takes all the blocks ...
6
votes
0answers
105 views

Is there any open-source implementation of n*log(n) visibility graph construction algorithm?

Is there any open-source implementation of n*log(n) visibility graph construction algorithm? I'm trying to understand S. K. GHOSH and D. M. MOUNT sweep line algorithm, but it's known for having very ...
3
votes
3answers
1k 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 ...
4
votes
0answers
97 views

How can i achieve reflections like this?

I was in my elevator when i saw this... As you can see here that reflections are kind of stretched. What causes this? And how can we achieve something like this in computer graphics?
7
votes
1answer
893 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+...
4
votes
1answer
840 views

Workflow of the Naive Surface Nets algorithm

This question is comming from ComputerScience after suggestion I'm trying to understand the Naive Surface Nets algorithm which is related to surface generation out of Voxels. I've learned of it here ...
4
votes
1answer
137 views

Main techniques to draw a point at non integer coordinates?

I've difficulties in looking for an answer by myself because I don't know the jargon. I need somebody who'll points me in the right direction. Assume I have 100000 points with coordinates in the unit ...
1
vote
1answer
197 views

Calculating Skeleton-Deformed Mesh Normals

I'm implementing mesh skinning in a project of mine. I can calculate vertex positions based on bone transformations, but I've run into a problem with calculating their normals. From the resources I'...