From 31a96fedf75cbd2a3475d73a2c4c3c502e023076 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Mon, 12 Dec 2022 17:39:57 +0100
Subject: [PATCH] Pyramid6 ditto

---
 Sample/HardParticle/Pyramid6.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Sample/HardParticle/Pyramid6.cpp b/Sample/HardParticle/Pyramid6.cpp
index 5dbfd26040d..a06441227dd 100644
--- a/Sample/HardParticle/Pyramid6.cpp
+++ b/Sample/HardParticle/Pyramid6.cpp
@@ -63,7 +63,7 @@ std::string Pyramid6::validate() const
     double bs = b / 2;
     double bc = b * sqrt(3) / 2;
 
-    double zcom = m_height * (.5 - 2 * r / 3 + r * r / 4) / (1 - r + r * r / 3); // center of mass
+    double zcom = m_height / 4 * (a * a + 2 * a * b + 3 * b * b) / (a * a + a * b + b * b);
 
     setPolyhedron(topology, -zcom,
                   {// base:
-- 
GitLab