Formula
The formula sorce code can be edited by pressing the Formula tab on the upper right.
Because everything in Gestaltlupe is based on Microsoft .NET framework, all predefined mathematical methods has to start with Math.
public override long InSet(double ar, double ai, double aj, double br, double bi, double bj, double bk, long zkl, bool invers) {
if(ar*ar+ai*ai+aj*aj1)
return (0);
if(Math.Abs(ar)+Math.Abs(ai)+Math.Abs(aj)<1.4)
return (0);
return 1;
}
Surface colours can be defined in the field additionalPointInfo. The rgb-values of the surface color corresponds to (additionalPointInfo.red, additionalPointInfo.green, additionalPointInfo.blue).
public override bool GetBool(double x, double y, double z)
{
if(x*x+y*y+z*z<1)
{
additionalPointInfo.red=1;
additionalPointInfo.green=1;
return true;
}
if(Math.Abs(x)+Math.Abs(y)+Math.Abs(z)<1.4)
{
additionalPointInfo.blue=0.6;
return true;
}
return false;
}
Of course to see the colors, the parameter Color Outside has to be set in Material tab.