Given a triangular plane formed by three points in R3 space {p1, p2, p3}, I want to iterate through all points on the triangle plane by using two variables, x0,y0, something like in this example: http://demonstrations.wolfram.com/DirectionalDerivativesIn3D/ The example in that website uses directional derivatives.
If this was in 2D, it is easy to iterate through the triangle, by using 2 for-loops (one each for x & y axis) and looping through a rectangular bounding box formed by that triangle. I could then use barycentric coordinates to isolate the points that fall within the triangle.
However, for 3D space, I have no clue how to do it. Any help or idea would be appreciated.