Skip to content

Commit

Permalink
Added rotation affine parameter to UI and other minor updates/cleanup…
Browse files Browse the repository at this point in the history
…. Included Studio version of FLAM3 for H18.x verison 0.8.0
  • Loading branch information
alexnardini committed Nov 10, 2021
1 parent 7ab85f7 commit 9b56623
Show file tree
Hide file tree
Showing 10 changed files with 4,822 additions and 4,713 deletions.
42 changes: 27 additions & 15 deletions compiled/H18.x/TFFAvactive.vex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ __llvm_entry:
cond: ; preds = %iter, %__llvm_entry
%i.0 = phi i64 [ 0, %__llvm_entry ], [ %output, %iter ]
%IW.0 = phi double* [ getelementptr inbounds ([0 x double]* @2, i64 0, i64 0), %__llvm_entry ], [ %IW.1, %iter ]
%vactive.0 = phi i64* [ getelementptr inbounds ([0 x i64]* @1, i64 0, i64 0), %__llvm_entry ], [ %output10, %iter ]
%vactive.0 = phi i64* [ getelementptr inbounds ([0 x i64]* @1, i64 0, i64 0), %__llvm_entry ], [ %vactive.1, %iter ]
%return3 = call i64 @"lt@III"(i64 %i.0, i64 %return)
%0 = icmp ne i64 %return3, 0
br i1 %0, label %body, label %end
Expand All @@ -30,25 +30,35 @@ body: ; preds = %cond
%return8 = call i8* @"concat@SSS"(i8* getelementptr inbounds ([12 x i8]* @3, i64 0, i64 0), i8* %return5)
%return9 = call i64 @"chi@IS"(i8* %return8)
%output10 = call i64* @"append@[II"(i64* %vactive.0, i64 %return9)
%return13 = call i64 @"getcomp@I[II"(i64* %output10, i64 %i.0)
%return14 = call i64 @"not@II"(i64 %return13)
%1 = icmp ne i64 %return14, 0
br i1 %1, label %iter, label %end15
%return12 = call i8* @"concat@SSS"(i8* getelementptr inbounds ([7 x i8]* @4, i64 0, i64 0), i8* %return5)
%return13 = call double @"chf@FS"(i8* %return12)
%return15 = fcmp oeq double %return13, 0.000000e+00
br i1 %return15, label %true, label %end17

end: ; preds = %cond
store i64* %vactive.0, i64** %_bound_VACTIVE
%return26 = call double* @"create_cdf@[F[F"(double* %IW.0)
store double* %return26, double** %_bound_CDF
%return38 = call double* @"create_cdf@[F[F"(double* %IW.0)
store double* %return38, double** %_bound_CDF
ret void

iter: ; preds = %body, %end15
%IW.1 = phi double* [ %IW.0, %body ], [ %output20, %end15 ]
iter: ; preds = %end17, %end27
%IW.1 = phi double* [ %IW.0, %end17 ], [ %output32, %end27 ]
br label %cond

end15: ; preds = %body
%return18 = call i8* @"concat@SSS"(i8* getelementptr inbounds ([7 x i8]* @4, i64 0, i64 0), i8* %return5)
%return19 = call double @"chf@FS"(i8* %return18)
%output20 = call double* @"append@[FF"(double* %IW.0, double %return19)
true: ; preds = %body
%return19 = call { i64, i64* } @"setcomp@I[III"(i64* %output10, i64 0, i64 %i.0)
%output21 = extractvalue { i64, i64* } %return19, 1
br label %end17

end17: ; preds = %true, %body
%vactive.1 = phi i64* [ %output21, %true ], [ %output10, %body ]
%return24 = call i64 @"getcomp@I[II"(i64* %vactive.1, i64 %i.0)
%return25 = call i64 @"not@II"(i64 %return24)
%1 = icmp ne i64 %return25, 0
br i1 %1, label %iter, label %end27

end27: ; preds = %end17
%output32 = call double* @"append@[FF"(double* %IW.0, double %return13)
br label %iter
}

Expand All @@ -62,12 +72,14 @@ declare i8* @"concat@SSS"(i8*, i8*) nounwind readnone

declare i64* @"append@[II"(i64*, i64) nounwind

declare double @"chf@FS"(i8*) nounwind readnone

declare { i64, i64* } @"setcomp@I[III"(i64*, i64, i64) nounwind readnone

declare i64 @"getcomp@I[II"(i64*, i64) nounwind readnone

