ScalarField explanation of what ScalarField is and/or does


Inherits from: Object


More detailed prose description of ScalarField.


See also: Object [some other help files]


Some Important Issues Regarding ScalarField (optional)


Explanation of the issues. For more information see Nil and [some other help files].


Creation / Class Methods


*new (func, dim)

Short prose description of method.

func - Explanation of func. Default value is nil. Other information.

dim - Explanation of dim. Default value is nil. Other information.

// inline example

g = ScalarField.new;

g.doSomething; // explanation

g.cleanUpMethod;



Accessing Instance and Class Variables

func_(arg1)

func

Explanation including the type of func and a link to its help file.

Default value is nil.

dim

Explanation including the type of dim and a link to its help file.

Default value is nil.

Doing Some Task (optional)


A short bit of prose explaining something about the task.

value (vector, t)

Short prose description of method.

vector - Explanation of vector. Default value is nil. Other information.

t - Explanation of t. Default value is nil. Other information.

// inline example

g = ScalarField.value;

g.doSomething; // explanation

g.cleanUpMethod;


grad (vector, t, delta)

Short prose description of method.

vector - Explanation of vector. Default value is nil. Other information.

t - Explanation of t. Default value is 0. Other information.

delta - Explanation of delta. Default value is 0.01. Other information.

// inline example

g = ScalarField.grad;

g.doSomething; // explanation

g.cleanUpMethod;



gradFieldF (delta)

Short prose description of method.

delta - Explanation of delta. Default value is 0.01. Other information.

// inline example

g = ScalarField.gradFieldF;

g.doSomething; // explanation

g.cleanUpMethod;



asSCImageUni (rect, hsize, res, contrast, color, t)

Short prose description of method.

rect - Explanation of rect. Default value is nil. Other information.

hsize - Explanation of hsize. Default value is 100. Other information.

res - Explanation of res. Default value is 0.1. Other information.

contrast - Explanation of contrast. Default value is 1. Other information.

color - Explanation of color. Default value is [ 247. Other information.

t - Explanation of t. Default value is nil. Other information.

// inline example

g = ScalarField.asSCImageUni;

g.doSomething; // explanation

g.cleanUpMethod;



plotUni (rect, hsize, res, contrast, color, t)

Short prose description of method.

rect - Explanation of rect. Default value is nil. Other information.

hsize - Explanation of hsize. Default value is 300. Other information.

res - Explanation of res. Default value is 0.3. Other information.

contrast - Explanation of contrast. Default value is 1. Other information.

color - Explanation of color. Default value is [ 247. Other information.

t - Explanation of t. Default value is nil. Other information.

// inline example

g = ScalarField.plotUni;

g.doSomething; // explanation

g.cleanUpMethod;


asSCImageBi (rect, hsize, res, contrast, color1, color2, t)

Short prose description of method.

rect - Explanation of rect. Default value is nil. Other information.

hsize - Explanation of hsize. Default value is 100. Other information.

res - Explanation of res. Default value is 0.1. Other information.

contrast - Explanation of contrast. Default value is 1. Other information.

color1 - Explanation of color1. Default value is [ 247. Other information.

color2 - Explanation of color2. Default value is nil. Other information.

t - Explanation of t. Default value is nil. Other information.

// inline example

g = ScalarField.asSCImageBi;

g.doSomething; // explanation

g.cleanUpMethod;



plotBi (rect, hsize, res, contrast, color1, color2, t)

Short prose description of method.

rect - Explanation of rect. Default value is nil. Other information.

hsize - Explanation of hsize. Default value is 100. Other information.

res - Explanation of res. Default value is 0.4. Other information.

contrast - Explanation of contrast. Default value is 1. Other information.

color1 - Explanation of color1. Default value is [ 247. Other information.

color2 - Explanation of color2. Default value is nil. Other information.

t - Explanation of t. Default value is nil. Other information.

// inline example

g = ScalarField.plotBi;

g.doSomething; // explanation

g.cleanUpMethod;


checkDim (field)

Short prose description of method.

field - Explanation of field. Default value is nil. Other information.

// inline example

g = ScalarField.checkDim;

g.doSomething; // explanation

g.cleanUpMethod;




Examples


// Mathematical operations


// * 

(

a = ScalarField({|v,t| if(v.x < 0.75){1}{0} },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

b = ScalarField({|v,t| if(v.x > 0.25){1}{0} },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

c = a*b;

c.plotUni(Rect(0,0,1,1),360,0.2);

)


// +

(

a = ScalarField({|v,t| if(v.x > 0.75){1}{0} },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

b = ScalarField({|v,t| if(v.x < 0.25){1}{0} },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

c = a+b;

c.plotUni(Rect(0,0,1,1),360,0.2);

)


// min

(

a = ScalarField({|v,t| v.x },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

b = ScalarField({|v,t| 0.5 },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

c = a.min(b);

c.plotUni(Rect(0,0,1,1),360,0.2);

)


// div

(

a = ScalarField({|v,t| v.x*10 },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

b = ScalarField({|v,t| if(v.y<0.5){2}{4} },360,0.2).plotUni(Rect(0,0,1,1),360,0.2);

c = a.div(b);

c.plotUni(Rect(0,0,1,1),360,0.2);

)