summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-28 15:31:31 +0200
committerErich Eckner <git@eckner.net>2018-03-28 15:31:31 +0200
commitcf32ae79acb9d67f5f562ac5670f1df97c3b7dbc (patch)
tree070689d8b85af6f9478b535515cce1751da34673
parent6c2103da617d303e08d9b59381d00bc9eaed66f3 (diff)
downloadepost-cf32ae79acb9d67f5f562ac5670f1df97c3b7dbc.tar.xz
Entspringen der Phase kann nun mehr als nur einen Nachbarn beachten
-rw-r--r--epost.lps95
-rw-r--r--epostunit.pas11
-rw-r--r--typenunit.pas10
-rw-r--r--werteunit.pas37
4 files changed, 89 insertions, 64 deletions
diff --git a/epost.lps b/epost.lps
index 129897e..6c7effa 100644
--- a/epost.lps
+++ b/epost.lps
@@ -23,8 +23,8 @@
<Filename Value="epostunit.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="4546"/>
- <CursorPos Y="4563"/>
+ <TopLine Value="4454"/>
+ <CursorPos X="28" Y="4468"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit2>
@@ -33,8 +33,9 @@
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="9"/>
- <TopLine Value="1758"/>
- <CursorPos X="48" Y="1786"/>
+ <TopLine Value="1968"/>
+ <CursorPos X="112" Y="1994"/>
+ <FoldState Value=" T3k80{D4L2 ppJu60R]9kQlG0F6]9Ckf0s1 pj0kF0W4 pifje0X03]Kl4m70F[K4ZjH051]lel60E3]IgjL0P011I[=4Hp5081)"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit3>
@@ -42,8 +43,9 @@
<Filename Value="typenunit.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="12"/>
- <TopLine Value="1279"/>
- <CursorPos X="32" Y="1304"/>
+ <TopLine Value="3279"/>
+ <CursorPos X="34" Y="3301"/>
+ <FoldState Value=" T3vO0IE piak403B pjE]9M7]IYjV099[R4jM09F[R5G06C[I5V]j]9fjT0A2]RLjd066]IZjC06F[95U0AC[95S0JA]a6k40W[+5]\I9]I1k00p3]9AkQ0V]IiXk2058]9bjJ0B7]R0jR0A9[{+5P]9[{05O0Q8[95c0AG pkDlM042 pj5jF0K25"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit4>
@@ -79,7 +81,7 @@
<EditorIndex Value="10"/>
<TopLine Value="142"/>
<CursorPos X="17" Y="170"/>
- <UsageCount Value="152"/>
+ <UsageCount Value="153"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
@@ -195,119 +197,122 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="epostunit.pas"/>
- <Caret Line="2223" Column="53" TopLine="2219"/>
+ <Caret Line="8426" Column="59" TopLine="8409"/>
</Position1>
<Position2>
- <Filename Value="epostunit.pas"/>
- <Caret Line="443" Column="33" TopLine="425"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="80" Column="33" TopLine="64"/>
</Position2>
<Position3>
<Filename Value="epostunit.pas"/>
- <Caret Line="2223" Column="74" TopLine="2215"/>
+ <Caret Line="8434" Column="5" TopLine="8409"/>
</Position3>
<Position4>
<Filename Value="epostunit.pas"/>
- <Caret Line="2280" Column="43" TopLine="2252"/>
+ <Caret Line="8437" Column="44" TopLine="8410"/>
</Position4>
<Position5>
<Filename Value="epostunit.pas"/>
- <Caret Line="8404" Column="34" TopLine="8399"/>
+ <Caret Line="8427" Column="19" TopLine="8409"/>
</Position5>
<Position6>
- <Filename Value="epostunit.pas"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="80" Column="33" TopLine="64"/>
</Position6>
<Position7>
<Filename Value="epostunit.pas"/>
- <Caret Line="443" Column="33" TopLine="414"/>
+ <Caret Line="8421" Column="27" TopLine="8409"/>
</Position7>
<Position8>
<Filename Value="epostunit.pas"/>
- <Caret Line="2223" Column="74" TopLine="2194"/>
+ <Caret Line="443" Column="33" TopLine="425"/>
</Position8>
<Position9>
<Filename Value="epostunit.pas"/>
- <Caret Line="2287" Column="53" TopLine="2270"/>
</Position9>
<Position10>
<Filename Value="epostunit.pas"/>
+ <Caret Line="443" Column="33" TopLine="414"/>
</Position10>
<Position11>
<Filename Value="epostunit.pas"/>
- <Caret Line="444" Column="26" TopLine="414"/>
+ <Caret Line="2223" Column="74" TopLine="2194"/>
</Position11>
<Position12>
<Filename Value="epostunit.pas"/>
- <Caret Line="4237" Column="68" TopLine="4220"/>
+ <Caret Line="2271" Column="48" TopLine="2267"/>
</Position12>
<Position13>
- <Filename Value="epostunit.pas"/>
- <Caret Line="8430" Column="56" TopLine="8399"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="1653" Column="37" TopLine="1622"/>
</Position13>
<Position14>
- <Filename Value="epostunit.pas"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="1651" Column="21" TopLine="1634"/>
</Position14>
<Position15>
<Filename Value="epostunit.pas"/>
- <Caret Line="443" Column="33" TopLine="414"/>
+ <Caret Line="4511" Column="35" TopLine="4498"/>
</Position15>
<Position16>
- <Filename Value="epostunit.pas"/>
- <Caret Line="2223" Column="74" TopLine="2194"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="616" Column="30" TopLine="599"/>
</Position16>
<Position17>
- <Filename Value="epostunit.pas"/>
- <Caret Line="2286" Column="140" TopLine="2269"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="3480" Column="8" TopLine="3471"/>
</Position17>
<Position18>
<Filename Value="epostunit.pas"/>
- <Caret Line="8426" Column="59" TopLine="8409"/>
+ <Caret Line="4595" Column="50" TopLine="4570"/>
</Position18>
<Position19>
- <Filename Value="werteunit.pas"/>
- <Caret Line="80" Column="33" TopLine="64"/>
+ <Filename Value="epostunit.pas"/>
+ <Caret Line="189" Column="25" TopLine="173"/>
</Position19>
<Position20>
<Filename Value="epostunit.pas"/>
- <Caret Line="8434" Column="5" TopLine="8409"/>
+ <Caret Line="4598" Column="15" TopLine="4570"/>
</Position20>
<Position21>
<Filename Value="epostunit.pas"/>
- <Caret Line="8437" Column="44" TopLine="8410"/>
+ <Caret Line="6281" Column="42" TopLine="6268"/>
</Position21>
<Position22>
<Filename Value="epostunit.pas"/>
- <Caret Line="8427" Column="19" TopLine="8409"/>
+ <Caret Line="428" Column="19" TopLine="410"/>
</Position22>
<Position23>
- <Filename Value="werteunit.pas"/>
- <Caret Line="80" Column="33" TopLine="64"/>
+ <Filename Value="epostunit.pas"/>
+ <Caret Line="6281" Column="46" TopLine="6252"/>
</Position23>
<Position24>
<Filename Value="epostunit.pas"/>
- <Caret Line="8421" Column="27" TopLine="8409"/>
+ <Caret Line="6302" Column="23" TopLine="6276"/>
</Position24>
<Position25>
<Filename Value="epostunit.pas"/>
- <Caret Line="443" Column="33" TopLine="425"/>
+ <Caret Line="8351" Column="20" TopLine="8343"/>
</Position25>
<Position26>
- <Filename Value="epostunit.pas"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="88" Column="25" TopLine="72"/>
</Position26>
<Position27>
- <Filename Value="epostunit.pas"/>
- <Caret Line="443" Column="33" TopLine="414"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="1972" Column="32" TopLine="1924"/>
</Position27>
<Position28>
- <Filename Value="epostunit.pas"/>
- <Caret Line="2223" Column="74" TopLine="2194"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="1993" Column="37" TopLine="1975"/>
</Position28>
<Position29>
- <Filename Value="epostunit.pas"/>
- <Caret Line="2271" Column="48" TopLine="2267"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="1971" Column="38" TopLine="1849"/>
</Position29>
<Position30>
<Filename Value="werteunit.pas"/>
- <Caret Line="1653" Column="37" TopLine="1622"/>
+ <Caret Line="2016" TopLine="1990"/>
</Position30>
</JumpHistory>
</ProjectSession>
diff --git a/epostunit.pas b/epostunit.pas
index 244931e..b57a604 100644
--- a/epostunit.pas
+++ b/epostunit.pas
@@ -4465,6 +4465,7 @@ var
bekannteBefehle: tMyStringList;
maxPos: tInt64Point;
betraege: tWerte;
+ i: longint;
begin
result:=false;
Zeit:=now;
@@ -4586,11 +4587,13 @@ begin
if entspringen.modus<>emKein then begin
case entspringen.modus of
emHorizontal:
- entspringen.parameter[0]:=
- kont2disk('x',entspringen.parameter[0]);
+ for i:=0 to 1 do
+ entspringen.parameter[i]:=
+ kont2disk('x',entspringen.parameter[i]);
emVertikal:
- entspringen.parameter[0]:=
- kont2disk('y',entspringen.parameter[0]);
+ for i:=0 to 1 do
+ entspringen.parameter[i]:=
+ kont2disk('y',entspringen.parameter[i]);
end{of case};
gibAus('entspringen ...',3);
entspringe(threads,entspringen);
diff --git a/typenunit.pas b/typenunit.pas
index fd43697..829b603 100644
--- a/typenunit.pas
+++ b/typenunit.pas
@@ -3530,13 +3530,15 @@ begin
end
else if istDasBefehl('horizontal',s,bekannteModi,true) then begin
entspringModus.modus:=emHorizontal;
- setLength(entspringModus.parameter,1);
- entspringModus.parameter[0]:=exprToFloat(sT,s,kvs,cbgv);
+ setLength(entspringModus.parameter,2);
+ entspringModus.parameter[0]:=exprToFloat(sT,erstesArgument(s),kvs,cbgv);
+ entspringModus.parameter[1]:=exprToFloat(sT,s,kvs,cbgv);
end
else if istDasBefehl('vertikal',s,bekannteModi,true) then begin
entspringModus.modus:=emVertikal;
- setLength(entspringModus.parameter,1);
- entspringModus.parameter[0]:=exprToFloat(sT,s,kvs,cbgv);
+ setLength(entspringModus.parameter,2);
+ entspringModus.parameter[0]:=exprToFloat(sT,erstesArgument(s),kvs,cbgv);
+ entspringModus.parameter[1]:=exprToFloat(sT,s,kvs,cbgv);
end
else begin
entspringModus.modus:=emKein;
diff --git a/werteunit.pas b/werteunit.pas
index 04d878b..e7b8f67 100644
--- a/werteunit.pas
+++ b/werteunit.pas
@@ -1967,8 +1967,9 @@ end;
procedure tLLWerte.entspringe(mi,ma: int64; em: tEntspringModus);
var
- i,j,pStep,sStep,pMax,jStart: int64;
- wert: extended;
+ i,j,pStep,sStep,pMax,jStart,bwLen: int64;
+ vglWert,bwFak: extended;
+ bisherigeWerte: tExtendedArray;
begin
case em.modus of
emKein:
@@ -1987,23 +1988,37 @@ begin
fehler('Entspringmodus '''+tEntspringModusToStr(em)+''' nicht implementiert!');
end{of case};
assert(em.modus in [emHorizontal,emVertikal],'Hoppla, der Entspringmodus '''+tEntspringModusToStr(em)+''' ist doch noch nicht implementiert!');
- jStart:=max(0,min(pMax,round(em.parameter[0])));
+ bwLen:=max(1,round(em.parameter[0]));
+ bwFak:=1/bwLen;
+ setLength(bisherigeWerte,bwLen);
+ jStart:=max(0,min(pMax,round(em.parameter[1])));
for i:=mi to ma do begin // senkrecht
- wert:=0;
+ for j:=0 to bwLen-1 do
+ bisherigeWerte[j]:=0;
+ vglWert:=0;
for j:=jStart to pMax do begin // parallel, nach rechts
- while werte[i*sStep+j*pStep]-wert >= pi do
+ while werte[i*sStep+j*pStep]-vglWert >= pi do
werte[i*sStep+j*pStep]:=werte[i*sStep+j*pStep]-2*pi;
- while werte[i*sStep+j*pStep]-wert < -pi do
+ while werte[i*sStep+j*pStep]-vglWert < -pi do
werte[i*sStep+j*pStep]:=werte[i*sStep+j*pStep]+2*pi;
- wert:=werte[i*sStep+j*pStep];
+ vglWert:=vglWert + bwFak * (werte[i*sStep+j*pStep] - bisherigeWerte[j mod bwLen]);
+ bisherigeWerte[j mod bwLen]:=werte[i*sStep+j*pStep];
+ end;
+ vglWert:=0;
+ for j:=jStart to jStart+bwLen-1 do begin
+ if j <= pMax then
+ bisherigeWerte[j mod bwLen]:=werte[i*sStep+j*pStep]
+ else
+ bisherigeWerte[j mod bwLen]:=0;
+ vglWert:=vglWert + bwFak * bisherigeWerte[j mod bwLen];
end;
- wert:=werte[i*sStep+jStart*pStep];
for j:=jStart-1 downto 0 do begin // parallel, nach links
- while werte[i*sStep+j*pStep]-wert >= pi do
+ while werte[i*sStep+j*pStep]-vglWert >= pi do
werte[i*sStep+j*pStep]:=werte[i*sStep+j*pStep]-2*pi;
- while werte[i*sStep+j*pStep]-wert < -pi do
+ while werte[i*sStep+j*pStep]-vglWert < -pi do
werte[i*sStep+j*pStep]:=werte[i*sStep+j*pStep]+2*pi;
- wert:=werte[i*sStep+j*pStep];
+ vglWert:=vglWert + bwFak * (werte[i*sStep+j*pStep] - bisherigeWerte[j mod bwLen]);
+ bisherigeWerte[j mod bwLen]:=werte[i*sStep+j*pStep];
end;
end;
end;