The object is defined in 2d surface and does not have thickness in the surface-normal direction. It can be used with 2D materials such as graphene, PEC and sampled 2d data.
[[Note:]] 2d objects always take priority over 3d objects when it comes to mesh orders. Please refer to the Understanding mesh order for overlapping objects for further information.
Here are some of the example structures that can be created using a 2D polygon object. To create any one of these structures, open the 2d_poly_examples.lsf and run the corresponding part of the script.
Geometry tab
- X, Y, Z: The center position of the object
Setting the vertices of the polygon object
The vertices of the polygon object can be edited by
- moving them with the mouse,
- manually editing the x,y location of each vertex in the polygon property editor,
- script command
For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command. For example, use the following code to create an octagon shaped object.
# octagon properties n_sides=8; r=1e-6; # x,y position of each corner theta=linspace(0,360,n_sides+1); theta=theta(1:n_sides); x=r*cos(theta*pi/180); y=r*sin(theta*pi/180); # combine x,y into one vertices matrix V=matrix(n_sides,2); V(1:n_sides,1)=x(1:n_sides); V(1:n_sides,2)=y(1:n_sides); # add polygon object and set the vertices addpoly; set("vertices",V);
Getting and modifying polygon vertices
To get the polygon vertices, use the following command. The vertices will be returned in an Nx2 matrix. The columns of this matrix correspond to the X, Y positions of each vertex.
V=get("vertices"); ?size(V);
To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-apply it to the polygon object:
V=get("vertices"); V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um. set("vertices",V);
Material tab
The material options are as follows:
- MATERIAL: The material assigned to a 2D polygon is filtered. It can only accept graphene, PEC(perfect electric conductor), sampled 2d data material types.
- OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the material database and manually set a mesh order. The mesh order is used by the simulation engine to select which material to use when two materials overlap. See the mesh order (optical) or mesh order (electrical) section for more details.
- MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL DATABASE option is selected. If the option is not selected, the field displays the material's default mesh order from the database. For example, a material of mesh order 1 will take precedence over a material of mesh order 2.
[[Note:]]Mesh order between 2D and 3D objects
- 2d objects always take priority over 3d objects. For example, a 3d cylinder overlapping a 2d rectangle will not create a hole in the 2d rectangle, regardless of their mesh order.
- 2d objects respect mesh order among themselves. For example, a 2d rectangle with RLC overlapping a 2d polygon with PEC. The material of the overlap is determined according to mesh orders.
- Please refer to the Understanding mesh order for overlapping objects for further information.
Rotations tab
Rotate objects by setting the following variables:
- FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
- ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
Note: Axis rotation This object does not support an arbitrary angle of rotation on the non-normal axis. For example, with z axis being the normal, rotation of 30 degrees along z is allowed. However, rotation of 30 degrees along x or y axis is not allowed. Also note, the "Surface normal" option in the "Geometry tab" also rotates the object accordingly. |
Graphical Rendering tab
The graphical rendering tab is used to change how objects are drawn in the layout editor. The options are:
- RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
- DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
- OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and 1 (opaque) for the object, depending on how transparent you want the object to be.
See also
Structures, Structure - 2D Rectangle, Material conductivity models, add2dpoly