commit 4b4c217edb222e154a831e9c8ea2629bb9408f1a
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Thu Dec 31 22:58:36 2020 +0100

    Progress with the Kilominx - rotations.

diff --git a/src/main/java/org/distorted/main/RubikRenderer.java b/src/main/java/org/distorted/main/RubikRenderer.java
index 86cf0617..84b90247 100644
--- a/src/main/java/org/distorted/main/RubikRenderer.java
+++ b/src/main/java/org/distorted/main/RubikRenderer.java
@@ -40,9 +40,9 @@ public class RubikRenderer implements GLSurfaceView.Renderer, DistortedLibrary.E
 {
    public static final float BRIGHTNESS = 0.30f;
 
-   private RubikSurfaceView mView;
-   private DistortedScreen mScreen;
-   private Fps mFPS;
+   private final RubikSurfaceView mView;
+   private final DistortedScreen mScreen;
+   private final Fps mFPS;
    private boolean mErrorShown;
 
    private static class Fps
@@ -122,7 +122,7 @@ public class RubikRenderer implements GLSurfaceView.Renderer, DistortedLibrary.E
    @Override
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
       {
-      DistortedLibrary.setMax(EffectType.VERTEX,25);    // 24 Cube Quats + Rotate
+      DistortedLibrary.setMax(EffectType.VERTEX,61);    // 60 Minx Quats + Rotate
       VertexEffectRotate.enable();
       VertexEffectQuaternion.enable();
       BaseEffect.Type.enableEffects();
diff --git a/src/main/java/org/distorted/objects/Cubit.java b/src/main/java/org/distorted/objects/Cubit.java
index 899c4d7e..a7993a40 100644
--- a/src/main/java/org/distorted/objects/Cubit.java
+++ b/src/main/java/org/distorted/objects/Cubit.java
@@ -30,10 +30,9 @@ import org.distorted.main.RubikSurfaceView;
 class Cubit
   {
   private final Static3D mOrigPosition;
-
-  private TwistyObject mParent;
-  private Static3D mCurrentPosition;
-  private int mNumAxis;
+  private final Static3D mCurrentPosition;
+  private final TwistyObject mParent;
+  private final int mNumAxis;
 
   int mQuatIndex;
   int[] mRotationRow;
diff --git a/src/main/java/org/distorted/objects/FactoryCubit.java b/src/main/java/org/distorted/objects/FactoryCubit.java
index 65928a20..723210a9 100644
--- a/src/main/java/org/distorted/objects/FactoryCubit.java
+++ b/src/main/java/org/distorted/objects/FactoryCubit.java
@@ -698,9 +698,9 @@ class FactoryCubit
     float Y4= MINX_SC*H*(1/(2*MINX_C4) - MINX_C4);
 
     float[] vertices0 = { -X1, Y2, 0, -Y1, X1, Y2, 0, Y1 };
-    float[] bands0 = computeBands(0.04f,20,0.3f,0.2f,5);
+    float[] bands0 = computeBands(0.04f,17,0.3f,0.2f,5);
     float[] vertices1 = { -X2, Y4, 0, -Y3, X2, Y4, 0, Y3 };
-    float[] bands1 = computeBands(0.00f, 0,0.25f,0.5f,2);
+    float[] bands1 = computeBands(0.00f, 0,0.25f,0.5f,5);
 
     meshes[0] = new MeshPolygon(vertices0, bands0, 1, 1);
     meshes[0].setEffectAssociation(0, 1,0);
@@ -708,7 +708,7 @@ class FactoryCubit
     meshes[1].setEffectAssociation(0, 2,0);
     meshes[2] = meshes[0].copy(true);
     meshes[2].setEffectAssociation(0, 4,0);
-    meshes[3] = new MeshPolygon(vertices1, bands1, 0, 0);
+    meshes[3] = new MeshPolygon(vertices1, bands1, 1, 1);
     meshes[3].setEffectAssociation(0, 8,0);
     meshes[4] = meshes[3].copy(true);
     meshes[4].setEffectAssociation(0,16,0);
diff --git a/src/main/java/org/distorted/objects/TwistyMinx.java b/src/main/java/org/distorted/objects/TwistyMinx.java
index 14161130..25431887 100644
--- a/src/main/java/org/distorted/objects/TwistyMinx.java
+++ b/src/main/java/org/distorted/objects/TwistyMinx.java
@@ -45,17 +45,17 @@ public class TwistyMinx extends TwistyObject
   static final float C0 = (SQ5-1)/4;                       // cos(72 deg)
   static final float C1 = (SQ5+1)/4;                       // cos(36 deg)
   static final float C2 = (SQ5+3)/4;
-  static final float C3 = (float)(Math.sqrt(10-2*SQ5)/4);  // cos(54 deg)
+  static final float LEN= (float)(Math.sqrt(1.25f+0.5f*SQ5));
 
   // the six rotation axis of a RubikMegaminx. Must be normalized.
   static final Static3D[] ROT_AXIS = new Static3D[]
          {
-           new Static3D( C1/(2*C3), 1/(2*C3) , 0        ),
-           new Static3D(-C1/(2*C3), 1/(2*C3) , 0        ),
-           new Static3D( 0        , C1/(2*C3), 1/(2*C3) ),
-           new Static3D( 0        ,-C1/(2*C3), 1/(2*C3) ),
-           new Static3D( 1/(2*C3) , 0        , C1/(2*C3)),
-           new Static3D( 1/(2*C3) , 0        ,-C1/(2*C3))
+           new Static3D( C2/LEN, C1/LEN, 0      ),
+           new Static3D(-C2/LEN, C1/LEN, 0      ),
+           new Static3D( 0     , C2/LEN, C1/LEN ),
+           new Static3D( 0     ,-C2/LEN, C1/LEN ),
+           new Static3D( C1/LEN, 0     , C2/LEN ),
+           new Static3D( C1/LEN, 0     ,-C2/LEN )
          };
 
   private static final int MINX_LGREEN = 0xff53aa00;
@@ -319,14 +319,20 @@ public class TwistyMinx extends TwistyObject
     float S = 0.07f;
     float R = 0.09f;
 
+    float A = 0.86f;
     float X1= (SQ5+1)/8;
     float Y1= (float)(Math.sqrt(2+0.4f*SQ5)/4);
     float Y2= Y1 - (float)(Math.sqrt(10-2*SQ5)/8);
 
-    float[] vertices = { -X1, Y2, 0, -Y1, X1, Y2, 0, Y1 };
+    float[] vertices = { -X1, Y2, 0, -A*Y1, X1, Y2, 0, Y1 };
 
     FactorySticker factory = FactorySticker.getInstance();
     factory.drawRoundedPolygon(canvas, paint, left, top, vertices, S, FACE_COLORS[face], R);
+
+    float MID = TEXTURE_HEIGHT*0.5f;
+    float WID = TEXTURE_HEIGHT*0.1f;
+    float HEI = TEXTURE_HEIGHT*(0.47f+Y1);
+    canvas.drawLine(left+MID-WID,top+HEI,left+MID+WID,top+HEI,paint);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
