12 private readonly
double m;
13 private readonly
double n1;
14 private readonly
double n2;
15 private readonly
double n3;
16 private readonly
double holes;
17 private readonly
double rnd;
24 : base(new
ScriptNode[] { m, n1, n2, n3, holes, rnd },
43 : base(new
ScriptNode[] { m, n1, n2, n3, holes, rnd },
69 this.Arguments[1], this.Arguments[2], this.Arguments[3], this.Arguments[4],
80 return new string[] {
"m",
"n1",
"n2",
"n3",
"holes",
"rnd" };
87 public override void Operate(ref
double x, ref
double y)
93 r1 = this.gen.NextDouble();
96 double pneg1_n1 = -1.0 / this.n1;
97 double theta = (this.m * Math.Atan2(y, x) + Math.PI) / 4.0;
98 double t1 = Math.Pow(Math.Abs(Math.Sin(theta)), this.n2);
99 double t2 = Math.Pow(Math.Abs(Math.Cos(theta)), this.n3);
100 double r = Math.Sqrt(x * x + y * y) + 1e-6;
101 r = ((this.rnd * r1 + (1.0 - this.rnd) * r - this.holes) * Math.Pow(t1 + t2, pneg1_n1)) / r;
106 private readonly Random gen =
new Random();
Class managing a script expression.
static double ToDouble(object Object)
Converts an object to a double value.
override string[] DefaultArgumentNames
TODO
SuperShapeVariation(double M, double N1, double N2, double N3, double Holes, double Rnd, ScriptNode m, ScriptNode n1, ScriptNode n2, ScriptNode n3, ScriptNode holes, ScriptNode rnd, int Start, int Length, Expression Expression)
TODO
override string FunctionName
TODO
SuperShapeVariation(ScriptNode m, ScriptNode n1, ScriptNode n2, ScriptNode n3, ScriptNode holes, ScriptNode rnd, int Start, int Length, Expression Expression)
TODO
override void Operate(ref double x, ref double y)
TODO
override IElement Evaluate(IElement[] Arguments, Variables Variables)
TODO
object AssociatedObjectValue
TODO
ScriptNode[] Arguments
Function arguments.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Basic interface for all types of elements.
ArgumentType
Type of parameter used in a function definition or a lambda definition.