Modifying Polygon Descriptors with User-Defined Functions

Modifying Polygon Descriptors with User-Defined Functions


Instead of using numbers in the polygon descriptors, they can be represented by the functions F1(z), F2(z), F3(z)... which can be defined by the user. This makes it possible to alter any or all aspects of the polygons as a function of z. The functions F1(z), F2(z), F3(z)... should be uploaded as a text file, and accessed using the syntax #1, #2, #3... respectively.

For example, a tapered fiber can be modeled as:

c 0.0052 0.0052 0 20000 #1 #2 #1 #2 0 0 0 0

where the fiber's x- and y- radii can be varied in any manner as defined by F1(z) and F2(z).

As another extreme example, here is a two-faced polygon represented entirely by external functions:

u #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 ....

Z-Functions

The functions should be listed as a two-dimensional array of numbers. For example, four functions F1(z), F2(z), F3(z) and F4(z) can be defined by:
1 1.009999833 0.998001999 0.001998001 1.99995 2 1.019998667 0.996007989 0.003992011 1.999800007 3 1.0299955 0.994017964 0.005982036 1.999550034 4 1.039989334 0.992031915 0.007968085 1.999200107 5 1.049979169 0.990049834 0.009950166 1.99875026 6 1.059964006 0.988071713 0.011928287 1.99820054 7 1.069942847 0.986097544 0.013902456 1.997551 8 1.079914694 0.98412732 0.01587268 1.996801706 9 1.089878549 0.982161032 0.017838968 1.995952733 10 1.099833417 0.980198673 0.019801327 1.995004165 11 1.109778301 0.978240235 0.021759765 1.993956098 12 1.119712207 0.97628571 0.02371429 1.992808636 13 1.129634143 0.97433509 0.02566491 1.991561894 14 1.139543115 0.972388367 0.027611633 1.990215996 15 1.149438132 0.970445534 0.029554466 1.988771078 16 1.159318207 0.968506582 0.031493418 1.987227283 17 1.169182349 0.966571505 0.033428495 1.985584767 ^ ^ ^ ^ ^ z F1(z) F2(z) F3(z) F4(z) The z-values do not have to be identical to the z-grid defined for the simulation. The values will be linearly interpolated to the simulation grid.