Given a 2D-coordinate system where we only look at the area between 0-1 on both, x and y axis. How can I divide that system into n segments and mirror a point at p(0.5,0.5), so that all points are finally inside of the same segment?
I created a small drawing which I've attached here. In the drawing I used n=4 (but I want to come up with a solution where I can dynamically change the number of segments) to divide the coordinate system into 4 segments and marked the segment which should contain all points after mirroring (2nd). In 3rd I illustrated the mirroring I want to get. Points which are already in that marked segment should stay there. A point which is inside of another segment should be mirrored so that it finally belongs to the marked segment.

I'm really sorry if the question is not precise enough and hope you understand what I want to achieve. I'm not a mathematician but a programmer and just need that kind of math for a mandala drawing app I'm currently working on.
Edit: Solved the problem by putting some code together and experimented a bit. When uv is our point, I calculate the new point uv' as followed:
Vector2 sc = uv - (Vector2.one*0.5f);
float phi = Mathf.Atan2(sc.y, sc.x);
float r = Mathf.Sqrt(Vector2.Dot(sc, sc));
int segments = 8;
float _Divisor = Mathf.PI * 2 / (segments-2);
phi = phi - _Divisor * Mathf.Floor(phi / _Divisor);
phi = Mathf.Min(phi, _Divisor - phi);
// Convert back to the texture coordinate.
Vector2 uvNew = new Vector2(Mathf.Cos(phi), Mathf.Sin(phi)) * r + (Vector2.one*0.5f);
// Reflection at the border of the screen.
uv = Vector2.Max(Vector2.Min(uvNew, (Vector2.one*2f) - uvNew), -uvNew);
This is not an answer, but it's longer than a comment. I have a series of questions that you might want to think about: