Exemplo n.º 1
0
// TEMP - trying to see if i can uniformly generate a random number on a triangle
//        This works.
// TODO - try to generalize this to any triangle
void testBasicTriangle2D()
{
    Plot2D plot( output_path + "/test_basic_triangle_2d.png", plot_size, plot_size,
                 -0.1, 1.1, -0.1, 1.1 );

    float x, y;
    for( auto i = 0; i < points_per_plot; i++ ) {
        rng.uniformUnitTriangle2D( x, y );

        plot.addPoint( x, y );
    }
}