HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Classes | Namespaces | Macros | Enumerations | Functions | Variables
kite.cpp File Reference

Kite-and-dart tiling, both in R^2 and H^3. More...

#include "hyper.h"

Classes

struct  hr::kite::hrmap_kite
 

Namespaces

 hr
 

Macros

#define RULEFOR(sh0, dir0, z, dir1)   if(sh == sh0 && dir == dir0) { heptagon *at = of; if(z true) of->c.connect(dir0, at, dir1, false); }
 
#define GO(our, shape)   (at = at->cmove(our)) && getshape(at) == shape &&
 
#define GOIF(our, shape, their)   at->cmove(our) && at->c.spin(our) == their && getshape(at->move(our)) == shape && (at = at->move(our), true) &&
 

Enumerations

enum  pshape { pDart, pKite }
 

Functions

EX bool hr::kite::in ()
 
transmatrix hr::kite::meuscale (ld z)
 
transmatrix hr::kite::mspin (ld alpha)
 
transmatrix hr::kite::meupush (ld x, ld y)
 
hyperpoint hr::kite::mhpxy (ld x, ld y)
 
EX pshape hr::kite::getshape (heptagon *h)
 
EX hyperpoint hr::kite::get_corner (cell *c, int d, ld cf)
 
EX pair< vector< vector< hyperpoint > >, vector< vector< ld > > > hr::kite::make_walls ()
 
void hr::kite::print (hstream &hs, pshape sh)
 
EX hrmap * hr::kite::new_map ()
 
hrmap_kite * hr::kite::kite_map ()
 
void hr::kite::con (cell *c0, int d0, cell *c1, int d1)
 
EX void hr::kite::find_cell_connection (cell *c, int d)
 

Variables

const ld hr::kite::euscale = 0.5
 
const ld hr::kite::phi = (1 + sqrt(5)) / 2
 
const ld hr::kite::rphi = 1 / phi
 
const ld hr::kite::down = 1 / tan(36 * degree)
 
const ld hr::kite::up = 1 / tan(72 * degree)
 
const ld hr::kite::dart_center = (down + 2 * up) / 3
 
const ld hr::kite::kite_center = up
 
EX bool hr::kite::no_adj
 
auto hr::kite::hooksw = addHook(hooks_swapdim, 100, [] { if(kite::in() && currentmap) kite_map()->make_graphrules(); })
 

Detailed Description

Kite-and-dart tiling, both in R^2 and H^3.