Commit d95b4aaa authored by Sabrina Templeton's avatar Sabrina Templeton
Browse files

works for one iteration of one seed

parent 584b4eed
......@@ -195,7 +195,7 @@ void calc_poly(vec3 zi, vec3 zj, inout vec3[MAX_VERTS] curr_poly, int poly_space
}
//i believe this should be outside of the loop
curr_poly = new_poly; // does this need to be a deep copy? I don't think so.
//poly_space = 0; try without this for a sec
poly_space = 0; //try without this for a sec
//test if the intersect point works
//render_square(intersect, .02);
......@@ -214,9 +214,9 @@ main() {
// lookup the seed points, taking in glPrimitiveIDIn
vec3 p0 = vec3(texelFetch( seeds , gl_PrimitiveIDIn ).xy, 0);
//vec3 p1 = vec3(texelFetch( seeds , 0 ).xy, 0);
//render_square(p0, .01); // for some reason this line has to go first
//this is the initial poly
render_square(p0, .01);
if (p0 == vec3(0.25, 0.5 , 0.0)){ // this is for debugging purposes: REMOVE ONCE WE WANT TO EXPAND TO ACTUALLY COMPUTE FOR MORE THAN ONE SEED
//this is the initial poly
vec3 curr_poly1 = vec3(0, 0, 0);
vec3 curr_poly2 = vec3(1, 0, 0);
vec3 curr_poly3 = vec3(1, 1, 0);
......@@ -237,10 +237,10 @@ main() {
int space = 0;
render_square(curr_poly[0], .03);
render_square(curr_poly[1], .03);
render_square(curr_poly[2], .03);
render_square(curr_poly[3], .03);
// render_square(curr_poly[0], .03);
// render_square(curr_poly[1], .03);
// render_square(curr_poly[2], .03);
// render_square(curr_poly[3], .03);
//************************************************************************************************
//This is a test of the the intersect function. It works!!
// vec3 test_pt = calc_intersect(vec3(.3, .5, 0), vec3(.3, -.5, 0), vec3(0, .5, 0), vec3(0, -.5, 0));
......@@ -270,16 +270,20 @@ main() {
render_square(curr_poly[0], .01);
render_square(curr_poly[1], .01);
render_square(curr_poly[2], .01);
render_square(curr_poly[3], .01);
render_square(curr_poly[0], .02);
render_square(curr_poly[1], .02);
render_square(curr_poly[2], .02);
render_square(curr_poly[3], .02);
//render_square(vec3(0, 0, 0), .05);
//dist(vec3(0, 0, 0), vec3(5, 3, 0));
}
}
......
......@@ -93,11 +93,11 @@ UT_TEST_CASE( test1 )
// };
*/ //uncomment this to restore to random
std::vector<graphics::gl_float> seeds = {
0.05, 0.1 , 0.0,
0.05, 0.06 , 0.0,
0.03, 0.14 , 0.0,
0.11, 0.10 , 0.0,
0.0, 0.05 , 0.0,
0.25, 0.5 , 0.0,
0.25, 0.3 , 0.0,
0.15, 0.7 , 0.0,
0.55, 0.5 , 0.0,
0.01, 0.25 , 0.0,
1.0, 1.0 , 0.0,
1.0, 1.0 , 0.0,
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment