"plot and retrace" mode added
This commit is contained in:
parent
c3b7b1ef28
commit
6ff3f4d1b5
@ -78,7 +78,7 @@ type
|
|||||||
|
|
||||||
type
|
type
|
||||||
TPointsArray = array of TCPpoint;
|
TPointsArray = array of TCPpoint;
|
||||||
TPointsXYArray = array of TXYpoint;
|
//TPointsXYArray = array of TXYpoint;
|
||||||
|
|
||||||
P2Cpoint = ^T2Cpoint;
|
P2Cpoint = ^T2Cpoint;
|
||||||
T2CPointsArray = array of T2Cpoint;
|
T2CPointsArray = array of T2Cpoint;
|
||||||
@ -129,7 +129,7 @@ type
|
|||||||
jitters: integer;
|
jitters: integer;
|
||||||
gamma_treshold: double;
|
gamma_treshold: double;
|
||||||
|
|
||||||
// PropTable: array of TXForm;//Integer;
|
// PropTable: array of TXForm;
|
||||||
FAngle: Double;
|
FAngle: Double;
|
||||||
FTwoColorDimensions: Boolean;
|
FTwoColorDimensions: Boolean;
|
||||||
|
|
||||||
@ -155,10 +155,9 @@ type
|
|||||||
|
|
||||||
// class function interpolate(cp1, cp2: TControlPoint; Time: double): TControlPoint; /// just for now
|
// class function interpolate(cp1, cp2: TControlPoint; Time: double): TControlPoint; /// just for now
|
||||||
procedure InterpolateX(cp1, cp2: TControlPoint; Tm: double);
|
procedure InterpolateX(cp1, cp2: TControlPoint; Tm: double);
|
||||||
// procedure Iterate_Old(NrPoints: integer; var Points: TPointsArray);
|
// procedure IterateXY(NrPoints: integer; var Points: TPointsXYArray);
|
||||||
procedure IterateXY(NrPoints: integer; var Points: TPointsXYArray);
|
|
||||||
procedure IterateXYC(NrPoints: integer; var Points: TPointsArray);
|
procedure IterateXYC(NrPoints: integer; var Points: TPointsArray);
|
||||||
procedure IterateXYCC(NrPoints: integer; var Points: T2CPointsArray);
|
// procedure IterateXYCC(NrPoints: integer; var Points: T2CPointsArray);
|
||||||
|
|
||||||
procedure Prepare;
|
procedure Prepare;
|
||||||
// procedure Testiterate(NrPoints: integer; var Points: TPointsArray);
|
// procedure Testiterate(NrPoints: integer; var Points: TPointsArray);
|
||||||
@ -352,6 +351,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
(*
|
||||||
procedure TControlPoint.IterateXY(NrPoints: integer; var Points: TPointsXYArray);
|
procedure TControlPoint.IterateXY(NrPoints: integer; var Points: TPointsXYArray);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -372,37 +372,38 @@ begin
|
|||||||
|
|
||||||
pPoint := @Points[0];
|
pPoint := @Points[0];
|
||||||
|
|
||||||
if UseFinalXform then
|
if UseFinalXform then
|
||||||
for i := 0 to NrPoints - 1 do begin
|
for i := 0 to NrPoints - 1 do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
xf.NextPointXY(px,py);
|
xf.NextPointXY(px,py);
|
||||||
if xf.noPlot then
|
if xf.noPlot then
|
||||||
pPoint^.x := MaxDouble // hack
|
pPoint^.x := MaxDouble // hack
|
||||||
else begin
|
else begin
|
||||||
pPoint^.X := px;
|
pPoint^.X := px;
|
||||||
pPoint^.Y := py;
|
pPoint^.Y := py;
|
||||||
|
end;
|
||||||
|
finalXform.NextPointXY(pPoint^.X, pPoint^.y);
|
||||||
|
Inc(pPoint);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for i := 0 to NrPoints - 1 do begin
|
||||||
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
xf.NextPointXY(px,py);
|
||||||
|
if xf.noPlot then
|
||||||
|
pPoint^.x := MaxDouble // hack
|
||||||
|
else begin
|
||||||
|
pPoint.X := px;
|
||||||
|
pPoint.Y := py;
|
||||||
|
end;
|
||||||
|
Inc(pPoint);
|
||||||
end;
|
end;
|
||||||
finalXform.NextPointXY(pPoint^.X, pPoint^.y);
|
|
||||||
Inc(pPoint);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
for i := 0 to NrPoints - 1 do begin
|
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
|
||||||
xf.NextPointXY(px,py);
|
|
||||||
if xf.noPlot then
|
|
||||||
pPoint^.x := MaxDouble // hack
|
|
||||||
else begin
|
|
||||||
pPoint.X := px;
|
|
||||||
pPoint.Y := py;
|
|
||||||
end;
|
|
||||||
Inc(pPoint);
|
|
||||||
end
|
|
||||||
except
|
except
|
||||||
on EMathError do begin
|
on EMathError do begin
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
*)
|
||||||
|
|
||||||
procedure TControlPoint.IterateXYC(NrPoints: integer; var Points: TPointsArray);
|
procedure TControlPoint.IterateXYC(NrPoints: integer; var Points: TPointsArray);
|
||||||
var
|
var
|
||||||
@ -436,34 +437,52 @@ end;
|
|||||||
xf := xform[0];//random(NumXForms)];
|
xf := xform[0];//random(NumXForms)];
|
||||||
for i := 0 to FUSE do begin
|
for i := 0 to FUSE do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
if xf.RetraceXform then continue;
|
||||||
xf.NextPoint(p);
|
xf.NextPoint(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
pPoint := @Points[0];
|
pPoint := @Points[0];
|
||||||
|
|
||||||
if UseFinalXform then
|
if UseFinalXform then
|
||||||
for i := 0 to NrPoints - 1 do begin
|
for i := 0 to NrPoints - 1 do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
xf.NextPoint(p);
|
if xf.RetraceXform then begin
|
||||||
if xf.noPlot then
|
if xf.noPlot then
|
||||||
pPoint^.x := MaxDouble // hack
|
pPoint^.x := MaxDouble // hack
|
||||||
else
|
else begin
|
||||||
finalXform.NextPointTo(p, pPoint^);
|
xf.NextPointTo(p, pPoint^);
|
||||||
Inc(pPoint);
|
finalXform.NextPoint(pPoint^);
|
||||||
end
|
end;
|
||||||
else
|
end
|
||||||
for i := 0 to NrPoints - 1 do begin
|
else begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf.NextPoint(p);
|
||||||
xf.NextPoint(p);
|
if xf.noPlot then
|
||||||
if xf.noPlot then
|
pPoint^.x := MaxDouble // hack
|
||||||
pPoint^.x := MaxDouble // hack
|
else
|
||||||
else begin
|
finalXform.NextPointTo(p, pPoint^);
|
||||||
pPoint^.x := p.x;
|
end;
|
||||||
pPoint^.y := p.y;
|
Inc(pPoint);
|
||||||
pPoint^.c := p.c;
|
end
|
||||||
|
else
|
||||||
|
for i := 0 to NrPoints - 1 do begin
|
||||||
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
if xf.RetraceXform then begin
|
||||||
|
if xf.noPlot then
|
||||||
|
pPoint^.x := MaxDouble // hack
|
||||||
|
else
|
||||||
|
xf.NextPointTo(p, pPoint^);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
xf.NextPoint(p);
|
||||||
|
if xf.noPlot then
|
||||||
|
pPoint^.x := MaxDouble // hack
|
||||||
|
else begin
|
||||||
|
//pPoint^.x := p.x; pPoint^.y := p.y; pPoint^.c := p.c;
|
||||||
|
pPoint^ := p;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Inc(pPoint);
|
||||||
end;
|
end;
|
||||||
Inc(pPoint);
|
|
||||||
end
|
|
||||||
except
|
except
|
||||||
on EMathError do begin
|
on EMathError do begin
|
||||||
exit;
|
exit;
|
||||||
@ -519,6 +538,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
procedure TControlPoint.IterateXYCC(NrPoints: integer; var Points: T2CPointsArray);
|
procedure TControlPoint.IterateXYCC(NrPoints: integer; var Points: T2CPointsArray);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -568,14 +588,14 @@ else
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
function TControlPoint.BlowsUp(NrPoints: integer): boolean;
|
function TControlPoint.BlowsUp(NrPoints: integer): boolean;
|
||||||
var
|
var
|
||||||
i, n: Integer;
|
i, n: Integer;
|
||||||
px, py: double;
|
px, py: double;
|
||||||
minx, maxx, miny, maxy: double;
|
minx, maxx, miny, maxy: double;
|
||||||
Points: TPointsXYArray;
|
Points: TPointsArray; //TPointsXYArray;
|
||||||
CurrentPoint: PXYPoint;
|
CurrentPoint: PXYPoint;
|
||||||
|
|
||||||
xf: TXForm;
|
xf: TXForm;
|
||||||
@ -862,7 +882,10 @@ begin
|
|||||||
|
|
||||||
end else if AnsiCompareText(CurrentToken, 'plotmode') = 0 then begin
|
end else if AnsiCompareText(CurrentToken, 'plotmode') = 0 then begin
|
||||||
Inc(ParsePos);
|
Inc(ParsePos);
|
||||||
xform[CurrentXForm].noPlot := StrToInt(ParseValues[ParsePos]) <> 0;
|
xform[CurrentXForm].noPlot := (ParseValues[ParsePos] = '1');
|
||||||
|
end else if AnsiCompareText(CurrentToken, 'retrace') = 0 then begin
|
||||||
|
Inc(ParsePos);
|
||||||
|
xform[CurrentXForm].RetraceXform := (ParseValues[ParsePos] = '1');
|
||||||
end else begin
|
end else begin
|
||||||
OutputDebugString(Pchar('Unknown Token: ' + CurrentToken));
|
OutputDebugString(Pchar('Unknown Token: ' + CurrentToken));
|
||||||
end;
|
end;
|
||||||
@ -1011,7 +1034,7 @@ end;
|
|||||||
|
|
||||||
procedure TControlPoint.CalcBoundbox;
|
procedure TControlPoint.CalcBoundbox;
|
||||||
var
|
var
|
||||||
Points: TPointsXYArray;
|
Points: TPointsArray; //TPointsXYArray;
|
||||||
i, j: integer;
|
i, j: integer;
|
||||||
deltax, minx, maxx: double;
|
deltax, minx, maxx: double;
|
||||||
cntminx, cntmaxx: integer;
|
cntminx, cntmaxx: integer;
|
||||||
@ -1040,7 +1063,7 @@ begin
|
|||||||
|
|
||||||
Prepare;
|
Prepare;
|
||||||
|
|
||||||
IterateXY(SUB_BATCH_SIZE, points);
|
IterateXYC(SUB_BATCH_SIZE, points);
|
||||||
|
|
||||||
LimitOutSidePoints := Round(0.05 * SUB_BATCH_SIZE);
|
LimitOutSidePoints := Round(0.05 * SUB_BATCH_SIZE);
|
||||||
|
|
||||||
@ -1127,7 +1150,7 @@ end;
|
|||||||
|
|
||||||
function CalcUPRMagn(const cp: TControlPoint): double;
|
function CalcUPRMagn(const cp: TControlPoint): double;
|
||||||
var
|
var
|
||||||
Points: TPointsXYArray;
|
Points: TPointsArray; //TPointsXYArray;
|
||||||
i, j: integer;
|
i, j: integer;
|
||||||
deltax, minx, maxx: double;
|
deltax, minx, maxx: double;
|
||||||
cntminx, cntmaxx: integer;
|
cntminx, cntmaxx: integer;
|
||||||
@ -1138,7 +1161,7 @@ var
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
SetLength(Points, SUB_BATCH_SIZE);
|
SetLength(Points, SUB_BATCH_SIZE);
|
||||||
cp.iterateXY(SUB_BATCH_SIZE, Points);
|
cp.iterateXYC(SUB_BATCH_SIZE, Points);
|
||||||
|
|
||||||
LimitOutSidePoints := Round(0.05 * SUB_BATCH_SIZE);
|
LimitOutSidePoints := Round(0.05 * SUB_BATCH_SIZE);
|
||||||
|
|
||||||
@ -1591,6 +1614,7 @@ begin
|
|||||||
sl.Add(s);
|
sl.Add(s);
|
||||||
|
|
||||||
sl.Add(Format('plotmode %d', [Ifthen(noPlot, 1, 0)]));
|
sl.Add(Format('plotmode %d', [Ifthen(noPlot, 1, 0)]));
|
||||||
|
sl.Add(Format('retrace %d', [Ifthen(RetraceXform, 1, 0)]));
|
||||||
|
|
||||||
end;
|
end;
|
||||||
DecimalSeparator := OldDecimalSperator;
|
DecimalSeparator := OldDecimalSperator;
|
||||||
|
@ -1572,6 +1572,7 @@ object EditForm: TEditForm
|
|||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Retrace xform'
|
Caption = 'Retrace xform'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnClick = chkRetraceClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -359,6 +359,7 @@ type
|
|||||||
procedure mnuChaosSetAllClick(Sender: TObject);
|
procedure mnuChaosSetAllClick(Sender: TObject);
|
||||||
procedure mnuLinkPostxformClick(Sender: TObject);
|
procedure mnuLinkPostxformClick(Sender: TObject);
|
||||||
procedure chkXformSoloClick(Sender: TObject);
|
procedure chkXformSoloClick(Sender: TObject);
|
||||||
|
procedure chkRetraceClick(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
TriangleView: TCustomDrawControl;
|
TriangleView: TCustomDrawControl;
|
||||||
@ -836,6 +837,7 @@ begin
|
|||||||
chkXformInvisible.Checked := noPlot;
|
chkXformInvisible.Checked := noPlot;
|
||||||
chkXformSolo.Enabled := true;
|
chkXformSolo.Enabled := true;
|
||||||
chkRetrace.Enabled := not noPlot;
|
chkRetrace.Enabled := not noPlot;
|
||||||
|
chkRetrace.Checked := RetraceXform;
|
||||||
if cp.soloXform >= 0 then begin
|
if cp.soloXform >= 0 then begin
|
||||||
chkXformSolo.Checked := true;
|
chkXformSolo.Checked := true;
|
||||||
chkXformSolo.Caption := Format('Solo transform #%d', [cp.soloXform + 1]);
|
chkXformSolo.Caption := Format('Solo transform #%d', [cp.soloXform + 1]);
|
||||||
@ -1384,7 +1386,7 @@ begin
|
|||||||
assert(trkVarPreviewRange.position > 0);
|
assert(trkVarPreviewRange.position > 0);
|
||||||
assert(trkVarPreviewDensity.position > 0);
|
assert(trkVarPreviewDensity.position > 0);
|
||||||
|
|
||||||
cp.xform[SelectedTriangle].prepare;
|
cp.xform[SelectedTriangle].Prepare;
|
||||||
|
|
||||||
n := trkVarPreviewRange.position * trkVarPreviewDensity.position * 5;
|
n := trkVarPreviewRange.position * trkVarPreviewDensity.position * 5;
|
||||||
d1 := trkVarPreviewDensity.position * 5;
|
d1 := trkVarPreviewDensity.position * 5;
|
||||||
@ -4383,7 +4385,10 @@ procedure TEditForm.VEVarsDrawCell(Sender: TObject; ACol, ARow: Integer;
|
|||||||
begin
|
begin
|
||||||
if (ARow > NRLOCVAR) and not (gdSelected in State) then
|
if (ARow > NRLOCVAR) and not (gdSelected in State) then
|
||||||
begin
|
begin
|
||||||
VEVars.canvas.brush.Color := $ffe0e0;
|
if Arow > NumBuiltinVars then
|
||||||
|
VEVars.canvas.brush.Color := $e0ffff
|
||||||
|
else
|
||||||
|
VEVars.canvas.brush.Color := $ffe0e0;
|
||||||
VEVars.canvas.fillRect(Rect);
|
VEVars.canvas.fillRect(Rect);
|
||||||
VEVars.canvas.TextOut(Rect.Left+2, Rect.Top+2, VEVars.Cells[ACol,ARow]);
|
VEVars.canvas.TextOut(Rect.Left+2, Rect.Top+2, VEVars.Cells[ACol,ARow]);
|
||||||
end;
|
end;
|
||||||
@ -5000,5 +5005,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TEditForm.chkRetraceClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
newValue: boolean;
|
||||||
|
begin
|
||||||
|
if (SelectedTriangle < Transforms) then begin
|
||||||
|
newValue := chkRetrace.Checked;
|
||||||
|
if cp.xform[SelectedTriangle].RetraceXform <> newValue then begin
|
||||||
|
MainForm.UpdateUndo;
|
||||||
|
cp.xform[SelectedTriangle].RetraceXform := newValue;
|
||||||
|
UpdateFlame(true);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ const
|
|||||||
RS_XO = 2;
|
RS_XO = 2;
|
||||||
RS_VO = 3;
|
RS_VO = 3;
|
||||||
|
|
||||||
AppVersionString = 'Apophysis 2.08 beta pre4.5';
|
AppVersionString = 'Apophysis 2.08 beta pre5';
|
||||||
|
|
||||||
type
|
type
|
||||||
TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove,
|
TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove,
|
||||||
@ -4248,10 +4248,18 @@ begin
|
|||||||
|
|
||||||
v := Attributes.Value('plotmode');
|
v := Attributes.Value('plotmode');
|
||||||
if v <> '' then begin
|
if v <> '' then begin
|
||||||
if v = 'off' then
|
if v = 'off' then begin
|
||||||
noPlot := true
|
noPlot := true;
|
||||||
else
|
RetraceXform := false;
|
||||||
noPlot := false;
|
end
|
||||||
|
else if v = 'retrace' then begin
|
||||||
|
noPlot := false;
|
||||||
|
RetraceXform := true;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
noPlot := false;
|
||||||
|
RetraceXform := false;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to NRVAR - 1 do
|
for i := 0 to NRVAR - 1 do
|
||||||
|
@ -106,7 +106,7 @@ var
|
|||||||
Bucket: PBucket32;
|
Bucket: PBucket32;
|
||||||
MapColor: PColorMapColor;
|
MapColor: PColorMapColor;
|
||||||
|
|
||||||
p: TCPPoint;
|
p, q: TCPPoint;
|
||||||
xf: TXForm;
|
xf: TXForm;
|
||||||
begin
|
begin
|
||||||
{$ifndef _ASM_}
|
{$ifndef _ASM_}
|
||||||
@ -133,22 +133,38 @@ end;
|
|||||||
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
||||||
for i := 0 to FUSE do begin
|
for i := 0 to FUSE do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
if xf.RetraceXform then continue;
|
||||||
xf.NextPoint(p);
|
xf.NextPoint(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
xf.NextPoint(p);
|
if xf.RetraceXform then begin
|
||||||
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
if xf.noPlot then continue;
|
xf.NextPointTo(p, q);
|
||||||
|
|
||||||
px := p.x - camX0;
|
px := q.x - camX0;
|
||||||
if (px < 0) or (px > camW) then continue;
|
if (px < 0) or (px > camW) then continue;
|
||||||
py := p.y - camY0;
|
py := q.y - camY0;
|
||||||
if (py < 0) or (py > camH) then continue;
|
if (py < 0) or (py > camH) then continue;
|
||||||
|
|
||||||
Bucket := @buckets[Round(bhs * py)][Round(bws * px)];
|
Bucket := @buckets[Round(bhs * py)][Round(bws * px)];
|
||||||
MapColor := @ColorMap[Round(p.c * 255)];
|
MapColor := @ColorMap[Round(q.c * 255)];
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
xf.NextPoint(p);
|
||||||
|
|
||||||
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
|
px := p.x - camX0;
|
||||||
|
if (px < 0) or (px > camW) then continue;
|
||||||
|
py := p.y - camY0;
|
||||||
|
if (py < 0) or (py > camH) then continue;
|
||||||
|
|
||||||
|
Bucket := @buckets[Round(bhs * py)][Round(bws * px)];
|
||||||
|
MapColor := @ColorMap[Round(p.c * 255)];
|
||||||
|
end;
|
||||||
|
|
||||||
Inc(Bucket.Red, MapColor.Red);
|
Inc(Bucket.Red, MapColor.Red);
|
||||||
Inc(Bucket.Green, MapColor.Green);
|
Inc(Bucket.Green, MapColor.Green);
|
||||||
@ -170,7 +186,7 @@ var
|
|||||||
Bucket: PBucket32;
|
Bucket: PBucket32;
|
||||||
MapColor: PColorMapColor;
|
MapColor: PColorMapColor;
|
||||||
|
|
||||||
p: TCPPoint;
|
p, q: TCPPoint;
|
||||||
xf: TXForm;
|
xf: TXForm;
|
||||||
begin
|
begin
|
||||||
{$ifndef _ASM_}
|
{$ifndef _ASM_}
|
||||||
@ -197,22 +213,38 @@ end;
|
|||||||
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
||||||
for i := 0 to FUSE do begin
|
for i := 0 to FUSE do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
if xf.RetraceXform then continue;
|
||||||
xf.NextPoint(p);
|
xf.NextPoint(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
xf.NextPoint(p);
|
if xf.RetraceXform then begin
|
||||||
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
if xf.noPlot then continue;
|
xf.NextPointTo(p, q);
|
||||||
|
|
||||||
px := p.x * cosa + p.y * sina + rcX;
|
px := q.x * cosa + q.y * sina + rcX;
|
||||||
if (px < 0) or (px > camW) then continue;
|
if (px < 0) or (px > camW) then continue;
|
||||||
py := p.y * cosa - p.x * sina + rcY;
|
py := q.y * cosa - q.x * sina + rcY;
|
||||||
if (py < 0) or (py > camH) then continue;
|
if (py < 0) or (py > camH) then continue;
|
||||||
|
|
||||||
Bucket := @buckets[Round(bhs * py)][Round(bws * px)];
|
Bucket := @buckets[Round(bhs * py)][Round(bws * px)];
|
||||||
MapColor := @ColorMap[Round(p.c * 255)];
|
MapColor := @ColorMap[Round(q.c * 255)];
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
xf.NextPoint(p);
|
||||||
|
|
||||||
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
|
px := p.x * cosa + p.y * sina + rcX;
|
||||||
|
if (px < 0) or (px > camW) then continue;
|
||||||
|
py := p.y * cosa - p.x * sina + rcY;
|
||||||
|
if (py < 0) or (py > camH) then continue;
|
||||||
|
|
||||||
|
Bucket := @buckets[Round(bhs * py)][Round(bws * px)];
|
||||||
|
MapColor := @ColorMap[Round(p.c * 255)];
|
||||||
|
end;
|
||||||
|
|
||||||
Inc(Bucket.Red, MapColor.Red);
|
Inc(Bucket.Red, MapColor.Red);
|
||||||
Inc(Bucket.Green, MapColor.Green);
|
Inc(Bucket.Green, MapColor.Green);
|
||||||
@ -262,16 +294,25 @@ end;
|
|||||||
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
||||||
for i := 0 to FUSE do begin
|
for i := 0 to FUSE do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
if xf.RetraceXform then continue;
|
||||||
xf.NextPoint(p);
|
xf.NextPoint(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
xf.NextPoint(p);
|
if xf.RetraceXform then begin
|
||||||
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
if xf.noPlot then continue;
|
xf.NextPointTo(p, q);
|
||||||
|
finalXform.NextPoint(q);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
xf.NextPoint(p);
|
||||||
|
|
||||||
finalXform.NextPointTo(p, q);
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
|
finalXform.NextPointTo(p, q);
|
||||||
|
end;
|
||||||
|
|
||||||
px := q.x - camX0;
|
px := q.x - camX0;
|
||||||
if (px < 0) or (px > camW) then continue;
|
if (px < 0) or (px > camW) then continue;
|
||||||
@ -328,16 +369,25 @@ end;
|
|||||||
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
xf := fcp.xform[0];//random(fcp.NumXForms)];
|
||||||
for i := 0 to FUSE do begin
|
for i := 0 to FUSE do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
|
if xf.RetraceXform then continue;
|
||||||
xf.NextPoint(p);
|
xf.NextPoint(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
for i := 0 to SUB_BATCH_SIZE-1 do begin
|
||||||
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
xf := xf.PropTable[Random(PROP_TABLE_SIZE)];
|
||||||
xf.NextPoint(p);
|
if xf.RetraceXform then begin
|
||||||
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
if xf.noPlot then continue;
|
xf.NextPointTo(p, q);
|
||||||
|
finalXform.NextPoint(q);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
xf.NextPoint(p);
|
||||||
|
|
||||||
finalXform.NextPointTo(p, q);
|
if xf.noPlot then continue;
|
||||||
|
|
||||||
|
finalXform.NextPointTo(p, q);
|
||||||
|
end;
|
||||||
|
|
||||||
px := q.x * cosa + q.y * sina + rcX;
|
px := q.x * cosa + q.y * sina + rcX;
|
||||||
if (px < 0) or (px > camW) then continue;
|
if (px < 0) or (px > camW) then continue;
|
||||||
|
@ -39,7 +39,7 @@ type
|
|||||||
|
|
||||||
TXYpoint = record
|
TXYpoint = record
|
||||||
x, y: double;
|
x, y: double;
|
||||||
skip: boolean;
|
//skip: boolean;
|
||||||
end;
|
end;
|
||||||
PXYpoint = ^TXYpoint;
|
PXYpoint = ^TXYpoint;
|
||||||
|
|
||||||
@ -80,8 +80,9 @@ type
|
|||||||
FFunctionList: array of TCalcFunction;
|
FFunctionList: array of TCalcFunction;
|
||||||
FCalcFunctionList: array of TCalcFunction;
|
FCalcFunctionList: array of TCalcFunction;
|
||||||
|
|
||||||
FTx, FTy: double;
|
FTx, FTy: double; // must remain in this order
|
||||||
FPx, FPy: double;
|
FPx, FPy: double; // some asm code relies on this
|
||||||
|
|
||||||
FAngle: double;
|
FAngle: double;
|
||||||
FSinA: double;
|
FSinA: double;
|
||||||
FCosA: double;
|
FCosA: double;
|
||||||
@ -2190,7 +2191,9 @@ begin
|
|||||||
Result := Result + '" ';
|
Result := Result + '" ';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if noPlot = true then
|
if RetraceXform then
|
||||||
|
Result := Result + 'plotmode="retrace" '
|
||||||
|
else if noPlot then
|
||||||
Result := Result + 'plotmode="off" ';
|
Result := Result + 'plotmode="off" ';
|
||||||
|
|
||||||
Result := Result + '/>';
|
Result := Result + '/>';
|
||||||
|
@ -8,6 +8,9 @@ uses
|
|||||||
const
|
const
|
||||||
NRLOCVAR = 30;
|
NRLOCVAR = 30;
|
||||||
|
|
||||||
|
var
|
||||||
|
NumBuiltinVars: integer;
|
||||||
|
|
||||||
function NrVar: integer;
|
function NrVar: integer;
|
||||||
function Varnames(const index: integer): String;
|
function Varnames(const index: integer): String;
|
||||||
procedure RegisterVariation(Variation: TVariationLoader);
|
procedure RegisterVariation(Variation: TVariationLoader);
|
||||||
@ -26,7 +29,7 @@ var
|
|||||||
VariationList: TList;
|
VariationList: TList;
|
||||||
VariableNames: TStringlist;
|
VariableNames: TStringlist;
|
||||||
loaderNum : integer;
|
loaderNum : integer;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
function NrVar: integer;
|
function NrVar: integer;
|
||||||
begin
|
begin
|
||||||
|
@ -223,6 +223,7 @@ var
|
|||||||
name, msg: string;
|
name, msg: string;
|
||||||
PluginData : TPluginData;
|
PluginData : TPluginData;
|
||||||
begin
|
begin
|
||||||
|
NumBuiltinVars := NRLOCVAR + GetNrRegisteredVariations;
|
||||||
// Try to find regular files matching *.dll in the plugins dir
|
// Try to find regular files matching *.dll in the plugins dir
|
||||||
if FindFirst('.\Plugins\*.dll', faAnyFile, searchResult) = 0 then
|
if FindFirst('.\Plugins\*.dll', faAnyFile, searchResult) = 0 then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user