21
Breault Research Organization, Inc. Copyright © 2014 All rights reserved. 6400 East Grant Road, Suite 350, Tucson, Arizona 85715 USA www.breault.com | [email protected] 800-882-5085 USA | Canada | 1-520-721-0500 Worldwide | 1-520-721-9630 Fax ASAP TECHNICAL PUBLICATION BRO4328 (MARCH 6, 2013) Microstructure Modeling in ASAP Defining and tracing unit-cell microstructure This technical publication describes microstructure modeling in the Advanced Systems Analysis Program (ASAP®) from Breault Research Organization (BRO). Instructions are given for defining microstructure with unit cells and attaching this microstructure to objects. BRO has introduced a new microstructure simulation technique in ASAP 2013V1R1. The new technique is based upon a unit-cell methodology. This technique works best when the geometrical dimensions of the microstructure are small as compared with the characteristic dimensions of the surface that supports the microstructure, but large compared to the wavelength of incident light. Ray tracing must describe the propagation of light through the mi- crostructure. The technique does not account for diffraction. The unit-cell technique is easy to use, fast, and accurate. It avoids explicit representations that are not: 1) easy to model (too many objects) and stitch facets together on an arbitrary curved surface; 2) easy to change and optimize; and 3) easily stored in computer memory (hundreds of thousands, or even millions, of separate objects). The tech- nique is: 1) fast, providing ray trace times that are on the order of 5 to 100 times faster than explicit models; and 2) accurate with microstructure ray traces including refraction, reflection, total internal reflection (TIS), scatter, and ray splitting within and between the microstructure cells. Background Microstructure is a replicated geometrical pattern whose physical dimensions are small compared to the surface on which it is placed, but large compared to the wavelength of light interacting within the microstructure. Micro- structures have been simulated with a variety of techniques. One technique is exact representation of all the mi- crostructure geometry. This is an accurate geometrical model of all microstructure features, but requires a lot of computer storage and long simulation times, due to the large number of microstructure objects. Microstructures can also be simulated by arraying the microstructure in linear and non-linear patterns. (See the ARRAY and ARRAY NONLINEAR command topics in ASAP Help.) This is a fast and accurate model of all micro- structure features, but it is limited to the entity types that can be replicated in the microstructure; that is, only poly- nomial representations of microstructure can be simulated with this technique. Moreover, arrays are limited in their ability to conformally wrap the microstructure to a base object. Microstructures are sometimes simulated with bi-direction scattering distribution functions (BSDF), or scatter models describing the angular behavior of the microstructure. This technique is fast, but it is often difficult to de- fine a BSDF model that accurately describes the optical characteristics of the surface.

Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

A S A P T E C H N I C A L P U B L I C A T I O N

B R O 4 3 2 8 ( M A R C H 6 , 2 0 1 3 )

Microstructure Modeling in ASAPDefining and tracing unit-cell microstructure

This technical publication describes microstructure modeling in the Advanced Systems Analysis Program (ASAP®) from Breault Research Organization (BRO). Instructions are given for defining microstructure with unit cells and attaching this microstructure to objects.

BRO has introduced a new microstructure simulation technique in ASAP 2013V1R1. The new technique is based upon a unit-cell methodology. This technique works best when the geometrical dimensions of the microstructure are small as compared with the characteristic dimensions of the surface that supports the microstructure, but large compared to the wavelength of incident light. Ray tracing must describe the propagation of light through the mi-crostructure. The technique does not account for diffraction.

The unit-cell technique is easy to use, fast, and accurate. It avoids explicit representations that are not: 1) easy to model (too many objects) and stitch facets together on an arbitrary curved surface; 2) easy to change and optimize; and 3) easily stored in computer memory (hundreds of thousands, or even millions, of separate objects). The tech-nique is: 1) fast, providing ray trace times that are on the order of 5 to 100 times faster than explicit models; and 2) accurate with microstructure ray traces including refraction, reflection, total internal reflection (TIS), scatter, and ray splitting within and between the microstructure cells.

