mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-13 10:50:35 +00:00
more configuration for meridian/parallel patterns
This commit is contained in:
parent
0f9b30f51b
commit
b8f916df3a
@ -2690,6 +2690,13 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
|
|||||||
->editable(0, 24, 1, "number of parallels drawn", "", 'n');
|
->editable(0, 24, 1, "number of parallels drawn", "", 'n');
|
||||||
param_f(linepatterns::parallel_max, "parallel_max")
|
param_f(linepatterns::parallel_max, "parallel_max")
|
||||||
->editable(0, TAU, 15*degree, "last parallel drawn", "", 'n');
|
->editable(0, TAU, 15*degree, "last parallel drawn", "", 'n');
|
||||||
|
param_f(linepatterns::mp_ori, "mp_ori")
|
||||||
|
->editable(0, TAU, 15*degree, "parallel/meridian orientation", "", 'n');
|
||||||
|
param_f(linepatterns::meridian_max, "meridian_max");
|
||||||
|
param_f(linepatterns::meridian_count, "meridian_count");
|
||||||
|
param_f(linepatterns::meridian_length, "meridian_length");
|
||||||
|
param_f(linepatterns::meridian_prec, "meridian_prec");
|
||||||
|
param_f(linepatterns::meridian_prec2, "meridian_prec2");
|
||||||
|
|
||||||
param_f(twopoint_xscale, "twopoint_xscale");
|
param_f(twopoint_xscale, "twopoint_xscale");
|
||||||
param_i(twopoint_xshape, "twopoint_xshape");
|
param_i(twopoint_xshape, "twopoint_xshape");
|
||||||
|
21
pattern2.cpp
21
pattern2.cpp
@ -2963,12 +2963,23 @@ EX namespace linepatterns {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
EX ld mp_ori = 0;
|
||||||
|
EX ld meridian_max = 180._deg;
|
||||||
|
EX ld meridian_count = 12;
|
||||||
|
EX ld meridian_length = 90._deg;
|
||||||
|
EX ld meridian_prec = 12;
|
||||||
|
EX ld meridian_prec2 = 15;
|
||||||
EX linepattern patMeridians = linepattern("meridians", 0xFFFFFF00, always_available,
|
EX linepattern patMeridians = linepattern("meridians", 0xFFFFFF00, always_available,
|
||||||
ATCENTER(
|
ATCENTER(
|
||||||
for(int j=-180; j<=180; j+=15) {
|
for(int j=0; j<meridian_count; j++) {
|
||||||
for(int i=-90; i<90; i+=15) {
|
ld mj = meridian_max * (j * 2. / meridian_count - 1);
|
||||||
for(int k=0; k<=15; k++)
|
for(int i=0; i<meridian_prec; i++) {
|
||||||
curvepoint(xpush(j * degree) * ypush0((i+k) * degree));
|
for(int k=0; k<=meridian_prec2; k++) {
|
||||||
|
ld mi = i + k * 1. / meridian_prec2;
|
||||||
|
mi = mi * 2. / meridian_prec - 1;
|
||||||
|
mi *= meridian_length;
|
||||||
|
curvepoint(spin(mp_ori * degree) * xpush(mj) * ypush0(mi));
|
||||||
|
}
|
||||||
queuecurve(V, col, 0, PPR::LINE).V=V;
|
queuecurve(V, col, 0, PPR::LINE).V=V;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2986,7 +2997,7 @@ EX namespace linepatterns {
|
|||||||
println(hlog, "xbase = ", xbase);
|
println(hlog, "xbase = ", xbase);
|
||||||
for(int j=-180; j<180; j+=15) {
|
for(int j=-180; j<180; j+=15) {
|
||||||
for(int k=0; k<=15; k++)
|
for(int k=0; k<=15; k++)
|
||||||
curvepoint(xpush(xbase + (j+k) * degree) * ypush0(phi));
|
curvepoint(spin(mp_ori * degree) * xpush(xbase + (j+k) * degree) * ypush0(phi));
|
||||||
queuecurve(V, col, 0, PPR::LINE).V=V;
|
queuecurve(V, col, 0, PPR::LINE).V=V;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user