From fcf55f1852accc48da476f67a441405d8e28efba Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 5 Aug 2021 12:21:39 +0200 Subject: [PATCH] arcm:: arcm_euclid_length parameter --- archimedean.cpp | 5 ++++- config.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/archimedean.cpp b/archimedean.cpp index 2993b105..873e69f6 100644 --- a/archimedean.cpp +++ b/archimedean.cpp @@ -14,6 +14,8 @@ EX namespace arcm { EX bool in() { return cgflags & qARCHI; } +EX ld euclidean_edge_length = .5; + #if HDR struct hr_archimedean_error : hr_exception { hr_archimedean_error(string _s) : hr_exception(_s) {} @@ -399,7 +401,6 @@ void archimedean_tiling::compute_geometry() { inradius.resize(N+1); inradius[N] = 0; circumradius.resize(N+1); circumradius[N] = 0; alphas.resize(N); - ld elmin = 0, elmax = hyperbolic ? 10 : sphere ? M_PI : 1; ld total = M_PI; @@ -410,6 +411,8 @@ void archimedean_tiling::compute_geometry() { ginf[geometry].g = get_geometry(fake::around / N); } + ld elmin = 0, elmax = hyperbolic ? 10 : sphere ? M_PI : 2 * euclidean_edge_length; + /* inradius[N] is used in farcorner and nearcorner. Probably a bug */ if(real_faces == 2) { diff --git a/config.cpp b/config.cpp index d3797083..81b3eaed 100644 --- a/config.cpp +++ b/config.cpp @@ -926,6 +926,8 @@ EX void initConfig() { #endif addsaver(slr::steps, "slr-steps"); addsaver(slr::range_xy, "slr-range-xy"); + + param_f(arcm::euclidean_edge_length, "arcm-euclid-length"); #if CAP_ARCM addsaver(arcm::current.symbol, "arcm-symbol", "4^5");