It would be cool to have diagonal mirror planes, point reflections, several parallel mirror planes and more options people will come up with in the future. These could all be covered by custom mirror functions (CMF). CMFs would be simple equations in a text file or interface window. Ideally we could save the CMFs under individual names and chose one of them from a drop-down list, so we could reuse them. Also, the game would already have the most common CMFs built in and usable as examples (I can make these if desired). All coordinates are relative to the mirror planes or to the ship core if no mirror planes are set.
CMFs are best explained by some examples, so here we go.
Simple reflection at the YZ-plane:
This would create 7 additional blocks exactly the same way as it is now when using all 3 symmetry planes:
This is a point reflection:
Let's say you want to build two symmetric engines with their center being at X=+/-10, then you could use the following code to mirror blocks both at the center of the engines and at the center of the ship at the same time. The number (20 in this case) must always be twice the distance from the center than the imaginary secondary mirror planes. |X| is the absolute value of X.
With the following code horizontal circles, squares, octagons, other 2^n-gons and prisms thereof could be built twice as fast, as if using a diagonal mirror plane.
For a ship like this the code would simply be:
Edit: Fixed this, the original version was wrong.
If you want to build identical structures at regular intervals (example: street lamps), this will make 7 copies, with a center-to-center distance of 15 between them:
This code would reduce the amount of work for making a sphere or any shape with octahedral symmetry by a factor of 48(!) compared to a factor of 8 for the current system with just the three symmetry planes.
Edit:
If you wish to mix even and odd symmetry, you could use the following code. With odd symmetry mode off, this would mirror blocks at the YZ-plane as if odd symmetry was active:
Edit 2:
1. Fixed error, see above in red.
2. Rotational symmetry: If there's an easy way to include this, sine and cosine functions would be helpful. Otherwise at least multiplications should be possible. This would be a rotation around the Z-axis by 30°:
Or with manually calculated values:
CMFs are best explained by some examples, so here we go.
Simple reflection at the YZ-plane:
Code:
X=-X, Y=Y, Z=Z;
Code:
X=-X, Y=Y, Z=Z;
X=X, Y=-Y, Z=Z;
X=X, Y=Y, Z=-Z;
X=-X, Y=-Y, Z=Z;
X=-X, Y=Y, Z=-Z;
X=X, Y=-Y, Z=-Z;
X=-X, Y=-Y, Z=-Z;
Code:
X=-X, Y=-Y, Z=-Z;
Code:
X=-X, Y=Y, Z=Z;
X=20-|X|, Y=Y, Z=Z;
X=-20+|X|, Y=Y, Z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=-Z, Y=-X, Z=-Y;
Edit:
If you wish to mix even and odd symmetry, you could use the following code. With odd symmetry mode off, this would mirror blocks at the YZ-plane as if odd symmetry was active:
Code:
X=-X+1, Y=Y, Z=Z;
X=X, Y=-Y, Z=Z;
X=X, Y=Y, Z=-Z;
X=-X+1, Y=-Y, Z=Z;
X=-X+1, Y=Y, Z=-Z;
X=X, Y=-Y, Z=-Z;
X=-X+1, Y=-Y, Z=-Z;
Edit 2:
1. Fixed error, see above in red.
2. Rotational symmetry: If there's an easy way to include this, sine and cosine functions would be helpful. Otherwise at least multiplications should be possible. This would be a rotation around the Z-axis by 30°:
Code:
X=cos(30)*X-sin(30)*Y, Y=sin(30)*X+cos(30)*Y, Z=Z;
Code:
X=0.866*X-0.5*Y, Y=0.5*X+0.866*Y, Z=Z;
Last edited: