1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-24 07:56:59 +00:00

renamed 'spiral' to 'spiral/ring' and added a comment

This commit is contained in:
Zeno Rogue 2019-04-03 20:32:03 +02:00
parent fd5dfd6b39
commit 9fece7b342
3 changed files with 20 additions and 2 deletions

View File

@ -583,7 +583,7 @@ const modelinfo models[int(mdPolynomial)+1] = {
{X3("Joukowsky transform"), mf::hyper_only | mf::conformal},
{X3("Joukowsky+inversion"), mf::hyper_only | mf::conformal},
{X3("rotated hyperboles"), mf::hyper_only},
{X3("spiral"), mf::hyper_or_torus | mf::quasiband},
{X3("spiral/ring"), mf::hyper_or_torus | mf::quasiband},
{X3("native perspective"), 0},
{X3("azimuthal equi-volume"), mf::azimuthal | mf::equivolume | mf::euc_boring},
{X3(""), 0},

View File

@ -912,7 +912,9 @@ namespace conformal {
if(pmodel == mdSpiral && !euclid) {
dialog::addSelItem(XLAT("spiral angle"), fts(spiral_angle), 'x');
dialog::add_action([](){
dialog::editNumber(spiral_angle, 0, 360, 15, 0, XLAT("spiral angle"), "");
dialog::editNumber(spiral_angle, 0, 360, 15, 0, XLAT("spiral angle"),
XLAT("set to 90° for the ring projection"
);
});
ld& which =

View File

@ -318,6 +318,8 @@ bool correct_side(const hyperpoint& H) {
return get_side(H) == spherespecial;
}
hyperpoint Hlast;
void fixpoint(glvertex& hscr, hyperpoint H) {
hyperpoint bad = H, good = goodpoint;
@ -366,6 +368,20 @@ void addpoint(const hyperpoint& H) {
}
hyperpoint Hscr;
applymodel(H, Hscr);
if(sphere && pmodel == mdSpiral) {
if(isize(glcoords)) {
hyperpoint Hscr1;
band_shift += 2 * M_PI;
applymodel(H, Hscr1);
using namespace hyperpoint_vec;
if(hypot_d(2, Hlast-Hscr1) < hypot_d(2, Hlast-Hscr)) { Hscr = Hscr1; }
band_shift -= 4 * M_PI;
applymodel(H, Hscr1);
if(hypot_d(2, Hlast-Hscr1) < hypot_d(2, Hlast-Hscr)) { Hscr = Hscr1; }
band_shift += 2 * M_PI;
}
Hlast = Hscr;
}
if(DIM == 2) {
for(int i=0; i<3; i++) Hscr[i] *= z;
Hscr[1] *= vid.stretch;