Creating a surface with a sine profile

The Implicit Script Surface allows the user to define surface profiles using a functional form in the built in BASIC scripting language. The user must provide FRED with the functional form of the surface as f(x,y,z) = 0. The derivatives for x, y and z must be explicitly defined, as FRED does not calculate them automatically.

A simple example of creating a surface with 1D sine profile in the Y direction is shown below:

Fig 1. Script snippet. The constants are defined locally

In the scripted surface the amplitude and frequency are defined locally as constants. An alternate approach is to define them globally (Tools... Edit /View Global Script Variable).

Figure 2. An isolated view of the Sine surface (set to be traceable in order to render)

In the example file provided the scripted surface is set to "never traceable" and used to modify the sag of a lens.

Download FRED file: 1D_SineProfile.frd

Still need help? Contact Us Contact Us