Home

RayCAD for Inventor

     Download

     Learn More

RayCAD for AutoCAD

     Download

     Learn More

     Upgrade to Ver. 10

Testimonials

Price Lists

RayCAD for OEM

Design Services
 


 

 

 

RayCAD
Integration of optical and mechanical design based on AutoCAD

General Concepts of RayCAD for AutoCAD

RayCAD optical design software integrated with AutoCAD provides optical designers with the power and tools mechanical designers have enjoyed for some time. Spreadsheet entry is replaced by simple CAD commands such as Move, Rotate, Point and Drag. Packaging is enhanced when optical components and actual ray traces are present in the mechanical design. Implementing optical components as single surface objects enables the creation of uncommon multi-surface components and waveguides. A rendering feature converts surfaces and ray traces to objects ready to be rendered providing a photorealistic presentation.

The operation of RayCAD for AutoCAD  is consistent with the way systems are drawn and designed in AutoCAD. All of the familiar commands like Move, Rotate, Stretch and many others are used to point and drag surfaces and input rays into the configuration. For example, to move an array of input rays that represent a light source off the central axis, use the Stretch command and drag the whole array of input rays to a new location (this is opposed to going to a spread sheet and keying in a new starting point and angular directions for each of the rays).

Optical components and ray tracing are all done in 3D space as shown below. AutoCAD's viewing and view ports, along with Dview,   Zoom and Orbit, are used to evaluate the ray traces. After placement of two or more surfaces and two or more input rays, RayCAD for AutoCAD can run a ray trace.

The computational portion of the program is written in C++. The range of values of critical internal calculation is 1.2e 4952 with 19 digits accuracy. The root finder keeps solving for a zero root until less than 0.1e-15 is achieved. This portion is used for such tasks as calculating surface to ray intersections, surface interactions (reflection, refraction and diffraction), aperture openings, indexes, random ray generations, etc. The heart of the program is in the ray to surface intersection and interaction routines. 3D vector math is used throughout.

The algorithm used for ray to surface intersection varies depending upon the surface type. In the case of a ray intersection with a swept surface such as an aspheric, there must be a point on the ray and a point on the curve when swept around the surface axis which must coincide. From the perspective of a point on the surface being swept, the approaching ray appears as a hyperbola. The ray equation described as such and the aspheric equation is solved to find a common point. At that point, a normal to the surface is generated.

Then, depending on the type of surface encountered (reflection, refraction or diffraction), the appropriate optical formula is applied using necessary information like wavelength, index, diffraction order. This produces a new ray start point with a direction determined by the optical properties and surface shape. This process is then repeated for each surface and starts over for each input ray generated.

Surface creation

A surface is made, and edited, using a dialog box allowing a preview of the curvature and also ensures that parameters are valid. For example, generating a spherical surface using a one inch diameter and a radius less than .5 will produce an error and the user is prompted with suggestions to correct the problem.

Within the dialog box, select curvature, diameter, holes, size, shape, provide the radius and, in the case of an aspheric, eight coefficients.

Surfaces can also be imported from a catalog of lenses (including aspherics) to use as they are or those surfaces can be edited to suit. AutoCAD's Copy, Mirror and Array commands can be used to multiply surfaces.

There are three means of providing glass material. A catalog of glass material is available using refractive index formulas to compute the index for a particular wavelength. A second method is to supply a file containing several wavelengths with associated indexes and a curve fit is performed over a narrow range containing the desired wavelength. The third method is a single wavelength and single index can be supplied "on the fly."

The medium default is the index of air but can be modified if components are operating in a different environment.

There is also the ACAD Optical Object Modeling feature.  3D Objects, 3D Faces, Edge, 3D Mesh, Revolved, Tabulated, Ruled and Edge Surfaces can be grouped and assigned optical properties such as Glass Material, Reflectivity or Opaque. These objects become optical components and are intersected and ray traced like regular RayCAD for AutoCAD Surfaces

The combination of RayCAD for AutoCAD's optical surfaces and the ability to change mechanical objects drawn in AutoCAD into part of the optical design is very powerful. Being able to turn covers, brackets, mounts, shafts, bearings, etc. into reflectors or blockers is useful in analyzing for stray light. Using these objects also means you can design optical components with any shape and size required. They can be made out of optical glass and will refract being wavelength specific like regular optical components.

Source modeling

A source is modeled using lines as vectors to provide a starting point and a direction. Any number of lines can be gathered and serve as input rays. Two input rays are sufficient for a ray trace and are also sufficient to produce a random distributed generation of input rays and a grid trace dividing the first surface into rows and columns.

