Creating a modified 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:
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/5b19b3b60428632c466aab9b/images/5b2827d52c7d3a0fa9a32193/file-GyPNMWmRMk.jpg)
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).
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/5b19b3b60428632c466aab9b/images/6630ea85e7511e33f36ea9ad/file-63jJ0MEdoq.png)
In the example file provided the scripted surface is set to "never traceable" and used to modify the sag of a lens.
![](http://d33v4339jhl8k0.cloudfront.net/docs/assets/5b19b3b60428632c466aab9b/images/675174ca1b79eb2b2284c84f/file-i3pRUDbTbl.png)
Download FRED file: 1D_SineProfile.frd