commit 769409d2c93b70eced7158b6e7952f729062b0fe
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Mar 9 19:08:46 2020 +0000

    The Pyraminx itself finished - now its movements!

diff --git a/src/main/java/org/distorted/object/RubikObject.java b/src/main/java/org/distorted/object/RubikObject.java
index 448acc98..84489486 100644
--- a/src/main/java/org/distorted/object/RubikObject.java
+++ b/src/main/java/org/distorted/object/RubikObject.java
@@ -97,7 +97,7 @@ public abstract class RubikObject extends DistortedNode
     mQuatAccumulated = quatAcc;
 
     Static3D center = new Static3D(0,0,0);
-    Static4D region = new Static4D(0,0,0,0.72f);
+    Static4D region = new Static4D(0,0,0,0.65f); // 0.72 for a Cube  // TODO
 
     mSinkEffect = new VertexEffectSink( new Static1D(getSinkStrength()), center, region );
     mScaleEffect = new MatrixEffectScale(mScale);
diff --git a/src/main/java/org/distorted/object/RubikPyraminx.java b/src/main/java/org/distorted/object/RubikPyraminx.java
index f4a35462..f02f0da4 100644
--- a/src/main/java/org/distorted/object/RubikPyraminx.java
+++ b/src/main/java/org/distorted/object/RubikPyraminx.java
@@ -107,10 +107,19 @@ public class RubikPyraminx extends RubikObject
     {
     int added = 0;
 
+    emitRow( x      +0.5f, y+SQ3*SQ2/9, z+ SQ3/18,  1.0f, 0,     0, n-1, 1, array, added);
+    added += (n-1);
+    emitRow( x    +1.0f/3, y+SQ3*SQ2/9, z+2*SQ3/9,  0.5f, 0, SQ3/2, n-1, 3, array, added);
+    added += (n-1);
+    emitRow( x+n-1-1.0f/3, y+SQ3*SQ2/9, z+2*SQ3/9, -0.5f, 0, SQ3/2, n-1, 2, array, added);
+    added += (n-1);
+
     for(int i=n; i>=1; i--)
       {
-      emitRow(x,y,z, 1,0,0, i, -1, array, added);
+      emitRow(x     , y, z      , 1,0,0, i  , -1, array, added);
       added += i;
+      emitRow(x+0.5f, y, z+SQ3/6, 1,0,0, i-1,  0, array, added);
+      added += (i-1);
       x += 0.5f;
       y += 0.0f;
       z += SQ3/2;
@@ -125,11 +134,17 @@ public class RubikPyraminx extends RubikObject
     {
     if( n>1 )
       {
-      emitRow( x     , y, z      ,  1.0f, 0,     0, n-1, -1, array, index);
+      emitRow( x           , y          , z        ,  1.0f, 0,     0, n-1, -1, array, index);
+      index += (n-1);
+      emitRow( x+0.5f      , y+SQ3*SQ2/9, z+SQ3/18 ,  1.0f, 0,     0, n-1,  1, array, index);
+      index += (n-1);
+      emitRow( x+0.5f      , y          , z+SQ3/2  ,  0.5f, 0, SQ3/2, n-1, -1, array, index);
+      index += (n-1);
+      emitRow( x    +1.0f/3, y+SQ3*SQ2/9, z+2*SQ3/9,  0.5f, 0, SQ3/2, n-1,  3, array, index);
       index += (n-1);
-      emitRow( x+0.5f, y, z+SQ3/2,  0.5f, 0, SQ3/2, n-1, -1, array, index);
+      emitRow( x+n-1       , y          , z        , -0.5f, 0, SQ3/2, n-1, -1, array, index);
       index += (n-1);
-      emitRow( x+n-1 , y, z      , -0.5f, 0, SQ3/2, n-1, -1, array, index);
+      emitRow( x+n-1-1.0f/3, y+SQ3*SQ2/9, z+2*SQ3/9, -0.5f, 0, SQ3/2, n-1,  2, array, index);
       index += (n-1);
       }
     else
@@ -148,7 +163,7 @@ public class RubikPyraminx extends RubikObject
 
   Static3D[] getCubitPositions(int size)
     {
-    int numCubits = size>1 ? 2*size*size-4*size+4:1;//4*size*size - 6*size +4 : 1;
+    int numCubits = size>1 ? 4*size*size - 6*size +4 : 1;
     Static3D[] tmp = new Static3D[numCubits];
     mRotArray = new int[numCubits];
 
@@ -192,7 +207,7 @@ public class RubikPyraminx extends RubikObject
     float OFF = STROKE/2 -1;
     float OFF2 = 0.5f*TEXTURE_HEIGHT + OFF;
     float HEIGHT = TEXTURE_HEIGHT - OFF;
-    float RADIUS = TEXTURE_HEIGHT/12;
+    float RADIUS = TEXTURE_HEIGHT/12.0f;
     float ARC1_H = 0.2f*TEXTURE_HEIGHT;
     float ARC1_W = TEXTURE_HEIGHT*0.5f;
     float ARC2_W = 0.153f*TEXTURE_HEIGHT;
@@ -231,13 +246,13 @@ public class RubikPyraminx extends RubikObject
     MatrixEffect[] effects0 = new MatrixEffect[3];
     effects0[0] = new MatrixEffectScale( new Static3D(1,SQ3/2,1) );
     effects0[1] = new MatrixEffectRotate( new Static1D(90), new Static3D(1,0,0), new Static3D(0,0,0) );
-    effects0[2] = new MatrixEffectMove( new Static3D(0,-SQ3/6,SQ3/12) );
+    effects0[2] = new MatrixEffectMove( new Static3D(0,-SQ3*SQ2/12,SQ3/12) );
 
     meshes[0].apply(effects0);
 
     Static1D angle = new Static1D(angleFaces);
     Static3D axis  = new Static3D(-1,0,0);
-    Static3D center= new Static3D(0,-SQ3/6,-SQ3/6);
+    Static3D center= new Static3D(0,-SQ3*SQ2/12,-SQ3/6);
 
     MatrixEffect[] effects1 = new MatrixEffect[5];
     effects1[0] = effects0[0];
