From c25e120c133b8dab96c3a2ce307c28e403ad9377 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 28 Jul 2020 16:44:02 +0200 Subject: [PATCH] fixed a freeze in Berger sphere primitive --- nonisotropic.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nonisotropic.cpp b/nonisotropic.cpp index b0811f5a..b445318c 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -2361,6 +2361,8 @@ EX namespace stretch { vector res; + ld SV = stretch::not_squared(); + if(stretch::factor == 0) { ld d = hypot_d(3, h); if(h[3] >= 1 || h[3] <= -1|| d == 0) return res; @@ -2375,8 +2377,17 @@ EX namespace stretch { return res; } + if(h[0] == 0 && h[1] == 0) { + ld a = atan2(h[2], h[3]); + + for(int it=-generations; it