Planned Custom Mirror Functions (Better Symmetry)

    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    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:
    Code:
    X=-X, Y=Y, Z=Z;
    This would create 7 additional blocks exactly the same way as it is now when using all 3 symmetry planes:
    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;
    This is a point reflection:
    Code:
    X=-X, Y=-Y, Z=-Z;
    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.
    Code:
    X=-X, Y=Y, Z=Z;
    X=20-|X|, Y=Y, Z=Z;
    X=-20+|X|, Y=Y, Z=Z;
    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.
    Code:
    X=-X, Y=Y, Z=Z;
    X=X, Y=Y, Z=-Z;
    X=-X, Y=Y, Z=-Z;
    X=Z, Y=Y, Z=X;
    X=-Z, Y=Y, Z=X;
    X=Z, Y=Y, Z=-X;
    X=-Z, Y=Y, Z=-X;
    For a ship like this the code would simply be:
    Code:
    X=Y, Y=X, Z=Z;
    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:
    Code:
    X=X+15, Y=Y, Z=Z;
    X=X+30, Y=Y, Z=Z;
    X=X+45, Y=Y, Z=Z;
    X=X+60, Y=Y, Z=Z;
    X=X+75, Y=Y, Z=Z;
    X=X+90, Y=Y, Z=Z;
    X=X+105, Y=Y, Z=Z;
    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.
    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;
    X=Y, Y=X, Z=Z;
    X=-Y, Y=X, Z=Z;
    X=Y, Y=-X, Z=Z;
    X=Y, Y=X, Z=-Z;
    X=-Y, Y=-X, Z=Z;
    X=-Y, Y=X, Z=-Z;
    X=Y, Y=-X, Z=-Z;
    X=-Y, Y=-X, Z=-Z;
    X=Z, Y=Y, Z=X;
    X=-Z, Y=Y, Z=X;
    X=Z, Y=-Y, Z=X;
    X=Z, Y=Y, Z=-X;
    X=-Z, Y=-Y, Z=X;
    X=-Z, Y=Y, Z=-X;
    X=Z, Y=-Y, Z=-X;
    X=-Z, Y=-Y, Z=-X;
    X=X, Y=Z, Z=Y;
    X=-X, Y=Z, Z=Y;
    X=X, Y=-Z, Z=Y;
    X=X, Y=Z, Z=-Y;
    X=-X, Y=-Z, Z=Y;
    X=-X, Y=Z, Z=-Y;
    X=X, Y=-Z, Z=-Y;
    X=-X, Y=-Z, Z=-Y;
    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=-X;
    X=-Y, Y=-Z, Z=-X;
    X=Z, Y=X, Z=Y;
    X=-Z, Y=X, Z=Y;
    X=Z, Y=-X, Z=Y;
    X=Z, Y=X, Z=-Y;
    X=-Z, Y=-X, Z=Y;
    X=-Z, Y=X, Z=-Y;
    X=Z, Y=-X, Z=-Y;
    X=-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;
    Or with manually calculated values:
    Code:
    X=0.866*X-0.5*Y, Y=0.5*X+0.866*Y, Z=Z;
     
    Last edited:
    • Like
    Reactions: Lone_Puppy

    Lukwan

    Human
    Joined
    Oct 30, 2015
    Messages
    691
    Reaction score
    254
    Cool. I'm glad someone seems to know how this stuff works. I just like to build pretty things. ;)
     
    Joined
    Jan 25, 2015
    Messages
    964
    Reaction score
    225
    • Wired for Logic
    • Councillor 2 Gold
    • Legacy Citizen 5
    Hai,
    Congrats! This suggestion has been recognised by the council and the devs, it has been added to the phabricator workflow. You can check out all the accepted suggestions that have been added to the planned list over here http://phab.starma.de/tag/group_council/
    (you have to scroll all the way to the right to see them)

    I hope many more fine suggestions will come from you.

    (I will totally not use this as a copy paste message)

    It might not be exactly the same way, but the overall suggestion idea is now planned.