declare i64 @"not@II"(i64) nounwind readnone

declare double @"chf@FS"(i8*) nounwind readnone

declare double* @"append@[FF"(double*, double) nounwind

declare double* @"create_cdf@[F[F"(double*) nounwind readnone
Expand Down
7,929 changes: 3,972 additions & 3,957 deletions compiled/H18.x/TheFractalFlameAlgorithm.vex

Large diffs are not rendered by default.

1,534 changes: 801 additions & 733 deletions compiled/H19.x/TheFractalFlameAlgorithm.vex

Large diffs are not rendered by default.

Binary file modified otl/H18.x/alexnardini__FLAME.otl
Binary file not shown.
Binary file modified presets/H18.x/presets/Sop/alexnardini-FLAME.idx
Binary file not shown.
Binary file modified presets/H19.x/presets/Sop/alexnardini-FLAME.idx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/TFFAvactive.vfl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
/ Title: SideFX Houdini FRACTAL FLAME generator: 2D
/ Author: Alessandro Nardini
/ date: October 2020, Last revised April 2021
/ date: October 2020, Last revised November 2021
/
/ info: Based on the original: "The Fractal Flame Algorithm"
/ Authors: Scott Draves, Erik Reckase
Expand Down
2 changes: 1 addition & 1 deletion src/TheFractalFlameAlgorithm.vfl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void _TheFractalFlameAlgorithm(int _bound_ptnum; const int _bound_VACTIVE[]; con
cvex
TheFractalFlameAlgorithm( export int ptnum = 0;
const int VACTIVE[] = {};
const float CDF[] = {};
const float CDF[] = {};
export float pscale = 0;
export float COORD = 0;
export vector P = 0)
Expand Down
24 changes: 19 additions & 5 deletions src/genome.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
/ Comment: GENOME entities and properties.
*/

void affineRot(matrix2 m2; const vector2 x, y; const float ang){
m2 = set(x, y);
rotate(m2, ang);
}

struct gemSYS{
int TMG, DELPT, POSTF, FF, iter_f, sym, sym_mode, iter, domb, vizmb;
Expand Down Expand Up @@ -43,7 +47,9 @@ struct gem{
string sIDX[];

void gemBuild(const int VACTIVE[]; const gemSYS SYS){
float coord, speed;
float _a, coord, speed;
vector2 _x, _y;
matrix2 m2;
for(int i=0; i<SYS.iter_f; i++){
if(!VACTIVE[i]) continue;
string IDX=itoa(i+1);
Expand Down Expand Up @@ -73,8 +79,12 @@ struct gem{
if(v4w[-1]!=0) append(v4type, atoi(chs(concat("../v4type_", IDX))));
else resize(v4type, res);
// Collect affine coefficients
append(x, chu(concat("../x_", IDX)));
append(y, chu(concat("../y_", IDX)));
_x = chu(concat("../x_", IDX));
_y = chu(concat("../y_", IDX));
_a = chf(concat("../ang_", IDX));
affineRot(m2, _x, _y, -radians(_a));
append(x, set(m2.xx, m2.xy));
append(y, set(m2.yx, m2.yy));
append(o, chu(concat("../o_", IDX)));
// POST
append(POSTL, chi(concat("../dopost_", IDX)));
Expand Down Expand Up @@ -110,8 +120,12 @@ struct gem{
ffp1w = chf("../ffp1weight");
if(ffp1w!=0) ffp1type = chi("../ffp1type");
// Collect FINAL FLAME TRANSFORM affine coefficients
fx = chu("../_fx_2");
fy = chu("../_fy_2");
_x = chu("../_fx_2");;
_y = chu("../_fy_2");;
_a = chf("../_ang_2");
affineRot(m2, _x, _y, -radians(_a));
fx = set(m2.xx, m2.xy);
fy = set(m2.yx, m2.yy);
fo = chu("../_fo_2");
// POST
if(SYS.POSTF){
Expand Down
2 changes: 1 addition & 1 deletion src/variations.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
/ Title: SideFX Houdini FRACTAL FLAME generator: 2D
/ Author: Alessandro Nardini
/ date: October 2020, Last revised May 2021
/ date: October 2020, Last revised November 2021
/
/ info: Based on the original: "The Fractal Flame Algorithm"
/ Authors: Scott Draves, Erik Reckase
Expand Down

0 comments on commit 9b56623

Please sign in to comment.