Questions tagged [marching-cubes]

An algorithm for creating a triangular mesh from a three-dimensional scalar field, or graphing an implicit function of the form f(x,y,z) = c.

Marching cubes is a computer graphics algorithm for creating a triangular mesh from a three-dimensional scalar field, or equivalently, graphing an implicit function of the form f(x,y,z) = c.

For more information, see:

144 questions
3
votes
1 answer

How to use marching squares for multiple contours?

how to make marching squares proceed after it finds the first contour? the contours in the image am working on are going to change quite often and because am in an embedded environment(android/ios) i would like a fast performance solution above…
Joseph
  • 1,458
  • 15
  • 20
3
votes
2 answers

How to smooth a mesh generated by Marching Cubes in real-time?

I'm now using the marching cubes algorithm for a project (real-time rendering of human teeth from CT images). Here is the rendering result: http://www.freeimagehosting.net/uploads/4c2e2c94be.jpg You can see that the mesh generated by MC is not so…
Kevin Zheng
  • 31
  • 1
  • 3
3
votes
1 answer

pcl::MarchingCubesRBF doesn't output mesh

I need to use Marching Cubes based on Radial Basis Function so I looked up this algorithm implemented in PCL. Actually I'm using PCL v1.6 so the function is: pcl::MarchingCubesRBF The problem is that it doesn't work, that is it doesn't create…
3
votes
0 answers

How can I optimize Marching Cubes algorithm? How can I combine similar groups of faces?

After 3-4 days of working on a 256 look up table for the marching cubes algorithm I finally have it working. Now That I have it working I want to try to optimize it. One thing I thought of is removing big flat areas with one float area. Example…
3
votes
3 answers

marching cubes efficiency- you can reduce 3/4rs of the edge calculations?

Normal marching cubes finds 12 edges per cube, but you can do 3 edges per cube, save the edges inside an array, and then go through the cubes again, referencing the edges from the cubes adjacent rather than calculating them. The process to reference…
bandybabboon
  • 2,210
  • 1
  • 23
  • 33
2
votes
1 answer

open source marching cubes algorithm in c++?

i am trying to use marching cubes to visualize molecular densities and i was wondering if there was a place on the web that has a open source libraries to do this. i have seen many people post their code online, but i don't want to "steal" code. i…
drjrm3
  • 4,474
  • 10
  • 53
  • 91
2
votes
1 answer

How to fill gaps between different level of detail in octree-marching cubes algorithm?

I'm trying to implement marching cubes on octrees. Here is a 2D drawing of what I am trying to figure out, it'll be easier to explain: Each node of the octree represent a square in the plane (or cube in space), and stores a value for the potential…
2
votes
1 answer

Marching Square algorithm in Python

The following Python source code is the implementation of Marching Square algorithm: import numpy as np import pandas as pd import matplotlib.pyplot as plt import math import cv2 from PIL import Image, ImageDraw class Square(): A = [0, 0] B…
user366312
  • 16,949
  • 65
  • 235
  • 452
2
votes
2 answers

Ambiguous cases in Marching square algorithm

If we take Wikipedia article on Marching square into account, we see that case#5 and case#10 are said to be ambiguous cases. I have implemented Marching Square as follows and I am not understanding how an ambiguous case can arise: public class…
user366312
  • 16,949
  • 65
  • 235
  • 452
2
votes
1 answer

Understanding Marching Square algorithm

The following picture is retrieved from Wikipedia: I haven't understood this part: I have two questions here: Where did they obtain [8,4,1,2] from and what did they want to tell us by that? Take a look at cell [0, 0] whose value is 13. If I go…
user366312
  • 16,949
  • 65
  • 235
  • 452
2
votes
0 answers

shortest path along skeletonized 3d mask

I have a 3D array with curved lines (skeletonized data) and need to find the shortest connecting path between two points on those lines. How do I find the shortest path between two points along a 3D skeleton array in Matlab? There are several…
Leo
  • 1,757
  • 3
  • 20
  • 44
2
votes
1 answer

Would like help finding resources to generate 3d metaballs using opengl

I'm looking to work with OpenGl and C++ to generate a procedural real-time metaball animation. Can anyone suggest a good resource/tutorial for generating metaballs, and/or implementing the marching cube algorithm. I've spent a fair amount of time…
zethraeus
  • 21
  • 1
2
votes
2 answers

How is raycasting used in 3D surface reconstruction?

I am working on 3D reconstruction algorithms for a project. I frequently come over the topics "ray-casting" and "marching-cubes" in the 3D surface reconstruction literature. I read that ray-casting on a "signed distance function (SDF)"…
Vinmean
  • 83
  • 1
  • 7
2
votes
3 answers

marching cubes, very small triangles

So I'm trying to generate terrain using marching cubes algorithm. At this point I'm implementing the diffuse lighting (fragment shader). I calculated normals for each vertex and got this: result The left side of the picture displays the normals (for…
viache
  • 51
  • 5
2
votes
0 answers

What is the best way to get dynamic data from an OpenGL compute shader?

currently I am writing a compute shader, which implements marching cubes. But I am still struggeling about some questions about how to get the triangle information or some other dynamic data out of the compute shader. In my opinion there are two…
DanceIgel
  • 714
  • 8
  • 25
1 2
3
9 10