Ready to create a custom lens in OpticStudio? Find the help you need here!
- 62 Topics
- 159 Replies
Hello everyone, I am trying to design Digital Micromirror Device(DMD) in SEQ using 'us_mems.dll'. We know that the DMD behaves as a blazed grating, and also it has diffraction pattern, what I have seen during experiments also. I am wondering how can I simulate the diffraction orders of DMD in ZEMAX. Thanks in advance. Ast
In this forum post, a sample C++ code to read value from a text file in DLL is shared. This is mainly a supplement to the follwoing knowledge base article. The only difference is we will do the similar thing with C++ code to how how to do this in C++ style. How to read a static data file into a user-defined surface In the attachments, a sample code is attached. This code does the same thing as shown in the following forum post. The difference is the diffraction efficiency data is read from a text file. Simulate 2D diffraction grating using customized diffractive DLL We will explain line by line in below. The first thing to do is to define a global variable, which is declared outside of all the functions. As discussed here, during ray-tracing in OpticStudio, the DLL will be called several times. For the global variable, the inside value is unchanged and the DLL can always see the same data in different thread. Our plan is to read data from text file and save it in this global va
As stated in the title I need to compile my own DLLs for my system. I don't have access to Visual studio or Visual Studio community, and in general, I try to work as much as possible with open source solutions. Can somebody help me to set up an environment to compile a DLL with free and open source IDE and compiler? Ideally Visual Studio Code. I'm working on Windows 10 x64.
Hi, The tutorial on 'Simulating diffraction efficiency of surface-relief grating using the RCWA method' assumes a unit cell comprising of one period with linear grating of fixed duty cycle. I am wondering if anyone knows if we can simulate 1. curved diffraction grating and/or 2. diffraction grating with a chirp (i.e assume a super cell comprising of multiple unit cells with varying period and fill factor)? Thanks, Arvinder
Zemax has the wonderful ability to add user-defined surfaces and objects, but they have to be compiled by the user into a dll. With the Community version of Visual Studio 2019, does anybody know (a) which components of Visual Studio need to be installed, (b) what settings are needed in order to “Attach to Process…” in order to debug, and (c) what settings are needed to compile routines correctly. The background here is that the user has to look through a set of examples to work out how to do anything, and these are mostly in C, probably from 20 years ago. There are 2 very useful articles about how to compile a dll, and debug a dll, but they are for C++, with no explanation about when and why C++ is needed. Some VS2017 compiler settings are given, but a lot of others are not mentioned, and there is no information about how to install Visual Studio. The ability to debug a file is phenomenal, but they do not attach with VS2017 and VS2019, and there is a message that &ld
Hi, Is there a way to simulate a cylindrical lens (curve in X-Z plane) with a diffraction grating on the cylindrical surface that varies as a function of X in OpticStudio? Or would I have to write a custom DLL for simulate this? Thanks, Ben
Hi, I was trying to calculate the efficiency for user defined surface: us_hologram_kogelnik; I followed the manual and it works fine when the construction is However, when z2=-23, the efficiency reduce significantly and the plot was like: I’ve already move the image surface to the focal plane. I don’t know if it is correct. Please help me.
I am writing a user defined surface DLL, and want to know if I can speed up the DLL by storing specific precomputed values in FIXED_DATA4 or FIXED_DATA5 datasurf values. In my DLL I have several variables (a1, a2, a3 etc) which are affected by the curvature, conic constant, and one of my surface parameters (which will not vary during optimisation). The sag of the surface is a function in x and y, with different powers of x and y multiplied by these variables. eg. a1*x + a2*x*y + ... I may be misunderstanding how the DLL works, but I currently expect that each time it is called it will compute my variables (a1,a2 etc) and then calculate the sag, meaning that it is inefficiently repeating the same calculations many times, where I only need to compute the sag from the variables which are fixed during any raytracing and optimisation. Can I add code on initialisation to store the curvature, conic constant, and param to the data surf values as well as the corresponding variables a1 etc, a
Hi, I have a Global Academic Program License for OpticStudio, and from my License Manager I see this license is of type 'Premium' which should give me the possibility to use dll scattering model. I have downloaded one of Luminit's scattering dll and placed it in the correct folder, but nevertheless the model does not appear in the user defined scatter model list! Is this a limitation of the academic license? Thanks, Chiara
I wanted to try out the new diffraction grating DLLs.  Following the example in the knowledge base article, when I get to the point of selecting one of the DLLs I get an error message "Unable to load 'UserParamNames' function from DLL".  The only DLL that seems to work is diff_samp_1.DLL
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.