From 9cff432ceeb3bbc5ee15244683f8d1f9425e5918 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 7 Nov 2018 07:21:42 +0100 Subject: [PATCH] conformal formula accepts ux, uy, uz --- conformal.cpp | 2 +- hypgraph.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conformal.cpp b/conformal.cpp index 4125d969..bcc454a9 100644 --- a/conformal.cpp +++ b/conformal.cpp @@ -630,7 +630,7 @@ namespace conformal { XLAT( "This lets you specify the projection as a formula f. " "The formula has access to the value 'z', which is a complex number corresponding to the x,y coordinates in the currently selected model; " - "the point z is mapped to f(z). For 3D models (or 2D models if you prefer) you can also use parameters cx, cy, cz." + "the point z is mapped to f(z). You can also use the underlying coordinates ux, uy, uz." ) + "\n\n" + parser_help() ); dialog::reaction_final = [] () { diff --git a/hypgraph.cpp b/hypgraph.cpp index 56dd8075..b794d0c9 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -545,6 +545,9 @@ void applymodel(hyperpoint H, hyperpoint& ret) { ep.extra_params["cx"] = ret[0]; ep.extra_params["cy"] = ret[1]; ep.extra_params["cz"] = ret[2]; + ep.extra_params["ux"] = H[0]; + ep.extra_params["uy"] = H[1]; + ep.extra_params["uz"] = H[2]; ep.s = conformal::formula; cld res = ep.parse(); ret[0] = real(res);