Objects of this type (select object type Interface curved I) implement almost arbitrary surfaces - created by a two-dimensional function defined over a rectangular basis. The dialog is this:
The parameters are the same as already explained for the rectangle. In addition, there is a user-defined Function that creates the surface shape. As variables you can use X and Y: X represents the distance from Location (the center of the rectangle) in direction of Vector 1, Y the distance in direction of Vector 2. As all geometrical distances, X and Y are measured in cm. The terms you can use in a formula are described in the Data Factory manual which is distributed with SPRAY.
The parameters shown above lead to the following surface shape:
Sending some test rays (air - glass interface):
Here is another example, showing a side view of the sinusoidal surface profile defined by 0.3*SIN(X*4*PI). Again, the interface is between air and glass, and the illumination is from the upper left:
The definition of that interface covering the user-defined surface is the same as explained for rectangles.
Access by OLE automation
OLE automation controllers can modfiy an object of type 'Interface Curved I' named 'MyName' in the SPRAY object list by the following OLE commands:
object_parameter("MyName", "x"): read/write the x-coordinate of Location
object_parameter("MyName", "y"): read/write the y-coordinate of Location
object_parameter("MyName", "z"): read/write the z-coordinate of Location
object_parameter("MyName", "x1"): read/write the x-coordinate of vector 1
object_parameter("MyName", "y1"): read/write the y-coordinate of vector 1
object_parameter("MyName", "z1"): read/write the z-coordinate of vector 1
object_parameter("MyName", "x2"): read/write the x-coordinate of vector 2
object_parameter("MyName", "y2"): read/write the y-coordinate of vector 2
object_parameter("MyName", "z2"): read/write the z-coordinate of vector 2
object_parameter_string("MyName", "surface_formula"): read/write the function definition as string