Performing the ray trace as a grid is very useful since rays are produced in an orderly row and column fashion and can clearly illustrate aberrations and other distortions.

Operation

Ray tracing can be either sequential or non-sequential. The ray tracing command begins a search of the data base for blocks of surfaces and looks up X Y Z location, rotation and twist. It will also read the attributes for index data. After doing the calculations it returns X Y Z coordinates representing ray to surface intersections. If a ray intersects a surface, the point of intersection and the surface normal at that point are calculated, and a new direction for the ray is computed using appropriate refraction, diffraction or reflection.

Optimizing can fine tune the position and curvature of a surface or a group of surfaces. Curvature optimizing will automatically adjust curvature variables (i.e., radius, conic and aspheric constants) in an attempt to bring two rays to a point. Positioning optimization will automatically move a group of surfaces using a lead surface for its direction in an attempt to bring two rays to a point or a parallel.

A command titled Adjust provides a means of studying ray intersections. A cross-sectional slice of rays can be viewed (preferably many rays) and moved up and down along the normal of a selected surface clearly showing the distribution of rays at that point. These cross-sections can also be placed in separate views and each view is automatically updated when a ray trace is performed.

Right:  Four views show slices of cross-sections of ray bundles taken from Positions 1-4 as indicated

Also, a spot diagram can be projected onto any surface. Spot diagrams help visualize the image quality. A large number of rays are traced in either a random or grid formation to form spots on a selected surface.

There are several ways to identify obstructed rays - by changing the color of rays in question, by eliminating rays not in question, or by simply pointing to rays and a grip mark identifies each intersection point. Since rays are polylines, the polyedit command is also useful in allowing a crosshair to be stepped through each intersection point.

It takes very little effort to experiment. Each component is composed of separate surfaces. You can combine several shapes, even surface types, into one component. For example, a pentagon prism with some side reflected, a beamsplitter in the middle, and a refractive grating on another can be constructed. Caution is given - some creations may not be able to be manufactured. Non-sequential ray trace is illustrated in the image below which shows a ball and a hollow cone where rays are making multiple bounces inside the ball and the close up of the cone illustrates multiple bounces in the cone wall.

Each ray keeps track of the medium it's in. If there is a near zero contact point between two glass surfaces, the applied index will be the ratio of the two glasses indexes, otherwise the ratio of the medium and the glass index is used. The ratio order depends upon ray entering or exiting the glass. The medium can be defined to be other than air.

All optical surfaces and ray traces are created directly in AutoCAD, therefore all familiar commands like Move, Rotate, Stretch, Copy, Array and many others can be used to add and position surfaces into the configuration the design requires. A ray trace can be performed at any time.

Communication between RayCAD for AutoCAD and other optical software

The ZEMAX Interface feature allows import and export of .ZMX optical data files and glass index data. 

RayCAD's users who also use ZEMAX Optical Design Software or are working with designers who work with ZEMAX had requested this interface. Using RayCAD for AutoCAD for initial layout and idea generation, ZEMAX for critical optimization and again RayCAD for final opto/mechanical packaging is a powerful combination.  It's ideal for the opto/mechanical designer who may encounter existing ZEMAX designs or is interfacing with a ZEMAX user.

Client Communication

Pictorial rendering is a powerful way of selling ideas through the development cycle and a great way to view and approve a product long before completion. The Render-Ready feature allows optical surfaces and ray traces to be rendered for a picture perfect presentation. It's used with a rendering package to simulate transparency, diffusion, reflection and refraction of surface properties and to define shadows. The design is rendered, complete with rays traced, to create a photorealistic picture. 

Right:  Pictures show optical and mechanical layouts modeled in AutoCAD with RayCAD, then rendered.

Summary

The concept of software add-ons is not new. Every package operating under Windows is an add-on to Windows. It doesn't make any sense to design Windows over and over again, and it doesn't make sense for an optical design package to recreate a CAD environment.

There are tremendous benefits from integrating optics and mechanics. Communication between optical and mechanical designers, creativity enhancement, increase in the number of people now having the ability to implement optics in their design, and improvement in package design due to integration are to cite just a few.

Being able to create opto/mechanical designs in the AutoCAD environment is unique. The open architecture of AutoCAD allows a designer the freedom to model just about anything and it's a tool that allows the imagination to run free. 
 

 

2015 RayCAD.  All rights reserved.

AutoCAD is a registered trademarks of Autodesk, Inc.

 


Last modified: 04/19/16