BackgroundMicrostructure is a replicated geometrical pattern whose physical dimensions are small compared to the surface on which it is placed, but large compared to the wavelength of light interacting within the microstructure. Micro-structures have been simulated with a variety of techniques. One technique is exact representation of all the mi-crostructure geometry. This is an accurate geometrical model of all microstructure features, but requires a lot of computer storage and long simulation times, due to the large number of microstructure objects.

Microstructures can also be simulated by arraying the microstructure in linear and non-linear patterns. (See the ARRAY and ARRAY NONLINEAR command topics in ASAP Help.) This is a fast and accurate model of all micro-structure features, but it is limited to the entity types that can be replicated in the microstructure; that is, only poly-nomial representations of microstructure can be simulated with this technique. Moreover, arrays are limited in their ability to conformally wrap the microstructure to a base object.

Microstructures are sometimes simulated with bi-direction scattering distribution functions (BSDF), or scatter models describing the angular behavior of the microstructure. This technique is fast, but it is often difficult to de-fine a BSDF model that accurately describes the optical characteristics of the surface.

Breault Research Organization, Inc.

Copyright © 2014 All rights reserved.

6400 East Grant Road, Suite 350, Tucson, Arizona 85715 USA

www.breault.com | [email protected]

800-882-5085 USA | Canada | 1-520-721-0500 Worldwide | 1-520-721-9630 Fax

Page 2: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

Unit -ce l l microstructure modelUnit-cell modeling and ray tracing of microstructure takes advantage of the large difference in scale between the dimensions of parent surfaces upon which microstructure is placed, and the dimensions of the microstructure. It is assumed that the microstructure may be represented as a two-dimensional replication of a unit cell. This is illustrated over a plane in Figure 1.

Figure 1 A replicated unit cell

Unit cellUnit cell

2 Microstructure Modeling in ASAP

Page 3: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 3

For curved surfaces, we use a conformal coordinate system with local x and y axis directions that are defined at every point on the surface, as illustrated in Figure 2. Replication of the unit cell is done over this conformal co-ordinate system.

Figure 2 A replicated unit cell over a curved surface with a conformal coordinate system

Unit-cell modeling assumes the microstructure is so small that a bundle of rays intersecting any given region of a parent surface is randomly distributed across the unit cells of that region.

A ray intersecting the parent surface is traced using a proprietary algorithm that simulates non-sequential ray tracing through the unit cell. This trace includes refraction, reflection, scatter, and ray splitting. After tracing the unit cell, the parent ray and any split rays continue on from the parent surface and are traced through the rest of the optical system. Figure 3 illustrates ray tracing through a unit cell.

Figure 3 Simulating geometrical ray tracing on the surface and within the unit-cell microstructure

Local xcoordinate axis

Local ycoordinate axis

Local xcoordinate axis

Local ycoordinate axis

Page 4: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

Unit-cell modeling offers several advantages over explicit modeling of the microstructure or defining an effec-tive scatter function:

• The detailed microstructure, including its many thousands or millions of unit cells, does not have to be modeled within a CAD system and imported into ASAP. This simplifies the modeling of microstructure, and vastly reduces both computer memory requirements and ray-trace time.

• Microstructure can be applied to any ASAP object that is constructed of one or more surface or edge (curve) entities.

• The technique bypasses subtle geometrical problems associated with stitching unit cells over curved surfaces. The directions of traced rays are correct, given the local orientation of the of the unit cell that is defined by the surface normal and conformal coordinate system. No leaks occur through gaps between unit cells.

• All the relevant geometrical optical effects are included: reflection, refraction, total internal reflection, Fresnel reflections (ghosts), and scatter.

• The approach works for both smooth and faceted unit-cell surfaces.

Def in ing uni t ce l lsModeling microstructure in ASAP begins by defining the size, geometry, and optical properties of a unit cell. Here are step-by-step instructions.

S t e p 1

Unit cells always have a rectangular boundary. A rectangular edge defines the boundary and size of the unit cell. The edge must be normal to the z axis and centered on the origin. For example, the following edge defines a 4 mm by 2 mm (full width) unit-cell boundary with the long dimension parallel to the x axis:

UNITS MM

EDGE

REC Z 0 2 1

RETURN

S t e p 2

Unit-cell geometry is defined with surface and edge (curve) objects. Lens entities may not be used to define the objects in a unit cell. Assign interface and scatter properties to objects in the unit cell in the usual way.

S t e p 3

The interior of the unit cell must not have gaps through which rays can pass without intersecting anything, and the objects within the unit cell should fill, but not overfill, the boundaries of the unit cell, as defined by the rect-angular edge of the unit cell.

4 Microstructure Modeling in ASAP

Page 5: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 5

S t e p 4

An array of unit cells should not have gaps at the boundaries of the unit cell. Figure 4 is an in-plane illustration; the lower graphic shows how unit cells must be defined.

Figure 4 Unit cells must be defined so that an array of cells does not have gaps at the boundaries (shown by vertical dotted lines)

Ray can pass through this gap

No. Array of unit cells hasgaps at the boundary

Ray can pass through this gap

No. Array of unit cells hasgaps at the boundary

Yes. Array of unit cells hashas no gapsYes. Array of unit cells hashas no gaps

Page 6: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

If the intended geometry on the upper illustration of Figure 4 is a tilted arc with a vertical wall between cells, this should be explicitly constructed by adding a wall within the unit cell, as illustrated in Figure 5.

Figure 5 Steep wall attached to the right side of each unit cell forms a continuous surface

S t e p 5

Unit cells must avoid coincident surfaces when they are arrayed. Figure 6 illustrates how vertical walls define geometry with overlapping surfaces when unit cells are arrayed.

Figure 6 A unit cell that produces a coincident surface on the boundary

Yes. Steep wall joins adjacentunit cells to form a continuoussurface

Yes. Steep wall joins adjacentunit cells to form a continuoussurface

No. Unit cell must not producecoincident surfaces when it is arrayed

Unit cell Arrayed unit cell

No!

No. Unit cell must not producecoincident surfaces when it is arrayed

Unit cell Arrayed unit cell

No!

6 Microstructure Modeling in ASAP

Page 7: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 7

A unit cell may contain absorbing media (or media with a complex refractive index). When absorbing media are present, special consideration must be given to the size of the unit cell and where surfaces are placed along the z axis. Volume absorption depends upon the optical path length that is traveled by a ray. To get the correct optical path length, the size of the unit cell must match the actual size of the microstructure. In addition, the placement of the microstructure on the surface must line up with the actual microstructure. Figure 7 illustrates this for a simple V-groove microstructure, which affects the amount of absorbing material through which a ray propagates.

Figure 7 The optical path length on the top is longer than the one below it, so more power is absorbed

Absorption is higher if the base of each groove is lined up with the surface, rather than if the top of the V-groove is lined up, because the ray travels through more absorbing material.

Absorbing mediumAbsorbing medium

Absorbing mediumAbsorbing medium

Page 8: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

The convention in ASAP is that the surface to which microstructure is applied is coincident with the z=0 plane in the unit cell. See Figure 8.

Figure 8 Aligning the z=0 plane of the unit cell with the surface (in this case, the top plane) to which the microstructure is applied

MICROSTRUCTURE model in ASAPThe rectangular edge that defines a unit-cell boundary, and the objects that define the unit-cell geometry and op-tical properties, are associated together in the MICROSTRUCTURE command, which defines an anisotropic ASAP model. The syntax is:

MODEL

MICROSTRUCTURE X e j1 j2 j3 ...

The anisotropic coordinate parameter X is a proxy for any of 10 options: X, Y, Z, U, V, W, R, T, A, D. These param-eters call out a reference direction that defines the orientation of the local axes (that is, the axes of a conformal coordinate system) on a surface. They are discussed in “Local coordinate system definition in ASAP” on page 9.

Parameter e is the entity number of the rectangular edge that defines the dimensions of a unit cell. The parame-ters j1, j2, j3 ... are the objects that collectively define the unit cell within the dimensions of the rectan-gular edge e. These objects may be defined with a native ASAP script or they may be imported from a CAD program.

The usual ASAP capabilities and conventions apply to object entries (object names, wild cards, relative refer-encing, and so on). More than one microstructure model may be defined; systems can be modeled with different microstructures placed on two or more separate objects.

Absorbing medium

Air

Air

z=0

Unit cell

Absorbing medium

Air

Air

z=0

Unit cell

8 Microstructure Modeling in ASAP

Page 9: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 9

NOTE Although microstructure is defined in ASAP by adding an ASAP scatter model, the microstructure is NOT modeled as an effective BRDF (bi-directional reflectance distribution function). Redirection and generation of rays are done by ray tracing within the unit cell. Defining microstructure as a scatter model is simply a syntactically convenient method.

Microstructure is applied to an object in the same way that any scatter model is assigned to the object. The model number is indicated in the SCATTER MODEL command after the OBJECT definition:

OBJECT ‘object_name’

SCATTER MODEL m

where m is the number of the microstructure model.

Local coordinate system def in i t ion in ASAPAt any point on any surface, ASAP defines a local coordinate system by combining the surface normal with a user-entered reference direction. In practice, ASAP offers 10 options for reference direction (X, Y, Z, U, V, W, R, T, A, and D). These choices are discussed shortly. For the current discussion, assume that a reference direction is given and denote this reference direction by the vector X.

A coordinate axis is defined at each point on the surface along the surface normal. A coordinate axis that

is perpendicular to both the reference direction X and is defined by the vector cross product:

Equation 1

A coordinate axis that completes a right-handed coordinate system is then defined by a cross product of with :

Equation 2

The coordinate system , , is the local coordinate system for the unit cells that define the microstructure at a given point on a surface.

X =

=

Page 10: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

Figure 9 illustrates an arbitrary surface.

Figure 9 Local coordinates as defined from surface normal and a reference direction X, centered on an arbitrary point of surface

Nine choices exist for defining a reference direction. The first three options, X, Y, and Z, define a reference di-rection that is parallel to the ASAP global x, y, and z axes. These reference directions do not rotate with the object. That is, if an object with microstructure is rotated, the microstructure does not rotate with the object; it stays aligned with the global axes.

The reference direction and microstructure orientation for surface-based entities can be fixed to the object by using the options U, V, or W. These reference directions are parallel to local x, y, z axes that are attached to the object. They rotate with the object.

Edge-based objects apply a different convention. The objects have an internal, conformal coordinate system at-tached to them, which is used to define the reference direction. The W option is not available for edge-based

Surface Normal

Reference Direction X

Surface Normal

Reference Direction X

10 Microstructure Modeling in ASAP

Page 11: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 11

objects. See Figure 10.

Figure 10 U and V reference directions defined on an edge-based object

Three options, R, T, and A, define reference directions that radiate out or wrap around the center of an object. For objects with axial symmetry, the A option defines a reference direction that is parallel to the axis of the object. See Figure 11.

Figure 11 Reference directions associated with options (left, plane with R option; center, plane with T option; right, tube with A option)

U

V

EDGEELL Z -5 1 1 32, 0 180RECT Z 5 2 2 32, 0 180

OBJECT;.1 .2 ‘TROUGH‘FACETS 1 25

U

V

EDGEELL Z -5 1 1 32, 0 180RECT Z 5 2 2 32, 0 180

OBJECT;.1 .2 ‘TROUGH‘FACETS 1 25

Page 12: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

The D option allows you to explicitly define an arbitrary reference direction. The syntax for this option has three additional entries:

MODEL

MICROSTRUCTURE D a b c, e j1 j2 j3 …

where a b c are the vector components of the reference direction in global coordinates. The variables, e j1 j2 j3 …, are the usual entries for the rectangular edge that bound the unit cell, and the objects that define the unit cell. A reference vector that is defined in this way has a constant fixed direction; it does not rotate with the object.

Orientat ion of microstructureThe local coordinate system orients the unit cell at each point on an object. The x axis of the unit cell is aligned

with the local axis, the y axis of the unit cell is aligned with the local axis, and the z axis of the unit cell is aligned with the local surface normal.

Defining the local surface normal can be problem, because it is not unique. At any point on a surface, a normal can be defined in either of two directions. See Figure 12.

Figure 12 Two opposite normal vectors that are defined at a point on a surface

Surface normal 1

Surface normal 2

Surface normal 1

Surface normal 2

12 Microstructure Modeling in ASAP

Page 13: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 13

Do the microstructure dimples of Figure 13, which consists of a spherical dimple embedded on a flat plane, point into or out of the surface?

Figure 13 Unit cell consisting of a dome that is embedded on a plane

If the z axis of the unit cell is aligned with surface normal 1 in Figure 12, the dimples on the upper side of the surface are illustrated on the left side of Figure 14. In contrast, if the z axis of the unit cell is aligned with surface normal 2, they are on the lower side, as illustrated on the right side of Figure 14.

Figure 14 Two possible orientations for microstructure

Page 14: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

In ASAP, the default solution to this problem is to assign a positive and negative side to each object. The local surface-normal vector points from the negative to the positive side. For example, the positive side of a simple plane defined by

SURFACE

PLANE X 0 REC 1

OBJECT

is the positive x side, and the local surface normal points in the direction of positive x. The same convention ap-plies for the y and z planes in ASAP. Closed or partially closed objects (such as ellipsoids, tubes, and cones) have outward-facing surface normals (the positive side of the object is the exterior). For any object, the z axis of the unit cell is aligned parallel to the surface-normal vector of that object, and this fixes the orientation of the micro-structure.

To make use of the default convention, you must know the surface normal that ASAP assigns to each object that has microstructure attached. For surface-based entities, the direction of the surface normal is documented in each applicable command topic in ASAP Help.

For many edge- (or curve-) based entities, the normal direction depends on how the edges are joined together to form an object. For these objects, the simplest way to identify the positive side may be to put rays on them with the EMITTING OBJECT command, and then render the object and rays with PLOT FACETS OVERLAY, followed by a SPOTS POSITION command. By viewing the rendering in the ASAP 3D Viewer ($VIEW command), you see the spots on the positive side of the surface.

If the opposite orientation for the unit cell is desired, the unit cell itself must be flipped. You may explicitly assign the surface normal direction to a microstructure object by adding a TEST command below the SCATTER MODEL command. Three types of the TEST command exist:

TEST DIRECTION a b c

TEST POINT x y z

TEST AXIS a b c [x y z]

• Lower-case letters indicate numerical entries, and items enclosed in square brackets are optional (the square brackets themselves are not entered on the command line).

• Optional coordinate entries default to zero.

• The letters a b c are components of a direction vector, and x y z are coordinates of a point.

• When a ray intersects a surface, the TEST DIRECTION command assigns a surface-normal direction that lies closest to the entered vector. The dot product (or scalar product) of the surface normal and the vector entered on the command is positive.

• The TEST POINT command assigns a surface-normal direction that is on the same side of the surface as the entered point. The dot product of the surface normal and a vector from the ray intersection to the entered point is positive.

14 Microstructure Modeling in ASAP

Page 15: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 15

• The TEST AXIS command assigns a surface-normal direction that is on the same side as an axis (or line) that is parallel to a b c and goes through the point x y z. The dot product of the surface normal, and a vector that is perpendicular to the axis from the ray intersection point to the axis is positive.

• The sign of the surface normal that is assigned by the TEST command can be reversed by attaching a minus sign, as shown below.

TEST -DIRECTION a b cTEST -POINT x y zTEST -AXIS a b c [x y z]

• If a plus sign is attached, it is the same as omitting the sign.

Render ing of microstructure uni t cel lsUnit cells may be rendered above objects that have microstructure by entering a PLOT FACETS command with an appended MICROSTRUCTURE option:

PLOT FACETS m n MICROSTRUCTURE m’ n’

where m and n are the usual entries that control the number of facets on rendered objects, and m’ and n’ control the number of facets on the unit-cell renderings.

Page 16: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

Figure 15 illustrates rendering of a unit cell that has the shape of a prism over the interior of a curved surface. One unit cell is rendered at the center of each facet in the object. The size of a rendered unit cell bears no relation to the actual size of the microstructure.

Figure 15 Curved surface with microstructure unit cells, rendered over the interior by the MICROSTRUCTURE option

TIP The rendering is only a graphical representation of the shape and orientation of the unit cells that define the microstructure. Unit-cell renderings are automatically scaled to fit within the shortest dimension of each facet.

Be mindful that the number of unit-cell renderings may be too large if large numbers are entered for m and n on the PLOT FACETS command. Unit-cell renderings may then require excessive amounts of computer time and disk space, especially if the unit cells are complex. This may also occur if m’ and n’ are set to large values after the MICROSTRUCTURE option.

An alternative to rendering the unit cells is to draw a set of local axes. This is done by placing an AXIS option on the PLOT FACETS command:

PLOT FACETS m n AXIS

16 Microstructure Modeling in ASAP

Page 17: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 17

Figure 16 shows the appearance of the axes.

Figure 16 Curved surface with local coordinate axes that are rendered over the interior by the AXIS option

Red represents the x axis, green the y axis, and blue the z axis. The axes in which a unit cell is defined are aligned with local axes at each location on a surface. The AXIS option works for any object that has an assigned aniso-tropic scatter model, not only for objects with microstructure. Rendering axes, rather than unit cells, is an effec-tive way to avoid excessive computer time and vector file sizes when the unit cells are large or complex.

The MICROSTRUCTURE and AXIS options read the vector file (the file that is read by the 3D Viewer with the $VIEW command), which is produced by the PLOT FACETS command. The MICROSTRUCTURE and AXIS options may be exercised anytime a vector files exists, not only as options on a PLOT FACETS command. For example, the following pair of commands is equivalent to issuing a single PLOT FACETS command with a MICROSTRUC-TURE option:

PLOT FACETS m n

PLOT MICROSTRUCTURE

Page 18: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

The same applies for the AXIS option:

PLOT FACETS m n

PLOT AXIS

In both cases, the PLOT MICROSTRUCTURE or PLOT AXIS command reads the existing vector file that was writ-ten by PLOT FACETS, and appends renderings of the unit cell or axes to the existing vector file. It is also possible to render both unit cells and local coordinate axes:

PLOT FACETS m n

PLOT MICROSTRUCTURE

PLOT AXIS

or equivalently:

PLOT FACETS 15 15 MICROSTRUCTURE AXIS

Vary ing the scale or p i tch of microstructureThe spacing (pitch) or size of microstructure elements may vary across an object. For example, backlight sys-tems frequently vary the size of dots or bumps along the bottom of a light guide to obtain uniform illumination of a display. The shape of the microstructure elements is fixed, only the size is changed. Figure 17 illustrates this for an array of bumps on a plane surface.

Figure 17 Example of a plane with microstructure elements that vary in size

18 Microstructure Modeling in ASAP

Page 19: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 19

Figure 18 shows unit cells at two locations. Unit-cell boundaries are shown in red.

Figure 18 Example of how scaling the size of the microstructure affects the relative size of the rectangular border that surrounds a local unit cell

If we look only at the shape of the unit cell, ignoring the absolute size, we see that the effect of scaling micro-structure is an expansion or contraction of the plane border around the microstructure element. That is, if the elements get larger, the border contracts. If the element gets smaller, the border expands. It is this change in rel-ative area, which is occupied by the plane border and the microstructure element, that affects the angular distri-bution of light produced by the microstructure, not the absolute physical size of the unit cell. This change modifies the unit cell in a way that simulates scaling of microstructure.

Varying the size of microstructure elements requires two actions:

1 Defining how the microstructure scales with position, and

2 Providing a rectangular border around a microstructure element that can be expanded and

contracted as the microstructure element is scaled.

Page 20: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

M i c r o s t r u c t u r e M o d e l i n g i n A S A P

To scale the microstructure, we define an ASAP function with the $FCN command. The three spatial coordinates x, y, z are represented by the ASAP variables _1, _2, and _3. For example, to define a scale factor that varies linearly with x, use the following script:

A=1

$FCN SFAC 1+A*_1

This ASAP script defines a function named SFAC (any other name may be used) that is equal to:

SFAC(x)=1+Ax

The function is applied to the unit cell by appending a SCALE option on the MICROSTRUCTURE command:

MICROSTRUCTURE X ob1 ob2 ... SCALE SFAC

where ob1, ob2, and so on, are the objects that are used to construct the unit cell. SCALE SFAC tells ASAP to scale the size of the unit cell using the function that is named SFAC.

The rectangular border that ASAP uses to define the unit cell must also expand and contract around the unit cell. This border must follow these rules:

1 The border object must be a single rectangular edge that is perpendicular to the z axis. The

following script may be used to define this object, where z is the desired height of this edge

within the unit cell (the height that is needed to match the rest of the unit cell). Any name may be

substituted for RECED.

EDGE

RECTANGLE Z z 1 1

OBJECT; .1 ‘RECED’

2 The size of the rectangular edge, 2 x 2 (or a half width of 1) in this example, has no importance:

ASAP scales the edge as needed to accommodate scaling of the unit cell.

3 The name or number of the rectangular edge object must be the last object in the list of unit-cell

objects that are entered on the MICROSTRUCTURE command.

20 Microstructure Modeling in ASAP

Page 21: Microstructure Modeling in ASAPMicrostructure Modeling in ASAP 3 For curved surfaces, we use a confor mal coordinate system with local x and y axis directions that are defined at every

. . .

. .

Microstructure Modeling in ASAP 21

The pitch (that is, spatial period) of the microstructure can be set by adding a PITCH option to the MICROSTRUCTURE command:

MICROSTRUCTURE X ob1 ob2 ... PITCH PITFUNCX PITFUNCY

where PITFUNCX and PITFUNCY are the names of user-defined functions for the pitch of the microstructure as a function of x, y, and z. Any name may be used for these functions. Two functions are typically needed because the pitch in the local x direction does not have to be the same as the pitch in the local y direction. However, if the pitch in x and y is the same for both dimensions, only a single function should be entered after the PITCH option. If the pitch is constant in one dimension, a constant function is defined, where the pitch in the local y direction is fixed at a value of 2. The following script is an example:

A=1

$FCN PITX 2/(1+A*_1)

$FCN PITY 2

:

MICROSTRUCTURE X … PITCH PITX PITY

Microstructure warning messageMicrostructure geometry is defined by only a single-unit cell, but the unit-cell ray trace simulates not only one cell, but a continuum of replicated unit cells. This allows a ray to cross over from one unit cell to its virtual neigh-bors, as occurs in a real microstructure. The number of unit-cell crossings is currently limited to 100. That is, a ray is not allowed to cross from one unit cell to another indefinitely; only 100 such crossings are permitted. If the ray exceeds this value, tracing of the ray stops, it remains on the last object it intersected within the unit cell, and the error is tabulated as a MULTIPLE BOUNCE within the table that is printed at the end of the ray trace.

If only a small fraction of the rays produce this error, it is unlikely that the final calculation is affected signifi-cantly, and the messages may be ignored. If a majority of rays produce these messages, a serious problem exists that must be understood and rectified.

The geometry of unit cells must fit exactly within the rectangular edge that defines their boundary. If objects that define a unit cell extend beyond this boundary, rays traced through these objects may end up beyond the unit-cell boundary. ASAP issues the following warning each time this occurs during the ray trace:

*** Ray xxx was traced to a point outside the microstructure unit cell

***

The error is also tabulated as a WRONG SIDE ray error within the table printed at the end of the ray trace.

For more information, see the MICROSTRUCTURE command in ASAP Help.