HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Classes | Namespaces | Functions | Variables
archimedean.cpp File Reference

Archimedean tilings. More...

#include "hyper.h"

Classes

struct  hr::arcm::archimedean_tiling
 
struct  hr::arcm::hrmap_archimedean
 

Namespaces

 hr
 

Functions

EX bool hr::arcm::in ()
 
EX short & hr::arcm::id_of (heptagon *h)
 
EX short & hr::arcm::parent_index_of (heptagon *h)
 
EX int hr::arcm::neighbors_of (heptagon *h)
 
EX int hr::arcm::gcd (int x, int y)
 
heptagon * hr::arcm::build_child (heptspin p, pair< int, int > adj)
 
bool hr::arcm::skip_digons (heptspin hs, int step)
 
void hr::arcm::connect_digons_too (heptspin h1, heptspin h2)
 
void hr::arcm::fixup_matrix (transmatrix &T, const transmatrix &X, ld step)
 
void hr::arcm::connectHeptagons (heptspin hi, heptspin hs)
 
transmatrix hr::arcm::adjcell_matrix (heptagon *h, int d)
 
EX hrmap * hr::arcm::new_map ()
 
EX int hr::arcm::fix (heptagon *h, int spin)
 
int hr::arcm::readArgs ()
 
EX bool hr::arcm::pseudohept (cell *c)
 
EX bool hr::arcm::chessvalue (cell *c)
 
EX bool hr::arcm::linespattern (cell *c)
 
EX int hr::arcm::threecolor (cell *c)
 
EX void hr::arcm::next_variation ()
 
EX void hr::arcm::enable (archimedean_tiling &arct)
 
function< void()> hr::arcm::setcanvas (char c)
 
EX void hr::arcm::show ()
 
EX int hr::arcm::degree (heptagon *h)
 
EX bool hr::arcm::is_vertex (heptagon *h)
 
EX int hr::arcm::valence ()
 
EX map< gp::loc, cdata > & hr::arcm::get_cdata ()
 

Variables

EX archimedean_tiling hr::arcm::current
 
const int hr::arcm::MAX_EDGE_ARCM = FULL_EDGE
 
map< heptagon *, vector< pair< heptagon *, transmatrix > > > hr::arcm::altmap
 
EX map< heptagon *, pair< heptagon *, transmatrix > > hr::arcm::archimedean_gmatrix
 
EX hrmap * hr::arcm::current_altmap
 
auto hr::arcm::hook
 
auto hr::arcm::hooksw
 
int hr::arcm::cEucRegular = 0x008000
 
int hr::arcm::cEucSemiregular = 0x40C040
 
int hr::arcm::cPlatonic = 0x000080
 
int hr::arcm::cArchimedean = 0x4040C0
 
int hr::arcm::cPrism = 0x40A0A0
 
int hr::arcm::cAntiPrism = 0x80A0A0
 
int hr::arcm::cHyperRegular = 0x800000
 
int hr::arcm::cHyperSemi = 0xC04040
 
int hr::arcm::cWeird = 0xA000A0
 
vector< pair< string, int > > hr::arcm::samples
 
int hr::arcm::lastsample = 0
 
vector< archimedean_tiling > hr::arcm::tilings
 
int hr::arcm::spos = 0
 
archimedean_tiling hr::arcm::edited
 
bool hr::arcm::symbol_editing
 

Detailed Description

Archimedean tilings.

These are tilings available in the 'Archimedean' option in Geometry Experiments; simpler Archimedean tilings are defined in other files.

Function Documentation

◆ id_of()

EX short& hr::arcm::id_of ( heptagon h)

id of vertex in the archimedean tiling odd numbers = reflected tiles 0, 2, ..., 2(N-1) = as in the symbol 2N = bitruncated tile

◆ parent_index_of()

EX short& hr::arcm::parent_index_of ( heptagon h)

which index in id_of's neighbor list does h->move(0) have

◆ neighbors_of()

EX int hr::arcm::neighbors_of ( heptagon h)

total number of neighbors

◆ fixup_matrix()

void hr::arcm::fixup_matrix ( transmatrix T,
const transmatrix X,
ld  step 
)

T and X are supposed to be equal – move T so that it is closer to X

Variable Documentation

◆ MAX_EDGE_ARCM

const int hr::arcm::MAX_EDGE_ARCM = FULL_EDGE

mostly to protect the user from entering too large numbers

◆ hook

auto hr::arcm::hook
Initial value:
=
addHook(hooks_args, 100, readArgs)
+ addHook(hooks_gamedata, 0, [] (gamedata* gd) { gd->store(altmap); gd->store(archimedean_gmatrix); gd->store(current_altmap); })

◆ hooksw

auto hr::arcm::hooksw
Initial value:
= addHook(hooks_swapdim, 100, [] {
for(auto& p: altmap) for(auto& pp: p.second) swapmatrix(pp.second);
for(auto& p: archimedean_gmatrix) swapmatrix(p.second.second);
})