Ready to create a custom lens in OpticStudio? Find the help you need here!
- 48 Topics
- 119 Replies
Hi,I would like to know how to use the OCOD and OPEV operands with multi configuration files: In case the same operand is present more than once (for example for different configurations) how to read the right one?Also, I want to know if it is possible to use OCOD with mathematical operands, like MINN, or MAXX, and same question, what if there is more than one in the Merit Function?Otherwise, is there a simpler way to read one value from any line in the MF?Thanks, Cristina.
Greetings,I am attempting to model mie scattering for a single water droplet illuminated by a laser beam (monochromatic, collimated, and planar) and see the 'rings' on the detector varying with particle size. There is already a similar post: but no solution was reached.My current setup features a 'source ellipse' as the light source and a single 'Sphere' object as the water droplet with DLL Defined Scattering enabled under the Volume Physics tab. This much I have learned from the Zemax knowledgebase article entitled 'How to simulate atmospheric scattering using a Mie model'. My question now is what values for density and mean path should I enter in the MIE.DLL section under the Volume Physics tab?Suppose I start with a 10 micron diameter water droplet and I place the detector 500um (0.5mm) away from it, what density and mean path values correspond? Or is there a better approach?Thank you in advance.
I am new to DLL programming for Zemax. I have an older file using the Fixed-Data 3 standard. This should support 201 parameters. Unfortuneatly in the LDE editor a maximum of 12 Parameter columns are generated even if i define more. Is there a cap of how many parameters can be displayes as input in the LDE?
This forum post is a place to collect update history of diffractive tools beta functions, which includes all RCWA DLLs (and visualization API), polygon DLL, and Zemax Grating Data (ZGD) DLL. Content:1. Overview2. Resources3. Change history OverviewCurrently in OpticStudio, we are adding some useful DLLs to enhance the ability of fully simualting gratings. They allow OpticStudio to consider the efficiency when rays pass through diffractive optical elements (DOE), such like 1D/2D gratings, binary optics, or volume holograms. These extensions can be found in OpticStudio installations.These tools improve frequently based on users’ feedback. We decide to provide functions with DLL so it can be updaetd fast upon users' request. Between each OpticStudio public releases, there might be several minor updates and bug fixes. This forum post is a place for changes history.Note all tools provided here are only available with OpticStudio Premium Subscription. If users are interested in these functio
I have a rectangular object that I want to have a variable coating on one of its faces. The coating should be a dichroic coating on part of the face (say 2/3 of one rectangle) and no coating at all on the remaining 1/3.I would also need to update this coating (e.g., change the coated area and coating parameters) and object through ZOS-API, so a dynamic solution would be appreciated.Thanks!
For the User defined object DLL, Zemax passes a variable “data” to the function UserObjectDefinition. However, I have not been able to find any documentation on what each element of this array is. The examples provide some of the parameters (for example the CoatingSample.dll file gives the first 15 parameters and a few others up to parameter 34, see the code below from the example). Where can I find documentation to understand what other parameters I have access to from this data structure? The data ZEMAX sends is formatted as follows: data, data, data = x, y, z data, data, data = l, m, n data = coat group number data, data, data = normal nx, ny, nz data, data = current and next index of refraction data = cosine of normal incidence angle data = wavelength in µm data = zero flag. Set this to 1.0 to indicate the DLL computes the coating data, otherwise, ZEMAX will compute u
hi,it’s easy to make a DLL working as dichroic filter in the surface scatter way, by just changing the specular ray direction according to its wavelength in the DLL. however, it seems it only works in a 2D surface, and when it goes to a volume surface with different refraction index from the air, especially when the ray needs to reflect at the surface inside the volume, it can no longer work normally. examples illustrated as follows:I analyzed the cause through ray tracing and ray database viewer, and found that if the ray made reflective mandatorily inside a volume via the DLL by one of its surfaces, zemax has no way to know the reflected ray by the surface is still inside the volume, as it seems zemax does not provide such an interface in the function “UserScatterDefinition” .I hope to consult zemax development engineers and also guys with related experience, how to solve this? thx in advance!and I also wondering why zemax does not provide the incident ray direction cosines and why
I’m interested in modeling an OLED display that’s displaying the letter P. The brute way to do this would be a series of lambertian point sources that form that shape. Is there a better way? Maybe with a dll or a CAD object? Thanks!Donna
In this post, it’s introduced how to simulate realistic grid wire polarizer with RCWA function that comes with OpticStudio 20.2. (Source: https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=5510) Note there are many different types of polarizer For polarizer based on birefringent crystal, check the following article: How to design birefringent polarizers For polarizer based on coating, there is no an article specific to introduction, but users can refer to the following article to know how to set up a coating and assign to object for beam splitting. How to model a dichroic beam splitter Then it’s also worth to note the existence of a build-in ideal coating “PASS_P”. This coating allows P polarization to pass and reflect light with S polarization. Note the coating method can only work for obliquely incident beam. Usually this kind of polarizer is made as a cube or a plate oblique placed in the system. More information can be found in this forum post: 'Pass_P' coating
Hi there, I am trying to write a source DLL file to use in OpticStudio, which is based on the built-in source “Source Two Angle”. It would be great if I could use this as a starting point. Is the (cpp) code available for this source? Or is there something similar I could start with? Thank you!
Hello I have a license for basic version of OpticStudio. I need to apply an apodization filter to a surface in order to program the transmission to be a Gaussian function. But it seems that the 'filter' type of surface is only available in the premium version. Is there any substitute for this function that I can use? Thank you.
I need to simulate a gaussian beam in non sequential mode, which has 850 nm wavelength, 15 degree diveregence angle (half angle) and the beam raduis of 2.563 mm at 10 mm which has the cross section of the beam profile shape as attached below, but when putting this values using the Gaussian source it doesnt give me the same results. By using the skewRaysCircular I cannot get the gaussain beam profile and it just shows me a ring, how can I get a gaussian beam profile in the output?
I was pleased to see the new NSC Source DLL 'SkewRaysCircular.dll' added in the May 19 release (OpticStudio 20.2). We have immediate use for it in modeling our systems. It was inspired by the similar (sequential) User Defined Surface DLLs discussed in Paul Colbourne's webinar and KnowledgeBase Article KA-01772, which allows optimization of generally astigmatic Gaussian beams in Sequential mode. But I was disappointed to see that the new Non-Sequential Source DLL only models CIRCULAR Gaussian beams with no astigmatism, unlike the Sequential capabilities that were supplied by Dr. Colbourne, which accommodate general astigmatism! I suggest updating and replacing SkewRaysCircular.dll with a new, more general, Source DLL, renamed appropriately, e.g., SkewRaysGaussianXY.dll , that DOES support general astigmatism. This would seem simple enough to implement starting from the existing SkewRaysCircular.dll: add new pairs of parameters for WaistX, WaistY, (and/or SIzeX, Siz
A user-defined surface DLL will retrieve information from OpticStudio via the FIXED_DATA5 structure defined in the header file. An example of the header file can be found under '\Zemax\DLL\Surfaces\usersurf.h'. To access the surface parameters, the DLL reads the variable param in the FIXED_DATA5 structure: If we need to pass more parameters to the DLL, one way can be to use the datasurf_numvalues and datasurf_values. To use this, a 'Data' surface has to be used. Below I have taken a screenshot when debugging a user-defined surface: I hope this helps but do not hesitate to share your comments. Sandrine
Hi, I was reading Michael Cheng's article 'OpticStudio grating tools beta function update history' and have some questions. This article mentioned 'download link' many times, but I did not see these corresponding links. And I did not see some DLLs mentioned in this article in OpticStudio 21.2.1, for example: 'Polygon grating DLL', 'A new DLL is created for reading pre-calculated efficiency data for 1D/2D gratings'. I want to know where I can find these DLLs and their usage. Thanks & Regards, Dongdong
I tried to use the original Gaussian.cpp in Visual Studio 2019 to create a dll project. I created a default dll project and copied the Gaussian.cpp and tried to build the file. The header file is left empty. The build was successful but when I tried to load into Zemax, it gives error saying cannot load DLL as in the attachment.
Hi all! I have done user defined dll surface and want to check its accuracy. For this, I did a lens with such surface on one side and plane on the other in SolidWorks and opened it like .STEP file as a non-sequential component. In the second Zemax file, I opened my user-defined dll. All dimensions, apertures the same. Also, I can see that rays go through the lens in almost the same way. Spot diagrams look very similar. But I want to compare the wavefront map and here I have a huge difference also ray fan very different and I cant understand the reason. It's my first time with non-sequential mode, maybe someone can help me with good advice? Thank you a lot
Hi I have a question about the Henyey Greenstein model in Zemax. I am now using the Henyey-Greenstein (HG) model in combination with the wavelength shift to simulate the Raman scattering. Because the mean free path is wavelength-dependent in the same tissue, my question is that, in the multiple scattering, if the input photon is altered in wavelength, will its mean free path be changed too in the next scattering event? From the HG source code, it seems like the mean free path is a constant to all wavelengths. Furthermore, I also found from your HG source code that you didn't really consider the light absorption while in scattering events, right? Thanks in advance!
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,
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.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.