Revision 387b6326
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyKilominx.java | ||
---|---|---|
90 | 90 |
|
91 | 91 |
float getScreenRatio() |
92 | 92 |
{ |
93 |
return 1.00f;
|
|
93 |
return 0.33f;
|
|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
333 | 333 |
int numCubitsPerCenter = 5; |
334 | 334 |
int face = cubit/numCubitsPerCenter; |
335 | 335 |
int index= cubit%numCubitsPerCenter; |
336 |
int corner=mCenterMap[face][index]; |
|
337 |
|
|
338 |
return mQuatCornerIndices[corner]; |
|
336 |
int center=mCenterMap[face][index]; |
|
337 |
return mQuatCornerIndices[center]; |
|
339 | 338 |
} |
340 | 339 |
} |
341 | 340 |
|
... | ... | |
348 | 347 |
|
349 | 348 |
if( variant==0 ) |
350 | 349 |
{ |
351 |
float width = (numLayers/3.0f)/(numLayers-1);
|
|
350 |
float width = numLayers/(numLayers-1.0f);
|
|
352 | 351 |
float A = (2*SQ3/3)*SIN54; |
353 | 352 |
float B = 0.4f; |
354 | 353 |
double X = width*COS18*SIN_HALFD; |
... | ... | |
396 | 395 |
int numCubitsPerCorner = numCubitsPerCorner(numLayers); |
397 | 396 |
int numCubitsPerEdge = numCubitsPerEdge(numLayers); |
398 | 397 |
int type = computeEdgeType(cubit,numCubitsPerCorner,numCubitsPerEdge); |
399 |
float tmpVal= (numLayers/3.0f)/(numLayers-1);
|
|
398 |
float tmpVal= numLayers/(numLayers-1.0f);
|
|
400 | 399 |
float height= tmpVal*COS18; |
401 | 400 |
float width = tmpVal + (type/2)*tmpVal*SIN18; |
402 | 401 |
boolean left = (type%2)==0; |
... | ... | |
463 | 462 |
} |
464 | 463 |
else |
465 | 464 |
{ |
466 |
float width = (1+0.5f*(numLayers-3)*SIN18)*(numLayers/3.0f)/(numLayers-1);
|
|
465 |
float width = (1+0.5f*(numLayers-3)*SIN18)*numLayers/(numLayers-1);
|
|
467 | 466 |
|
468 | 467 |
double X = width*COS18*SIN_HALFD; |
469 | 468 |
double Y = width*SIN18; |
Also available in: Unified diff
Make the Kilo and Megaminxes standard size (dodecahedron size=3,5, i.e. equal to numLayers so that DIST2D and DIST3D are standard)