commit e46e17fb4629681f561b5d4ab79a5bb3d0baf9d7
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Sat Mar 21 19:16:39 2020 +0000

    Adjust rotation speed depending on the row (important in case of Pyraminx - there the top little tetrahedron must rotate much faster than the bottom big layer )

diff --git a/src/main/java/org/distorted/magic/RubikSurfaceView.java b/src/main/java/org/distorted/magic/RubikSurfaceView.java
index f468c391..81b03669 100644
--- a/src/main/java/org/distorted/magic/RubikSurfaceView.java
+++ b/src/main/java/org/distorted/magic/RubikSurfaceView.java
@@ -65,6 +65,7 @@ public class RubikSurfaceView extends GLSurfaceView
     private float mX, mY;
     private float mStartRotX, mStartRotY;
     private float mAxisX, mAxisY;
+    private float mRotationFactor;
 
     private static Static4D mQuatCurrent    = new Static4D(0,0,0,1);
     private static Static4D mQuatAccumulated= new Static4D(-0.25189602f,0.3546389f,0.009657208f,0.90038127f);
@@ -203,7 +204,7 @@ public class RubikSurfaceView extends GLSurfaceView
       // we have the length of 1D vector 'angle', now the direction:
       float tmp = mAxisY==0 ? -mAxisX*y : mAxisY*x;
 
-      return (tmp>0 ? 1:-1)*len;
+      return (tmp>0 ? 1:-1)*len*mRotationFactor;
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -305,13 +306,15 @@ public class RubikSurfaceView extends GLSurfaceView
                                            Static4D touchPoint2 = new Static4D(x, y, 0, 0);
                                            Static4D rotatedTouchPoint2= rotateVectorByInvertedQuat(touchPoint2, mQuatAccumulated);
 
-                                           Static2D rot = mMovement.newRotation(rotatedTouchPoint2);
+                                           Static2D res = mMovement.newRotation(rotatedTouchPoint2);
                                            RubikObject object = mRenderer.getObject();
 
-                                           int axis = (int)rot.get0();
+                                           int axis = (int)res.get0();
+                                           float offset = res.get1();
                                            computeCurrentAxis( object.getRotationAxis()[axis] );
+                                           mRotationFactor = object.returnRotationFactor(offset);
 
-                                           object.beginNewRotation( axis, object.returnRowFromOffset(rot.get1()) );
+                                           object.beginNewRotation( axis, object.returnRowFromOffset(offset) );
 
                                            if( RubikState.getCurrentState()==RubikState.SOLV )
                                              {
@@ -325,11 +328,7 @@ public class RubikSurfaceView extends GLSurfaceView
                                          }
                                        else if( mContinuingRotation )
                                          {
-                                         //Static4D touchPoint3 = new Static4D(x, y, 0, 0);
-                                         //Static4D rotatedTouchPoint3= rotateVectorByInvertedQuat(touchPoint3, mQuatAccumulated);
-
                                          float angle = continueRotation(x-mStartRotX,y-mStartRotY);
-                                         //float angle = mMovement.continueRotation(rotatedTouchPoint3);
                                          mRenderer.getObject().continueRotation(SWIPING_SENSITIVITY*angle);
                                          }
                                        else if( mDragging )
diff --git a/src/main/java/org/distorted/object/RubikCube.java b/src/main/java/org/distorted/object/RubikCube.java
index f1481922..ddb0a545 100644
--- a/src/main/java/org/distorted/object/RubikCube.java
+++ b/src/main/java/org/distorted/object/RubikCube.java
@@ -218,4 +218,11 @@ class RubikCube extends RubikObject
     {
     return (int)(getSize()*offset);
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public float returnRotationFactor(float offset)
+    {
+    return 1.0f;
+    }
 }
diff --git a/src/main/java/org/distorted/object/RubikObject.java b/src/main/java/org/distorted/object/RubikObject.java
index 1babaa64..39693027 100644
--- a/src/main/java/org/distorted/object/RubikObject.java
+++ b/src/main/java/org/distorted/object/RubikObject.java
@@ -473,4 +473,5 @@ public abstract class RubikObject extends DistortedNode
   public abstract Static3D[] getRotationAxis();
   public abstract int getBasicAngle();
   public abstract int returnRowFromOffset(float offset);
+  public abstract float returnRotationFactor(float offset);
   }
diff --git a/src/main/java/org/distorted/object/RubikPyraminx.java b/src/main/java/org/distorted/object/RubikPyraminx.java
index ac27c237..126fef72 100644
--- a/src/main/java/org/distorted/object/RubikPyraminx.java
+++ b/src/main/java/org/distorted/object/RubikPyraminx.java
@@ -310,4 +310,14 @@ public class RubikPyraminx extends RubikObject
     {
     return (int)(getSize()*offset/(SQ3/2));
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public float returnRotationFactor(float offset)
+    {
+    int size = getSize();
+    int row  = (int)(size*offset/(SQ3/2));
+
+    return ((float)size)/(size-row);
+    }
 }
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index a6062d85..d3c4dff7 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -26,7 +26,7 @@
     <string name="type">Type:</string>
     <string name="downloading">Downloading…</string>
     <string name="credits1">Open Source app developed using the Distorted graphics library. </string>
-    <string name="credits2">Code, tutorials, learn how to write your own graphics effect: <a href="http://www.distorted.org/cube">Distorted.org</a></string>
+    <string name="credits2">Code, tutorials, learn how to write your own graphics effect: <a href="https://distorted.org/redmine/projects/magic-cube/wiki">Distorted.org</a></string>
 
     <string name="ms_placeholder">%1$d ms</string>
     <string name="sc_placeholder">Scramble %1$d</string>
