9
votes
Accepted
How to calculate the surface area of a mesh
Looking at the formula you're using, it looks like it's designed to calculate the area of a planar polygon, where the vertices are all in clockwise / counterclockwise order about the perimeter.
That'...
3
votes
Easy way to project point onto triangle (or plane)
There is an excellent answer to this question on the Math community of Stack Exchange: Determine if projection of 3D point onto plane is within a triangle. Which is, in turn, just a summary of this ...
2
votes
How to calculate plane corner vertices from plane origin point and plane normal?
Here's one way that I can think of to do it.
Find a point on the plane a other than the origin, o. The vector ...
2
votes
1
vote
How would I implement the edge loop function from Blender (and how does it work)?
I'll try to elaborate on how I understand what Freya Holmér is doing in the thread I linked.
This is based on a mesh representation called a "half-edge" data structure. (Though the exact ...
1
vote
Missing faces at ends of voxel chunks
Well, looking closely at your screenshot, the problem is occurring on every 16th cell in x and y.
Assuming your ...
1
vote
How does unity refer a to a normal when there are so many?
How Unity calculates the collision normals depends on the types of colliders involved.
It's worth noting that unity will offload all of this to a physics engine (primarily nVidia PhysX), so in a lot ...
1
vote
How to smooth a voxel mesh?
KdotJPG brings up a very good question. Is the volumetric data simply 0s and 1s, or are there intermediate values allowed as well?
Are you using Marching Cubes to convert the density data to triangles?...
1
vote
How to calculate plane corner vertices from plane origin point and plane normal?
I had to go through a similar situation lately, and here is something that might be more complete than the provided answer.
You provide a normal and the origin. Using the origin is a very specific ...
1
vote
Accepted
Recalculating normals on a tesselated cubed sphere with heightmap applied
Recalculating surface normals for a given triangle is simple:
Given a triangle is composed of 3 points (p0, p1, p2), The face normal(Nf) can be defined as:
...
1
vote
How to calculate the surface area of a mesh
Shamelessly building on DMGregorys answer..
You can also define this as an extension method for the Mesh class.
...
1
vote
Fastest visibility calculation towards all possible directions
Minecraft has to solve a similar problem for culling caves and other landscape features that are occluded from view.
There's a detailed write-up here about the Advanced Cave Culling Algorithm they ...
1
vote
Detecting single circle within multiple circles area
Another trick you can try is exploiting the Minkowski Difference.
First, combine all your background circles into a compound shape where they overlap, so you have a single sequence of arcs ...
1
vote
Detecting single circle within multiple circles area
The first case is as simple as checking whether the offset between the centres added to the radius of the contained circle, is less than the radius of the container circle.
Your second example on the ...
1
vote
Is there an algorithm to move vertices along a planar mesh to give an area more vertex without destroying the shape too much?
Some kind of optimization algorithm should do the trick.
I assume that this is not a time critical task, rather done during development or initialization, not during game play. Furthermore, that you ...
1
vote
Image-Space coherence of the z-buffer algorithm
There are two possibilities that occurred to me:
1) Triangles meshes are typically supplied in one of strip, fan, or indexed triangle lists. Since the first two automatically imply adjacency of (at ...
1
vote
Image-Space coherence of the z-buffer algorithm
The Z-Buffer algorithm itself does not use image-space coherence concept, it works exactly as we know. But the result of this algorith is quite coherent, which means that for any given pixel there's a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
computational-geometry × 65geometry × 23
3d × 9
c# × 7
collision-detection × 7
mathematics × 7
unity × 6
opengl × 6
algorithm × 6
3d-meshes × 6
2d × 5
mesh × 4
intersection × 4
c++ × 3
physics × 3
depth-buffer × 3
normals × 3
procedural-generation × 2
game-mechanics × 2
vector × 2
optimization × 2
terrain × 2
voxels × 2
data-structure × 2
linear-algebra × 2