Revision b1dea8dd
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/objects/FactoryCubit.java | ||
---|---|---|
50 | 50 |
static final float MINX_C3 = (float)(Math.sqrt(10-2*SQ5)/4); // cos(54 deg) |
51 | 51 |
static final float MINX_C4 = (float)(Math.sqrt(0.5f-0.1f*SQ5)); // cos(half the dihedral angle) |
52 | 52 |
static final float MINX_C5 = (float)(Math.sqrt(0.5f+0.1f*SQ5)); // sin(half the dihedral angle) |
53 |
static final float MINX_SC = 0.5f; |
|
53 | 54 |
|
54 | 55 |
private static final int IVY_N = 8; |
55 | 56 |
|
... | ... | |
692 | 693 |
float Y1= (float)(Math.sqrt(2+0.4f*SQ5)/4); |
693 | 694 |
float Y2= Y1 - (float)(Math.sqrt(10-2*SQ5)/8); |
694 | 695 |
float H = 0.5f*MINX_C1/MINX_C3; |
695 |
float X2= H*MINX_C5; |
|
696 |
float Y3= H/(2*MINX_C4); |
|
697 |
float Y4= H*(1/(2*MINX_C4) - MINX_C4); |
|
696 |
float X2= MINX_SC*H*MINX_C5;
|
|
697 |
float Y3= MINX_SC*H/(2*MINX_C4);
|
|
698 |
float Y4= MINX_SC*H*(1/(2*MINX_C4) - MINX_C4);
|
|
698 | 699 |
|
699 | 700 |
float[] vertices0 = { -X1, Y2, 0, -Y1, X1, Y2, 0, Y1 }; |
700 | 701 |
float[] bands0 = computeBands(0.03f,39,0.3f,0.2f,5); |
... | ... | |
1218 | 1219 |
|
1219 | 1220 |
VertexEffect[] createVertexEffectsMinxCorner() |
1220 | 1221 |
{ |
1221 |
VertexEffect[] effect = new VertexEffect[9];
|
|
1222 |
VertexEffect[] effect = new VertexEffect[10];
|
|
1222 | 1223 |
|
1223 | 1224 |
float H = 0.5f*(MINX_C1/MINX_C3); |
1224 | 1225 |
float Y1= (float)(Math.sqrt(2+0.4f*SQ5)/4); |
... | ... | |
1246 | 1247 |
Static1D angle6 = new Static1D(90-A/2); |
1247 | 1248 |
|
1248 | 1249 |
effect[0] = new VertexEffectMove(move1); |
1249 |
effect[1] = new VertexEffectMove(move2); |
|
1250 |
effect[2] = new VertexEffectRotate(angle1, axisZ, center); |
|
1251 |
effect[3] = new VertexEffectRotate(angle2, axisZ, center); |
|
1252 |
effect[4] = new VertexEffectRotate(angle3, axisA, center); |
|
1253 |
effect[5] = new VertexEffectMove(move3); |
|
1254 |
effect[6] = new VertexEffectRotate(angle4, axisC, center); |
|
1255 |
effect[7] = new VertexEffectRotate(angle5, axisC, center); |
|
1256 |
effect[8] = new VertexEffectRotate(angle6, axisY, center); |
|
1250 |
effect[1] = new VertexEffectScale(1/MINX_SC); |
|
1251 |
effect[2] = new VertexEffectMove(move2); |
|
1252 |
effect[3] = new VertexEffectRotate(angle1, axisZ, center); |
|
1253 |
effect[4] = new VertexEffectRotate(angle2, axisZ, center); |
|
1254 |
effect[5] = new VertexEffectRotate(angle3, axisA, center); |
|
1255 |
effect[6] = new VertexEffectMove(move3); |
|
1256 |
effect[7] = new VertexEffectRotate(angle4, axisC, center); |
|
1257 |
effect[8] = new VertexEffectRotate(angle5, axisC, center); |
|
1258 |
effect[9] = new VertexEffectRotate(angle6, axisY, center); |
|
1257 | 1259 |
|
1258 | 1260 |
effect[0].setMeshAssociation( 7,-1); // meshes 0,1,2 |
1259 | 1261 |
effect[1].setMeshAssociation(56,-1); // meshes 3,4,5 |
1260 |
effect[2].setMeshAssociation( 7,-1); // meshes 0,1,2
|
|
1261 |
effect[3].setMeshAssociation(56,-1); // meshes 3,4,5
|
|
1262 |
effect[2].setMeshAssociation(56,-1); // meshes 3,4,5
|
|
1263 |
effect[3].setMeshAssociation( 7,-1); // meshes 0,1,2
|
|
1262 | 1264 |
effect[4].setMeshAssociation(56,-1); // meshes 3,4,5 |
1263 | 1265 |
effect[5].setMeshAssociation(56,-1); // meshes 3,4,5 |
1264 |
effect[6].setMeshAssociation(18,-1); // meshes 1,4 |
|
1265 |
effect[7].setMeshAssociation(36,-1); // meshes 2,5 |
|
1266 |
effect[6].setMeshAssociation(56,-1); // meshes 3,4,5 |
|
1267 |
effect[7].setMeshAssociation(18,-1); // meshes 1,4 |
|
1268 |
effect[8].setMeshAssociation(36,-1); // meshes 2,5 |
|
1266 | 1269 |
|
1267 | 1270 |
return effect; |
1268 | 1271 |
} |
Also available in: Unified diff
Progress with the Kilominx.