Questions tagged [mesh]

Do NOT use for questions about mesh-networks. Use [mesh-network] instead. A mesh is a collection of vertices, edges, and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling.

From Wikipedia:
A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling. The faces usually consist of triangles, quadrilaterals or other simple convex polygons, since this simplifies rendering, but may also be composed of more general concave polygons, or polygons with holes. Check for more Mesh Detail

2225 questions
16
votes
5 answers

Algorithm or software for slicing a mesh

What is the right approach for slicing a 3D mesh? The mesh are all closed surfaces and the slices need to be binary images of what's inside the mesh. So for example, a mesh representing a sphere and slice images are those of filled circles. I am…
dr_rk
  • 3,901
  • 11
  • 41
  • 65
16
votes
3 answers

Decomposing a 3d mesh into a 2d net

Suppose you have a 3 dimensional object, represented as a 3d mesh in some common file format. How would you devise an algorithm to decompose the mesh into one or more 2d 'nets' - that is, a 2-dimensional representation that can be cut out and folded…
Nick Johnson
  • 98,961
  • 16
  • 125
  • 196
15
votes
2 answers

Algorithm for labeling edges of a triangular mesh

Introduction As part of a larger program (related to rendering of volumetric graphics), I have a small but tricky subproblem where an arbitrary (but finite) triangular 2D mesh needs to be labeled in a specific way. Already a while ago I wrote a…
Reunanen
  • 7,551
  • 2
  • 31
  • 55
15
votes
3 answers

Three.js - How can I calculate the distance between two 3D positions?

I've already tried searching several different things on Google. Doesn't seem like I'm able to find anything. Thought I might as well upload a question to Stack Overflow. Thanks!
user3490600
  • 225
  • 1
  • 3
  • 8
14
votes
1 answer

Can I hide faces of a mesh in three.js?

I want to make parts of a mesh invisible at runtime. Can I set these parts invisible/transparent, e.g. by changing attributes of single faces? The mesh itself uses only one material. Exemplary illustration as the editor understands this question:…
user1455053
  • 141
  • 1
  • 3
13
votes
2 answers

Coloring mesh edges in meshlab

I have been working on an algorithm that takes a mesh, does some fancy things with it, and produces some output. To visualize the result I decided to produce a copy of the mesh, colour it in a smart way that is somehow related to the produced…
John C
  • 233
  • 2
  • 7
13
votes
2 answers

Change the colors of a cube's faces

I actually found this question, but it says material.color doesn't exist. I need to know how to change the colors of the various faces of a cube I'm drawing: var newCube = new THREE.Mesh(new three.CubeGeometry(size, size, size), new…
David Gomes
  • 5,310
  • 16
  • 52
  • 96
12
votes
1 answer

Calculating normals between 2 meshes ending up in seams

My Task I currently creating a terrain for Unity3D which is specialized for mobile-devices with low memory for a running app. Allowing a terrain with a size of 15.000 x 15.000 kilometers and a height from -1.000 meters to 10.000 meters and it's only…
Felix K.
  • 5,963
  • 2
  • 33
  • 67
12
votes
2 answers

Secondary y-axis in matlab 3D plot (surf, mesh, surfc)

I am trying to add a secondary y-axis with different units to a 3D plot. [m2_array, ~ , ~] = F_readBin('amb.bin'); amb = m2_array(:,:,lat); surfc(light,'LineWidth',0.001); ylim([1 24]); xlim([1 size(light,2)]); title(['@…
Larusson
  • 237
  • 3
  • 18
11
votes
5 answers

Mesh to mesh intersections

I'm looking for a library or a paper that describes how to determine if one triangular mesh intersects another. Interestingly I am coming up empty. If there is some way to do it in CGAL, it is eluding me. It seems like it clearly should be possible,…
Doug McClean
  • 13,739
  • 4
  • 43
  • 68
11
votes
1 answer

How to create multiple Box and only change the texture on one side?

I'm trying to apply a texture to only one side of a Box Object. Basic code: BoxGeo = new THREE.BoxGeometry(50, 50, 125); BoxMat = new THREE.MeshLambertMaterial({ color: 0xF0F0F0 }); BoxObj = new THREE.Mesh(GeoBox, GeoMat); I tried using an array…
Jeremy Dicaire
  • 3,445
  • 6
  • 31
  • 59
11
votes
4 answers

How to map a point onto a warped grid

Say you have a collection of points with coordinates on a Cartesian coordinate system. You want to plot another point, and you know its coordinates in the same Cartesian coordinate system. However, the plot you're drawing on is distorted from the…
endolith
  • 21,410
  • 30
  • 114
  • 183
11
votes
3 answers

In Python, how do I voxelize a 3D mesh

I need help on getting started in Python (which I almost know nothing of) to voxelize a 3D mesh generated from Rhino. The data input will be a .OBJ file and so will the output. The ultimate purpose for this usage is to find the shortest distance…
FongYu
  • 693
  • 3
  • 14
  • 23
10
votes
2 answers

Sort a set of 3-D points in clockwise/counter-clockwise order

In 3-D space I have an unordered set of, say, 6 points; something like this: (A)* (C)* (E)* (F)* (B)* (D)* The points form a 3-D contour but they are unordered.…
CodificandoBits
  • 860
  • 9
  • 18
10
votes
1 answer

How to convert arrays of x,y,z coordinates to 3D path in numpy

Given three 1D arrays of X, Y and Z coordinates, how to convert into a 3D mesh path using numpy? I managed to do this for 2D using numpy (ie no for loops): import numpy def path_2d_numpy(x, y): m1, m2 = numpy.meshgrid(x, y) m1[1::2] =…
Tiago Coutinho
  • 1,410
  • 12
  • 16