Yes, sorry,.. I can overcomplicate things sometimes, but I think I solve the problem eventually.
A square is plot in two, two triangles. Top of the lines is placed at centre of the square. The square is rotated 45 degrees.
The triangle has a top angle of 90 degrees, in this case, the base is 5*√2 (with sides of lengths 5) .
It all came down to finding the correct equations that describes the amplitude as function of the position as three different lines positioned differently enters the triangle.
if I start with scanning the line from the centre line (height = 0), from right to left... the lower triangle is being scanned (top triangle is empty)
In the first case I want the amplitude to be following the requirement, f(0) = max amplitude = 5/L1 and f(5*√2) = 0. L1,L2,L3 is just a line (with different lengths) that is only partially inside the rectangle. It is just an normalisation factor.
The second case is the same but opposite, f(delay) =0 and f(delay+ 5*√2) = 5/L3.
The third case is just a vertical line with f(0) = 0 and f(5/√2) = amplitude max = 5/(√2*L2) and f(5√2) = 0.
I just needed to find the equations for this.
The next step was cutting the top triangle at a height h, and recalculate the new amplitude (with the top and lower added together).
My answer to this is,First case:
f(x) = 5/L1*(1-x/5√2)
I am setting zero as zero, .. if I have a height, the this line is delayed with 2* height, so at position -height, the line enters the triangle already.
For the top triangle, is a special case. The amplitude increases to position: + height and then is constant.
f(x) = √2/L1*x, at position height f(x) = height*√2/L1
Third case is the same as first case but opposite in amplitude. Maximal amplitude at position 2*delay+height*2. and at position 5√2+2*delay+height its is contant and then decreases with f(x) = √2/L3*(5√2-x+2*delay+2*height) to position 5√2+2*delay+height*2. The delay is the time between the lines as they enter the area investigated.
Second case:
f(x) = 1/L2*(x-delay-height) for x < 5/√2 + delay + height
f(x) = 1/L2*(delay+height+5√2-x) for x > 5/√2 + delay + height
if a height is added in top triangle, one of the triangle amplitudes is simply cut at height h.
I hope I got that correct, its all in MATLAB code. =)