diff --git a/config.cpp b/config.cpp index 09347700..83dc7b28 100644 --- a/config.cpp +++ b/config.cpp @@ -2293,6 +2293,10 @@ EX int config3 = addHook(hooks_configfile, 100, [] { addsaver(vid.fixed_facing_dir, "fixed facing dir", 90); param_b(vid.fixed_yz, "fixed YZ", true); param_b(draw_sky, "draw sky", true); + param_f(linepatterns::parallel_count, "parallel_count") + ->editable(0, 24, 1, "number of parallels drawn", "", 'n'); + param_f(linepatterns::parallel_max, "parallel_max") + ->editable(0, 360*degree, 15*degree, "last parallel drawn", "", 'n'); param_f(vid.depth, "depth", "3D depth", 1) ->editable(0, 5, .1, "Ground level below the plane", "", 'd') ->set_extra([] { diff --git a/pattern2.cpp b/pattern2.cpp index ec2427a7..48991b09 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -2899,12 +2899,19 @@ EX namespace linepatterns { } ) ); + EX ld parallel_count = 6; + EX ld parallel_max = 90 * degree; + EX ld parallel_length = 180 * degree; linepattern patParallels("parallels", 0xFFFFFF00, always_available, ATCENTER( - for(int i=-90; i<=90; i += 15) { + for(int i=-int(parallel_count); i<=parallel_count; i ++) { + ld phi = i * parallel_max / parallel_count; + ld xbase = 0; + if(!sphere) xbase = asin_auto((inverse(unshift(V)) * C0)[0]); + println(hlog, "xbase = ", xbase); for(int j=-180; j<180; j+=15) { for(int k=0; k<=15; k++) - curvepoint(xpush((j+k) * degree) * ypush0(i * degree)); + curvepoint(xpush(xbase + (j+k) * degree) * ypush0(phi)); queuecurve(V, col, 0, PPR::LINE).V=V; } }