tes:: fixed a bug with apeirogonal tiles
This commit is contained in:
parent
754e774bcf
commit
aebcabb99c
|
@ -365,6 +365,7 @@ EX void load_tile(exp_parser& ep, arbi_tiling& c, bool unit) {
|
||||||
cc.symmetric_value = 0;
|
cc.symmetric_value = 0;
|
||||||
cc.flags = 0;
|
cc.flags = 0;
|
||||||
cc.repeat_value = 1;
|
cc.repeat_value = 1;
|
||||||
|
cc.apeirogonal = false;
|
||||||
bool is_symmetric = false;
|
bool is_symmetric = false;
|
||||||
while(ep.next() != ')') {
|
while(ep.next() != ')') {
|
||||||
cld dist = 1;
|
cld dist = 1;
|
||||||
|
|
|
@ -526,7 +526,7 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i
|
||||||
ld area = 0;
|
ld area = 0;
|
||||||
for(int j=0; j<cor; j++) {
|
for(int j=0; j<cor; j++) {
|
||||||
hyperpoint current = kleinize(actual[j]);
|
hyperpoint current = kleinize(actual[j]);
|
||||||
hyperpoint last = kleinize(actual[j?j-1:cor-1]);
|
hyperpoint last = kleinize(atmod(actual, j-1));
|
||||||
area += current[0] * last[1] - last[0] * current[1];
|
area += current[0] * last[1] - last[0] * current[1];
|
||||||
}
|
}
|
||||||
if(area < 0) dist = -dist;
|
if(area < 0) dist = -dist;
|
||||||
|
@ -535,19 +535,19 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i
|
||||||
int id = 0;
|
int id = 0;
|
||||||
arb::shape *sh = nullptr;
|
arb::shape *sh = nullptr;
|
||||||
if(arb::in()) {
|
if(arb::in()) {
|
||||||
int id = arb::id_of(c->master);
|
id = arb::id_of(c->master);
|
||||||
sh = &ac.shapes[id];
|
sh = &ac.shapes[id];
|
||||||
apeirogonal = sh->apeirogonal;
|
apeirogonal = sh->apeirogonal;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int j=0; j<cor; j++) {
|
for(int j=0; j<cor; j++) {
|
||||||
hyperpoint last = actual[j?j-1:cor-1];
|
hyperpoint last = atmod(actual, j-1);
|
||||||
hyperpoint current = ypush(1e-6 * randd()) * xpush(1e-6) * actual[j];
|
hyperpoint current = ypush(1e-7) * xpush(1e-6) * actual[j];
|
||||||
hyperpoint next = actual[j<cor-1?j+1:0];
|
hyperpoint next = atmod(actual, j+1);
|
||||||
|
|
||||||
if(apeirogonal) {
|
if(apeirogonal) {
|
||||||
if(j == 0) last = arb::get_adj(arb::current_or_slided(), id, cor-1, id, cor-2, false) * actual[cor-3];
|
if(j == 0) last = arb::get_adj(ac, id, cor-1, id, cor-2, false) * actual[cor-3];
|
||||||
if(j == cor-2) next = arb::get_adj(arb::current_or_slided(), id, cor-2, id, cor-1, false) * actual[1];
|
if(j == cor-2) next = arb::get_adj(ac, id, cor-2, id, cor-1, false) * actual[1];
|
||||||
if(j == cor-1) { cornerlist.push_back(sh->vertices.back()); continue; }
|
if(j == cor-1) { cornerlist.push_back(sh->vertices.back()); continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue