Reputation: 746
I have a 3 dimensional array of bit values (either 0 or 1) representing the X, Y and Z axis (in the range of 0-99) of a cartesian cube. The entire array is initialized to all 0's.
Additionally I have a triangle of points within that cube identified by the following points.
TriangleA:
[
15, 22, 11,
86, 76, 67,
45, 51, 91
]
Marking those three points with a value of 1 would be easy. My question is this:
How would I mark all of the other coordinates of the surface identified by that triangle with a value of 1 as well?
Basically how would I implement the function:
public bool IsOnSurfaceOfTriangleA(x, y, z) {
// Math goes here! :)
}
Any help/suggestions would be greatly appreciated.
Upvotes: 0
Views: 215
Reputation: 746
I found this MatLab function that I was able to port over to C# -works great. Now I need to do this for a whole bunch of meshes all at once, so I'll post that in a separate question. Thanks for all your help!
Upvotes: 0