Project

General

Profile

Download (19.5 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / objects / RubikDino.java @ 1576f41c

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.objects;
21

    
22
import android.content.res.Resources;
23
import android.graphics.Canvas;
24
import android.graphics.Paint;
25

    
26
import org.distorted.library.effect.MatrixEffectMove;
27
import org.distorted.library.effect.MatrixEffectQuaternion;
28
import org.distorted.library.effect.MatrixEffectRotate;
29
import org.distorted.library.effect.MatrixEffectScale;
30
import org.distorted.library.effect.VertexEffectDeform;
31
import org.distorted.library.effect.VertexEffectMove;
32
import org.distorted.library.effect.VertexEffectRotate;
33
import org.distorted.library.effect.VertexEffectScale;
34
import org.distorted.library.main.DistortedEffects;
35
import org.distorted.library.main.DistortedTexture;
36
import org.distorted.library.mesh.MeshBase;
37
import org.distorted.library.mesh.MeshJoined;
38
import org.distorted.library.mesh.MeshPolygon;
39
import org.distorted.library.mesh.MeshSquare;
40
import org.distorted.library.type.Static1D;
41
import org.distorted.library.type.Static3D;
42
import org.distorted.library.type.Static4D;
43
import org.distorted.main.RubikSurfaceView;
44

    
45
import java.util.Random;
46

    
47
import static org.distorted.effects.scramble.ScrambleEffect.START_AXIS;
48

    
49
///////////////////////////////////////////////////////////////////////////////////////////////////
50

    
51
public class RubikDino extends RubikObject
52
{
53
  private static final float SQ2 = (float)Math.sqrt(2);
54
  private static final float SQ3 = (float)Math.sqrt(3);
55
  private static final float ANGLE_FACES = (float)((180/Math.PI)*(2*Math.asin(SQ3/3))); // angle between two faces of a tetrahedron
56

    
57
  // the four rotation axis of a RubikDino. Must be normalized.
58
  static final Static3D[] ROT_AXIS = new Static3D[]
59
         {
60
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
61
           new Static3D(+SQ3/3,+SQ3/3,-SQ3/3),
62
           new Static3D(+SQ3/3,-SQ3/3,+SQ3/3),
63
           new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
64
         };
65

    
66
  // the six axis that determine the faces
67
  static final Static3D[] FACE_AXIS = new Static3D[]
68
         {
69
           new Static3D(1,0,0), new Static3D(-1,0,0),
70
           new Static3D(0,1,0), new Static3D(0,-1,0),
71
           new Static3D(0,0,1), new Static3D(0,0,-1)
72
         };
73

    
74
  private static final int[] FACE_COLORS = new int[]
75
         {
76
           0xffffff00, 0xffffffff,   // FACE_AXIS[0] (right-YELLOW) FACE_AXIS[1] (left  -WHITE)
77
           0xff0000ff, 0xff00ff00,   // FACE_AXIS[2] (top  -BLUE  ) FACE_AXIS[3] (bottom-GREEN)
78
           0xffff0000, 0xffb5651d    // FACE_AXIS[4] (front-RED   ) FACE_AXIS[5] (back  -BROWN)
79
         };
80

    
81
  // All legal rotation quats of a RubikDino
82
  private static final Static4D[] QUATS = new Static4D[]
83
         {
84
           new Static4D(  0.0f,  0.0f,  0.0f,  1.0f ),
85
           new Static4D(  0.5f,  0.5f,  0.5f, -0.5f ),
86
           new Static4D(  0.0f,  0.0f,  1.0f,  0.0f ),
87
           new Static4D(  0.5f, -0.5f, -0.5f, -0.5f ),
88
           new Static4D(  0.5f,  0.5f,  0.5f,  0.5f ),
89
           new Static4D(  0.5f,  0.5f, -0.5f, -0.5f ),
90
           new Static4D(  0.5f, -0.5f,  0.5f, -0.5f ),
91
           new Static4D(  0.5f, -0.5f, -0.5f,  0.5f ),
92
           new Static4D(  0.0f,  1.0f,  0.0f,  0.0f ),
93
           new Static4D(  0.5f, -0.5f,  0.5f,  0.5f ),
94
           new Static4D(  1.0f,  0.0f,  0.0f,  0.0f ),
95
           new Static4D(  0.5f,  0.5f, -0.5f,  0.5f )
96
         };
97

    
98
  // centers of the 12 edges. Must be in the same order like QUATs above.
99
  private static final Static3D[] CENTERS = new Static3D[]
100
         {
101
           new Static3D( 0.0f, 1.5f, 1.5f ),
102
           new Static3D( 1.5f, 0.0f, 1.5f ),
103
           new Static3D( 0.0f,-1.5f, 1.5f ),
104
           new Static3D(-1.5f, 0.0f, 1.5f ),
105
           new Static3D( 1.5f, 1.5f, 0.0f ),
106
           new Static3D( 1.5f,-1.5f, 0.0f ),
107
           new Static3D(-1.5f,-1.5f, 0.0f ),
108
           new Static3D(-1.5f, 1.5f, 0.0f ),
109
           new Static3D( 0.0f, 1.5f,-1.5f ),
110
           new Static3D( 1.5f, 0.0f,-1.5f ),
111
           new Static3D( 0.0f,-1.5f,-1.5f ),
112
           new Static3D(-1.5f, 0.0f,-1.5f )
113
         };
114

    
115
  private static final int[] mFaceMap = {2,4, 4,0, 3,4, 4,1,
116
                                         0,2, 0,3, 1,3, 1,2,
117
                                         2,5, 5,0, 3,5, 5,1 };
118

    
119
  private static MeshBase mMesh;
120

    
121
///////////////////////////////////////////////////////////////////////////////////////////////////
122

    
123
  RubikDino(int size, Static4D quat, DistortedTexture texture,
124
            MeshSquare mesh, DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
125
    {
126
    super(size, 60, quat, texture, mesh, effects, moves, RubikObjectList.DINO, res, scrWidth);
127
    }
128

    
129
///////////////////////////////////////////////////////////////////////////////////////////////////
130

    
131
  private MeshBase createTetrahedronMesh()
132
    {
133
    final int MESHES=4;
134

    
135
    int association = 1;
136

    
137
    float D = 0.005f;
138
    float E = 0.5f - D*SQ2;
139
    float F = 0.5f - D*SQ2*SQ3;
140
    float[] bands = { 1.0f    ,-D,
141
                      1.0f-D/2,-D*0.55f,
142
                      1.0f-D  ,-D*0.25f,
143
                      1.0f-2*D,+D*0.25f,
144
                      0.50f, 0.040f,
145
                      0.0f, 0.045f };
146

    
147
    float[] vertices = { -F,-E, +F,-E, 0.0f,E-D*SQ2};
148

    
149
    MeshBase[] meshes = new MeshPolygon[MESHES];
150
    meshes[0] = new MeshPolygon(vertices, bands, 2, 3);
151
    meshes[0].setEffectAssociation(0,association,0);
152

    
153
    for(int i=1; i<MESHES; i++)
154
      {
155
      association <<= 1;
156
      meshes[i] = meshes[0].copy(true);
157
      meshes[i].setEffectAssociation(0,association,0);
158
      }
159

    
160
    MeshBase result = new MeshJoined(meshes);
161

    
162
    Static3D a0 = new Static3D(         0,        1,       0 );
163
    Static3D a1 = new Static3D(         0,  -1.0f/3, 2*SQ2/3 );
164
    Static3D a2 = new Static3D(-SQ2*SQ3/3,  -1.0f/3,  -SQ2/3 );
165
    Static3D a3 = new Static3D( SQ2*SQ3/3,  -1.0f/3,  -SQ2/3 );
166

    
167
    float tetraHeight = SQ2*SQ3/3;
168
    float d1 = 0.75f*tetraHeight;
169
    float d2 =-0.10f*tetraHeight;
170
    float d3 =-0.05f*tetraHeight;
171
    float d4 = 0.15f*tetraHeight;
172

    
173
    Static3D dCen0 = new Static3D( d1*a0.get0(), d1*a0.get1(), d1*a0.get2() );
174
    Static3D dCen1 = new Static3D( d1*a1.get0(), d1*a1.get1(), d1*a1.get2() );
175
    Static3D dCen2 = new Static3D( d1*a2.get0(), d1*a2.get1(), d1*a2.get2() );
176
    Static3D dCen3 = new Static3D( d1*a3.get0(), d1*a3.get1(), d1*a3.get2() );
177

    
178
    Static3D dVec0 = new Static3D( d3*a0.get0(), d3*a0.get1(), d3*a0.get2() );
179
    Static3D dVec1 = new Static3D( d3*a1.get0(), d3*a1.get1(), d3*a1.get2() );
180
    Static3D dVec2 = new Static3D( d2*a2.get0(), d2*a2.get1(), d2*a2.get2() );
181
    Static3D dVec3 = new Static3D( d2*a3.get0(), d2*a3.get1(), d2*a3.get2() );
182

    
183
    Static4D dReg  = new Static4D(0,0,0,d4);
184
    Static1D dRad  = new Static1D(1);
185

    
186
    Static1D angle  = new Static1D(ANGLE_FACES);
187
    Static3D axis1  = new Static3D(  -1, 0,      0);
188
    Static3D axis2  = new Static3D(0.5f, 0, -SQ3/2);
189
    Static3D axis3  = new Static3D(0.5f, 0, +SQ3/2);
190
    Static3D center1= new Static3D(0,-SQ3*SQ2/12,-SQ3/6);
191
    Static3D center2= new Static3D(0,-SQ3*SQ2/12,+SQ3/3);
192

    
193
    VertexEffectScale   effect1 = new VertexEffectScale ( new Static3D(1,SQ3/2,1) );
194
    VertexEffectRotate  effect2 = new VertexEffectRotate( new Static1D(90), new Static3D(1,0,0), new Static3D(0,0,0) );
195
    VertexEffectMove    effect3 = new VertexEffectMove  ( new Static3D(0,-SQ3*SQ2/12,SQ3/12) );
196
    VertexEffectRotate  effect4 = new VertexEffectRotate( new Static1D(180), new Static3D(0,0,1), center1 );
197
    VertexEffectRotate  effect5 = new VertexEffectRotate( angle, axis1, center1 );
198
    VertexEffectRotate  effect6 = new VertexEffectRotate( angle, axis2, center2 );
199
    VertexEffectRotate  effect7 = new VertexEffectRotate( angle, axis3, center2 );
200

    
201
    VertexEffectDeform  effect8 = new VertexEffectDeform(dVec0, dRad, dCen0, dReg);
202
    VertexEffectDeform  effect9 = new VertexEffectDeform(dVec1, dRad, dCen1, dReg);
203
    VertexEffectDeform  effect10= new VertexEffectDeform(dVec2, dRad, dCen2, dReg);
204
    VertexEffectDeform  effect11= new VertexEffectDeform(dVec3, dRad, dCen3, dReg);
205

    
206
    effect4.setMeshAssociation(14,-1);  // apply to mesh[1], [2] and [3]
207
    effect5.setMeshAssociation( 2,-1);  // apply only to mesh[1]
208
    effect6.setMeshAssociation( 4,-1);  // apply only to mesh[2]
209
    effect7.setMeshAssociation( 8,-1);  // apply only to mesh[3]
210

    
211
    result.apply(effect1);
212
    result.apply(effect2);
213
    result.apply(effect3);
214
    result.apply(effect4);
215
    result.apply(effect5);
216
    result.apply(effect6);
217
    result.apply(effect7);
218
    result.apply(effect8);
219
    result.apply(effect9);
220
    result.apply(effect10);
221
    result.apply(effect11);
222

    
223
    result.mergeEffComponents();
224

    
225
    return result;
226
    }
227

    
228
///////////////////////////////////////////////////////////////////////////////////////////////////
229

    
230
  private void createBasicMesh()
231
    {
232
    mMesh = createTetrahedronMesh();
233

    
234
    Static3D axis = new Static3D(1,0,0);
235
    Static3D cent = new Static3D(0,0,0);
236

    
237
    MatrixEffectMove   moveEffect = new MatrixEffectMove  ( new Static3D(0.0f,SQ3*SQ2/12,SQ3/6) );
238
    MatrixEffectRotate rot1Effect = new MatrixEffectRotate( new Static1D(180+ANGLE_FACES/2), axis, cent);
239
    MatrixEffectScale  scalEffect = new MatrixEffectScale ( new Static3D(3.0f, 3*SQ2/2, 1.5f) );
240
    MatrixEffectRotate rot2Effect = new MatrixEffectRotate( new Static1D(-45), axis, cent);
241

    
242
    mMesh.apply(moveEffect, 0xffffffff, 0);
243
    mMesh.apply(rot1Effect, 0xffffffff, 0);
244
    mMesh.apply(scalEffect, 0xffffffff, 0);
245
    mMesh.apply(rot2Effect, 0xffffffff, 0);
246
    }
247

    
248
///////////////////////////////////////////////////////////////////////////////////////////////////
249

    
250
  float getScreenRatio()
251
    {
252
    return 0.5f;
253
    }
254

    
255
///////////////////////////////////////////////////////////////////////////////////////////////////
256

    
257
  Static4D[] getQuats()
258
    {
259
    return QUATS;
260
    }
261

    
262
///////////////////////////////////////////////////////////////////////////////////////////////////
263

    
264
  int getNumFaces()
265
    {
266
    return FACE_COLORS.length;
267
    }
268

    
269
///////////////////////////////////////////////////////////////////////////////////////////////////
270

    
271
  int getNumCubitFaces()
272
    {
273
    return 4;
274
    }
275

    
276
///////////////////////////////////////////////////////////////////////////////////////////////////
277

    
278
  Static3D[] getCubitPositions(int size)
279
    {
280
    return CENTERS;
281
    }
282

    
283
///////////////////////////////////////////////////////////////////////////////////////////////////
284

    
285
  MeshBase createCubitMesh(int cubit)
286
    {
287
    if( mMesh==null ) createBasicMesh();
288

    
289
    MeshBase mesh = mMesh.copy(true);
290
    MatrixEffectQuaternion quat = new MatrixEffectQuaternion( QUATS[cubit], new Static3D(0,0,0) );
291
    mesh.apply(quat,0xffffffff,0);
292

    
293
    return mesh;
294
    }
295

    
296
///////////////////////////////////////////////////////////////////////////////////////////////////
297

    
298
  int getFaceColor(int cubit, int cubitface, int size)
299
    {
300
    switch(cubitface)
301
      {
302
      case 0 : return mFaceMap[2*cubit];
303
      case 1 : return mFaceMap[2*cubit+1];
304
      default: return NUM_FACES;
305
      }
306
    }
307

    
308
///////////////////////////////////////////////////////////////////////////////////////////////////
309

    
310
  void createFaceTexture(Canvas canvas, Paint paint, int face, int left, int top, int side)
311
    {
312
    float STROKE = 0.044f*side;
313
    float OFF = STROKE/2 -1;
314
    float OFF2 = 0.5f*side + OFF;
315
    float HEIGHT = side - OFF;
316
    float RADIUS = side/12.0f;
317
    float ARC1_H = 0.2f*side;
318
    float ARC1_W = side*0.5f;
319
    float ARC2_W = 0.153f*side;
320
    float ARC2_H = 0.905f*side;
321
    float ARC3_W = side-ARC2_W;
322

    
323
    paint.setAntiAlias(true);
324
    paint.setStrokeWidth(STROKE);
325
    paint.setColor(FACE_COLORS[face]);
326
    paint.setStyle(Paint.Style.FILL);
327

    
328
    canvas.drawRect(left,top,left+side,top+side,paint);
329

    
330
    paint.setColor(INTERIOR_COLOR);
331
    paint.setStyle(Paint.Style.STROKE);
332

    
333
    canvas.drawLine(           left, HEIGHT,  side       +left, HEIGHT, paint);
334
    canvas.drawLine(      OFF +left, side  ,       OFF2  +left,      0, paint);
335
    canvas.drawLine((side-OFF)+left, side  , (side-OFF2) +left,      0, paint);
336

    
337
    canvas.drawArc( ARC1_W-RADIUS+left, ARC1_H-RADIUS, ARC1_W+RADIUS+left, ARC1_H+RADIUS, 225, 90, false, paint);
338
    canvas.drawArc( ARC2_W-RADIUS+left, ARC2_H-RADIUS, ARC2_W+RADIUS+left, ARC2_H+RADIUS, 105, 90, false, paint);
339
    canvas.drawArc( ARC3_W-RADIUS+left, ARC2_H-RADIUS, ARC3_W+RADIUS+left, ARC2_H+RADIUS, 345, 90, false, paint);
340
    }
341

    
342
///////////////////////////////////////////////////////////////////////////////////////////////////
343

    
344
  float returnMultiplier()
345
    {
346
    return 2.0f;
347
    }
348

    
349
///////////////////////////////////////////////////////////////////////////////////////////////////
350

    
351
  float[] getRowChances()
352
    {
353
    float[] chances = new float[3];
354

    
355
    chances[0] = 0.5f;
356
    chances[1] = 0.5f;
357
    chances[2] = 1.0f;
358

    
359
    return chances;
360
    }
361

    
362
///////////////////////////////////////////////////////////////////////////////////////////////////
363
// PUBLIC API
364

    
365
  public Static3D[] getRotationAxis()
366
    {
367
    return ROT_AXIS;
368
    }
369

    
370
///////////////////////////////////////////////////////////////////////////////////////////////////
371

    
372
  public int getBasicAngle()
373
    {
374
    return 3;
375
    }
376

    
377
///////////////////////////////////////////////////////////////////////////////////////////////////
378

    
379
  public int computeRowFromOffset(float offset)
380
    {
381
    return offset<0.5f ? 0:2;
382
    }
383

    
384
///////////////////////////////////////////////////////////////////////////////////////////////////
385

    
386
  public float returnRotationFactor(float offset)
387
    {
388
    return 1.0f;
389
    }
390

    
391
///////////////////////////////////////////////////////////////////////////////////////////////////
392

    
393
  public int randomizeNewRotAxis(Random rnd, int oldRotAxis)
394
    {
395
    int numAxis = ROTATION_AXIS.length;
396

    
397
    if( oldRotAxis == START_AXIS )
398
      {
399
      return rnd.nextInt(numAxis);
400
      }
401
    else
402
      {
403
      int newVector = rnd.nextInt(numAxis-1);
404
      return (newVector>=oldRotAxis ? newVector+1 : newVector);
405
      }
406
    }
407

    
408
///////////////////////////////////////////////////////////////////////////////////////////////////
409

    
410
  public int randomizeNewRow(Random rnd, int oldRotAxis, int oldRow, int newRotAxis)
411
    {
412
    float rowFloat = rnd.nextFloat();
413

    
414
    switch(oldRotAxis)
415
      {
416
      case 0 : switch(newRotAxis)
417
                 {
418
                 case 1:
419
                 case 2: return oldRow;
420
                 case 3: return 2-oldRow;
421
                 default: android.util.Log.e("dino", "error: oldRotAxis="+oldRotAxis+" newRotAxis:"+newRotAxis);
422
                 }
423
      case 1 : switch(newRotAxis)
424
                 {
425
                 case 0:
426
                 case 3: return oldRow;
427
                 case 2: return 2-oldRow;
428
                 default: android.util.Log.e("dino", "error: oldRotAxis="+oldRotAxis+" newRotAxis:"+newRotAxis);
429
                 }
430
      case 2 : switch(newRotAxis)
431
                 {
432
                 case 0:
433
                 case 3: return oldRow;
434
                 case 1: return 2-oldRow;
435
                 default: android.util.Log.e("dino", "error: oldRotAxis="+oldRotAxis+" newRotAxis:"+newRotAxis);
436
                 }
437
      case 3 : switch(newRotAxis)
438
                 {
439
                 case 1:
440
                 case 2: return oldRow;
441
                 case 0: return 2-oldRow;
442
                 default: android.util.Log.e("dino", "error: oldRotAxis="+oldRotAxis+" newRotAxis:"+newRotAxis);
443
                 }
444
      default: return rowFloat<=0.5f ? 0:2;
445
      }
446
    }
447

    
448
///////////////////////////////////////////////////////////////////////////////////////////////////
449
// remember about the double cover or unit quaternions!
450

    
451
  private int mulQuat(int q1, int q2)
452
    {
453
    Static4D result = RubikSurfaceView.quatMultiply(QUATS[q1],QUATS[q2]);
454

    
455
    float rX = result.get0();
456
    float rY = result.get1();
457
    float rZ = result.get2();
458
    float rW = result.get3();
459

    
460
    final float MAX_ERROR = 0.1f;
461
    float dX,dY,dZ,dW;
462

    
463
    for(int i=0; i<QUATS.length; i++)
464
      {
465
      dX = QUATS[i].get0() - rX;
466
      dY = QUATS[i].get1() - rY;
467
      dZ = QUATS[i].get2() - rZ;
468
      dW = QUATS[i].get3() - rW;
469

    
470
      if( dX<MAX_ERROR && dX>-MAX_ERROR &&
471
          dY<MAX_ERROR && dY>-MAX_ERROR &&
472
          dZ<MAX_ERROR && dZ>-MAX_ERROR &&
473
          dW<MAX_ERROR && dW>-MAX_ERROR  ) return i;
474

    
475
      dX = QUATS[i].get0() + rX;
476
      dY = QUATS[i].get1() + rY;
477
      dZ = QUATS[i].get2() + rZ;
478
      dW = QUATS[i].get3() + rW;
479

    
480
      if( dX<MAX_ERROR && dX>-MAX_ERROR &&
481
          dY<MAX_ERROR && dY>-MAX_ERROR &&
482
          dZ<MAX_ERROR && dZ>-MAX_ERROR &&
483
          dW<MAX_ERROR && dW>-MAX_ERROR  ) return i;
484
      }
485

    
486
    return -1;
487
    }
488

    
489
///////////////////////////////////////////////////////////////////////////////////////////////////
490
// Dino is solved if and only if:
491
//
492
// All four 'X' cubits (i.e. those whose longest edge goes along the X axis) are rotated
493
// by the same quaternion qX, similarly all four 'Y' cubits by the same qY and all four 'Z'
494
// by the same qZ, and then either:
495
//
496
// a) qX = qY = qZ
497
// b) qY = qX*Q2 and qZ = qX*Q8  (i.e. swap of WHITE and YELLOW faces)
498
// c) qX = qY*Q2 and qZ = qY*Q10 (i.e. swap of BLUE and GREEN faces)
499
// d) qX = qZ*Q8 and qY = qZ*Q10 (i.e. swap of RED and BROWN faces)
500
//
501
// BUT: cases b), c) and d) are really the same - it's all just a mirror image of the original.
502
//
503
// X cubits: 0, 2, 8, 10
504
// Y cubits: 1, 3, 9, 11
505
// Z cubits: 4, 5, 6, 7
506

    
507
  public boolean isSolved()
508
    {
509
    int qX = CUBITS[0].mQuatIndex;
510
    int qY = CUBITS[1].mQuatIndex;
511
    int qZ = CUBITS[4].mQuatIndex;
512

    
513
    if( CUBITS[2].mQuatIndex != qX || CUBITS[8].mQuatIndex != qX || CUBITS[10].mQuatIndex != qX ||
514
        CUBITS[3].mQuatIndex != qY || CUBITS[9].mQuatIndex != qY || CUBITS[11].mQuatIndex != qY ||
515
        CUBITS[5].mQuatIndex != qZ || CUBITS[6].mQuatIndex != qZ || CUBITS[ 7].mQuatIndex != qZ  )
516
      {
517
      return false;
518
      }
519

    
520
    return ( qX==qY && qX==qZ ) || ( qY==mulQuat(qX,2) && qZ==mulQuat(qX,8) );
521
    }
522

    
523
///////////////////////////////////////////////////////////////////////////////////////////////////
524
// TODO  (only needed for solvers - there are no Dino solvers ATM)
525

    
526
  public String retObjectString()
527
    {
528
    return "";
529
    }
530

    
531
}
(3-3/10)