Created
April 21, 2020 21:54
-
-
Save RemyPorter/71d5abf49443fa0728bff3eadbe23f82 to your computer and use it in GitHub Desktop.
Just an interesting rule config for VisualPhaser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sim = builder(15, 3.3, 1) | |
.rule(new RuleStep() { | |
public float f(float x, float y, PhaseField field) { | |
return (x * 1.6 - y * 0.9) * sin(field.dc(x, y)/(width+height)*8*PI) * 0.01 + PI; | |
} | |
}, 1) | |
.rule(new RuleStep() { | |
public float f(float x, float y, PhaseField field) { | |
return pow(x*x+y*y, 0.5); | |
} | |
}, 0.05) | |
.useColor(#FFFFFF, #E0E0E0) | |
//.sinWeight(0.25) | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment