Object Placement

The NSC Editor allows specification of object placement.  The conventions and restrictions on placing objects in the NSC group is critically important. Objects may be placed anywhere in 3D space; and objects may be placed with respect to any other object. Objects may also be placed entirely inside of other objects, or may be placed adjacent to other objects.

For more information, see the sections on Non-sequential Objects, Non-sequential Sources, and Non-sequential Detectors

Coordinate System

Each object's position is defined by 6 parameters: the x, y, and z coordinates, and the rotation about the x, y, and z axes. OpticStudio first decenters in x, y, and z (decenters are orthogonal so the order does not matter). Then OpticStudio tilts about the local x axis (which rotates the y and z axes to new orientations), then tilts about the new y axis (which rotates the x and z axes), then finally tilts about the new z axis. This is the same convention as for the coordinate break surface when using order flag = 0. The conversion from object local coordinates to global coordinates can be written in equation form as ,

where the g subscript indicates the global coordinate, o is the offset, and l is the local object coordinate. The matrix R is the rotation matrix, which relates the orientation of local and global coordinates. These equations can be written more compactly as G = O + RL, where G is the global coordinate vector, O is the offset vector, R is the rotation matrix, and L is the local coordinate vector. For more information on properties of the rotation matrix, see "Global Coordinate Reference Surface". The order of rotations may also be reversed, see "Use Global XYZ Rotation Order" under the Type section of the Object Properties.

Reference Objects

It is often useful to reference an object's position and rotation relative to another object. This is useful especially when placing related objects in a group, and then decentering or tilting the entire group.

The object to which the coordinates are relative to is the "reference object". The default reference object is object 0, which is the vertex of the Non-sequential Component surface. If a positive number greater than zero is specified, then the coordinates of the object are referenced to the location and rotation of the specified object. This is an "absolute" reference object.

If the reference object number is negative, then the reference object is determined by adding the current object number to the negative reference object number. This is a "relative" reference object. For example, if the reference object is -3 on object 8, the reference object will be 5 because 8 - 3 = 5. Relative reference objects are particularly useful when copying and pasting groups of objects; this is easiest if all the objects in the group use relative references to the first object in the group.

When a reference object is used, the rotation and offset matrices then become:

G' = O' + R'G

G' = O' + R'[O + RL]

G' = [O' + R'O] + [R'R]L

Any number of coordinate reference nesting is supported; so that object 9 could be placed in the coordinate frame of object 5 which in turn is placed in the frame of object 3. The only restriction is that the reference object must precede in the object list the object whose coordinates are being referenced. To modify the reference object without the need to manually recompute the object coordinates and angles, see the " Modify Reference Objects ".

Placement Inside, Adjacent, Overlapping

Placing sources within other objects, and the use of absolute and relative values for the "Inside Of" column are described in "Placing sources inside objects".

Objects can be combined to make more complex objects, by placing one object inside of, adjacent to, or overlapping another object. What determines the ray tracing properties of such a compound object depends upon the position and type of the various objects and whether or not they touch or overlap. Here the word touch means that one or more points on the boundary surface of one object is in the same location in 3D space as a point on a boundary surface of another object. Mirror objects may be placed anywhere, even in contact with or partially or fully inside any other object without restriction. Rays will always reflect from mirror surfaces back into the medium the rays had been traveling through.

Glue Distance In Lens Units

When two NSC objects are placed in contact, such as a lens touching one face of a prism, numerical roundoff will cause the ray tracing algorithm to sometimes detect a very tiny distance between the two objects. This can also occur when objects are rotated in 3D space and placed close, but not exactly, next to one another because of the finite number of digits entered in the spreadsheet editor.

The glue distance is the distance below which the objects are considered in contact. It is important that objects not be separated by distances very close to the glue distance. If it is intended that two objects be in contact, then the maximum spacing between the objects should be several times smaller than the glue distance. If it is intended that the objects be separated, then the distance between the object should be several times larger than the glue distance. Object spacings very close to the glue distance will yield inconsistent ray tracing or geometry errors. This should be avoided by adjusting either the object spacing or the glue distance.

The glue distance also determines the minimum propagation length for ray tracing. If a ray-object intersection is less than the glue distance away from the previous intercept, the intercept is ignored.

The glue distance is also used in the tolerance associated with ray tracing to general curved surfaces. OpticStudio will iterate until the error in the ray-surface intercept solution is less than one-fifth of the glue distance.

In the majority of cases, no adjustment should be made to the glue distance parameter. The glue distance must be no smaller than 1.0E-10 and no larger than 1.0E-03.

Nesting object limits

There is a user defined limit on the maximum number of nested objects. This defines an upper limit on how many objects can be placed inside each other. For example, if the maximum number of nested objects is 3, then object 3 may be placed inside of 2 which is placed inside of object 1. There may be any number of groups of objects each nested 3 deep in this case. The limit applies to the total nesting in any one collection of objects, however, there may be any number of such collections within the NSC group. The maximum number of nested objects is set on the Non-sequential section of the System Explorer. Setting the nesting limit no higher than required for the system being modeled conserves memory usage, although the minimum setting is 4.

Nesting volumes

Volumes of refracting material are more complicated, because OpticStudio must keep track of the index of refraction through which the ray is propagating. The rule to remember is: if a ray strikes more than one object at the exact same point in space; the last object listed in the NSC Editor determines the properties of the surface or volume at that point.

If a ray strikes more than one object at the exact same point in space; the last object listed in the NSC Editor determines the properties of the surface or volume at that point.

For example, if a diffraction grating lens is object #1, and a non- grating lens of the same thickness and radii made of air or glass is placed inside the first lens is object #2; then rays that strike in the zone including both objects #1 and #2 will act as though they just hit object #2.

This allows defining objects with "holes" and other compound objects. Objects may be touching at one or more faces, nested or not, or may partially overlap, to create a wide range of compound solid shapes.



Nesting surfaces

The nesting rules defined above apply to solid volumes of refractive or reflective material. Some special surfaces may also be "nested" in the sense that more than one surface may exist at the same point in space. The rules are similar to those that apply to volumes, but surfaces cannot be refracting.

The same rule applies to surfaces as does for solids: if a ray strikes more than one object at the exact same point in space; the last object listed in the NSC Editor determines the properties of the surface at that point.

If a ray strikes more than one object at the exact same point in space; the last object listed in the NSC Editor determines the properties of the surface at that point.

For surfaces, there are a few rules to consider when more than one surface exists at the ray intercept point:

  1. The last surface listed will determine the properties of the surface.
  2. If the last surface listed is a mirror, the ray will reflect.
  3. If the last surface listed is an absorber, the ray will be absorbed.
  4. If the last surface listed is neither a mirror nor an absorber, the ray will ignore the surface.
  5. Surface objects may not share boundaries with volume objects unless the surface object is reflective or absorbing, or unless the volume object is listed after the surface object; in which case the volume defines the properties of the common boundary.
  6. Only standard surface objects may share boundaries, support for nesting of other surface object types may be added in future versions of the software.

Next: