Ready to create a custom lens in OpticStudio? Find the help you need here!
- 51 Topics
- 122 Replies
Diffraction Orders in NS components
Hello, I have sequential rays that enter a non-sequential component. In this element there are two sets of dffraction gratings helps rays to couple into the the medium and extract from the medium for analysis. However, the rays I sent only diffract along the set primary diffraction order. Can Optistudio simultaneously trace multiple diffraction orders NS components? Thanks,
Looking for someone who has Experience with developing new surface DLL
Hello, I need to create a new surface lens array DLL. Lens parameter changes through array according to some formula (In Zemax DLL all lenses are identical). Looking for someone who has experience with developing new surface DLL and interested to develop it. Please apply to my personal mail directly.
Malwarebytes flagged RIHWSTY31.DLL as malware.
Why did Malwarebytes flag and quarantine RIHWSTY31.DLL as malware? See attached screensnap. Is it a valid DLL or did malware somehow get attached to OpticStudio? Need to know whether to keep in quarantine or release it. Thanks, Mike
Dear person in charge, Hello, This is Munseok Choe. I am visiting researcher in ITER Organization. I am using ZEMAX to simulate Quasi-optical Gaussian beam propagation in mirror system. My license information is attached in below. To make Gaussian beam as a source in non-sequence mode. I used Gaussiansource.dll in Source.DLL option. However, It can only generate the ray with random sampling. It disturb measuring exact value of power density on detector. Could you explain why sobal sampling is not available? Thank you. Best Regards, Munseok
GRIN Media Definition of Dimensions
Hello, for example for the GRIN3 Media definition what are the units for the refractive index in z-direction if you set a value in the object properties? In case of Zmax standard units is mm, is Nz1 from 0.001 defined as (0.001 n/mm)*(z [mm])? Thank you very much and kind regards Julian
Mixed Mode + Mie.dll
Hi, I'm trying to create a mixed mode model that incorporates the Mie.dll volume scattering in the Non-sequnetial Component. I find that the rays that original from the sequential system don't seem to scatter in the Non-Sequential Component. Should this type of a setup work generally?
UD extended fresnel
Im trying to define an extended fresnel as DLL file. I wonder how do I define the refractive surface? How to write the DLL script so OS will understand my intention? I was thinking about defining the substrate surface as sag1 (with us_stand.c), create new variable- sagf, on which Ill define the fresnel surface, and afterwards to define: sag2=sag1+sagf. Will this attitude work? P.S Ive attached an image showing my dll idea
Grating optimisation for two wavelengths simultaneously
Hi, is there any multiwavelength grating optimization example available in your database? When I search for grating files, I found this example https://support.zemax.com/hc/en-us/articles/1500005578722-Simulating-diffraction-efficiency-of-surface-relief-grating-using-the-RCWA-method I am looking for step graded grating example optimized for two-wavelength simultaneously. Currently, I have a Trial License from Zemax. Here is some reference where people have tried this in the past. https://www.osapublishing.org/josaa/abstract.cfm?uri=josaa-23-1-193 Thanks in advance.
How to analyze stray light in hologram imaging system
Hello, This post would just like to share how you could find stray light with OpticStudio hologram model. In the following knowledge base article, Simulating diffraction efficiency of a volume holographic grating using Kogelnik’s method we have shared an non-sequential example as below. It's not obvious, but here are actually some stray light in this example. To find them, we can just increase the Contrast Enhancement in Detector Viewer as shown below. Then you can find those 0th order ghost!
Gaussian XY scattering
We have some asymmetric scatterers in the lab that I would like to model in zemax. They have different gaussian scattering properties in horizontal and vertical direction. So i tried to use the Gaussian XY DLL to model it, but it behaves weired. A ray hitting the surface perpendicular is scattered as intended, but rays under even small angles are changing it completely. The scatter pattern for a ray with 1° in x-direction is twisted 90° to a ray under 1° in y-direction. Is there a mistake or do I something wrong? I have attached an example file. Best Steffen
HELP: GRIN LENSES
Stuck in my research. I need to include some basic simulations of grin lenses using Zemax but i have no clue. I have read a lot and watched couple of videos. I guess I still need someone more familiar to put me through some technicalities. Anyone available to help? I can share my email or my phone number. Thanks in anticipation
Compile a User-Defined Surface
Hi everyone, I'm trying to insert a surface using a DLL file, but it looks like my OpticStudio is not recognize the file. My actions were putting the file in C:\ProgramData\Zemax\DLL\Surfaces (where all the other user define functions located) and then search for this file in the lens data editor. (I followed the instruction from https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01787. Without making any changes) Looking over the list, I don't see my file. What could be the reason for that? What is the right way to use user-defined function/ DLL functions? Thanks a lot! Marta
Diffraction orders of the DMD
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
Read and parse data from text file in DLL using in C++ way
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
How to setup Visual Studio Code (or other open source IDE) to compile a DLL for Zemax
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.
Curved / chirp diffraction gratings
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
What settings are needed to debug and compile a dll ?
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
How to simulate a cylindrical lens with variable groove period on the cylindrical surface?
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
Simulate 2D diffraction grating using customized diffractive DLL
In OpticStudio, currently we only support one dimensional grating. However, it's not difficult to simulate 2D grating. Here we will show an example using diffractive DLL.You may compile it with the instructions or use the DLL file attached to this article. Before we start, here are some articles for required background knowledge that we will not repeat in this forum post. How diffractive surfaces are modeled in OpticStudio (KBA) How diffraction ray-tracing is calculated (forum post) Custom DLLs in OpticStudio: An overview of user-defined surfaces, objects, and other DLL types (KBA) How to compile a User-Defined DLL (KBA) Let's simply open the attached cpp file and observe how it works.This example is mainly modified from the built-in sample \Documents\Zemax\DLL\Diffractive\diff_samp_1.c To compile the program as C++ code. We package the functions with extern 'C'. In this example, we only want to return diffraction ray direction and its relative intensity. So setting data = 1
How can I calculate the diffraction efficiency of HOE?
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.
User Defned Surface - storing repeatedly used variables
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
Scatter dll not visible in Zemax OpticStudio Premium
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
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.