How do I create presentation quality graphics and animations?

This article covers various methods for creating, annotating, exporting, and animating quality graphics for presentations and reports.

Authored By Dan Hill

Downloads

Article Attachments

 

Introduction

Let’s face it: bold graphics and visually appealing diagrams will catch the attention of your audience. They are impressive and have a tendency to leave a mark of professionalism.

Since quality graphics can have a large impact on the professional appearance of a presentation or report, OpticStudio supports various graphical functions which make it easy to completely transform your diagrams.

This article is designed to provide a detailed discussion on the various techniques and tools available for exporting and creating graphics in OpticStudio. We will cover how to copy/export graphics, annotate them, change opacity levels and colors for surfaces, and develop animations quickly and easily.

Exporting OpticStudio graphics

When exporting graphics, it is important to understand the audience that it will be presented to.

As an example, the 2D Layout in OpticStudio is very useful to the professional engineer, but it really doesn’t do much for drawing the attention of a general audience:

 

layout

 

We can improve the presentational quality of the drawing by simply choosing a Shaded Model instead:

 

shaded model

 

The Shaded Model has some extra capabilities as compared to the 2D cross section view. For example, we can alter the color and opacity of the lenses. We can also change the direction of the model and apply a section view. 

Or, by changing color combinations, adding some rotation, altering opacity levels, and drawing a 3/4 slice of each element, we can easily produce something like this:

 

shaded model

 

Any graphic window--including those shown above--can be saved as a BMP, PNG, or JPG file. This can be done with the Save As tool item in the toolbar.

 

geometric image analysis

 

The export format options are PNG, BMP, and JPG.  Selecting any one of the formats will invoke the Windows “Save As” window, from which you can save the file with the desired name and into the desired directory.

 

save as window

 

The saved file may be imported into many different Windows applications and may be post-edited if you wish. For presentations, these files may be easily imported into programs such as Microsoft PowerPoint. For details on importing these files, please refer to the documentation for that application.

If you plan on modifying the size of your graphics (increasing), it is best to export the image as a PDF with Classic View turned on to save the graphics as a metafile. You can enable this view by navigating to Setup...Project Preferences...Graphics

 

project preferences

 

The reason for this is that a metafile, unlike Bitmap or JPG, is a vector graphic format. The basic idea is that a vector graphic contains a sequence of drawing instructions that describe how to render the image, making it completely device independent. For a complete discussion, click here.1 Therefore, you will not degrade the image quality by shrinking or stretching the metafile.

To demonstrate, the following two diagrams are enlarged images of an originally small Detector Viewer Plot. One is a metafile, and one is a Bitmap. It’s fairly obvious as to which one is which.

 

detector image

 

detector image

 

Copying to the Clipboard

One extremely useful Windows feature is the clipboard. The clipboard is a “holding area” for graphics and text. The advantage to using the clipboard is that virtually all Windows programs can either import or export to the clipboard. To get an OpticStudio graphic into the clipboard, you may right-click the image and select Copy image to Clipboard. A "Copy" function is also included in the toolbar of analysis windows:

 

 

Alternatively, you may press Ctrl + C in the active window. Nothing will appear to happen as the data transfer is extremely fast. However, the data is available to other applications.

Not only is copying to the clipboard quick and easy, but metafiles are used to copy graphics to the clipboard, which means Windows uses the vector representation to draw this graphic when pasted or imported into other Windows programs.

Another way of getting OpticStudio graphics into other applications is to perform a screen capture. There are several tools available for this. One such tool is built directly into Windows 10: Snipping Tool. You can find that tool by searching for it in the Windows Start menu:

 

 

Graphics may be exported from OpticStudio and annotated in external software, or they may be annotated directly in OpticStudio via a handy annotation feature. The annotation feature supports Line, Arrow, Text, and Box commands, in addition to an annotation editor. Each command has its own specific syntax, which is covered in detail in the Help System: The Analyze Tab (sequential ui mode)...Graphics and Text Windows Operations...Using the Annotation Feature.

To use the annotation feature, navigate to the analysis window's toolbar:

 

3d layout

 

If you select text for example, the layout will change color. At this point, you may choose where we want the text to appear. Once you click the location, the Annotate Text dialog will pop up, to which you can type in your desired text:

 

annotate text

 

Once “OK” is selected, the text will appear in the selected location. 

 

3d layout

 

From here, you may continue to add more annotations by clicking another spot in the analysis window. You can exit the tool by pressing "Esc" on the keyboard. 

To edit or remove the newly created annotation, the Annotate Editor may be used. The editor is represented by the pencil icon on the toolbar. The Annotate Editor is in the form of a text editor which lists each command in its text syntax form. This allows for more precise control over the exact locations of lines and text, the control over the text font, and the ability to add more complex annotations.


annotate

 

To remove an annotation, simply delete the line which represents this annotation in the Annotate Editor. Note that annotation files may also be saved and loaded via the Save and Load buttons at the bottom of the Annotate Editor. With some additional commands, the diagram could be labeled more completely, which may help distinguish the two different configurations:

 

3d layout

 

Changing colors for the Shaded Model plots

Surfaces (Sequential) and objects (Non-Sequential) may be colored differently for display in the Shaded Model plots in OpticStudio.

Surface and object colors may be changed under the Surface Properties...Type tab (Sequential) and the Object Properties...Draw tab Non-Sequential) dialogs, via the pull down menu for Surface Color and Object Color respectively.

 

Surface 0 Properties

 

object 1 properties

 

The colors are listed by number, and the preview of each is shown in the drop-down menu. This makes it easy to “preview” each color before choosing it for that particular surface or object.

 

surface 0 properties

 

There are 24 colors which are available in the menu at any given time. However, you have the flexibility to change the color which corresponds to each number, giving you the freedom to create an unlimited number of different colors available for use in OpticStudio.

These colors are controlled under Setup...Project Preferences...Colors. Each color is represented by a combination of values (ranging from 0 to 255) of the three primary colors: red, green, and blue. To change a color, simply type in the desired values for red, green, and blue.

 

project preferences

 

Once you have changed each color number to the desired color, click Apply followed by OK. Note that you may Reset the colors to the defaults if you wish later on.

Now, the color numbers selected in the properties dialogs will correspond to the newly created colors. This can be very useful to create visually appealing plots with coordinating colors. In other cases, certain colors can be applied for emphasis or to help distinguish certain features of your design, as below.

 

features

 

Opacity and Shaded Model settings

Surfaces and objects can also be made semi-transparent in the Shaded Model, which can allow for easier viewing of the ray path. Without it, ray trajectories inside volumes would be unseen by the viewer, objects completely or partially inside of other objects would be invisible, and objects behind other objects could not be seen at various plot rotations.

 

features

 

The opacity setting for each object or surface is right next to the Color setting in the Object or Surface Properties dialogs. An opacity of 100% means the object/surface is completely opaque, or non-transparent. An opacity of 0% is effectively the same as not drawing the object/surface altogether.

 

object 2 properties

 

The opacity may be set manually, or you can ask OpticStudio to set the opacity settings. This can be done by selecting Opacity: Consider in the Shaded Model view.

 

 

Choosing this setting will allow OpticStudio to update the opacity settings of the objects/surfaces so that all can be seen.

The Shaded Model and NSC Shaded Model have many other settings that can be used to change the appearance of the diagram. For the Shaded Model of sequential systems, there are settings for sectional drawing, Radial Segments, Angular Segments, Brightness, Background, and Opacity.

 

shaded model

 

For creating “smoother” surfaces, the radial and angular segments may be increased. The background will change the background color of the Shaded Model Layout, and can be set to a number of different colors, including the 24 different colors defined by the Project Preferences...Colors menu. The brightness can be adjusted as well. A higher percentage will increase the brightness of the display.

In some cases, it is nice to be able to turn off the opacity settings without having to individually change the opacity for each individual surface via the properties dialog. Thus, the Opacity setting in the Shaded Model can also be set to Ignore. Altering the opacity via the Shaded Model uses a different algorithm to render the scene than when updating the opacity of each surface individually. Simply choose whichever method yields the preferred rendering.

You may also choose to draw fractional segments of your elements via the “Draw Section” pull down menu in the settings of the Shaded Model.  Sections can be chosen in quarter increments, 1/4, 1/2, 3/4, or Full.

 

shaded model

 

Animations

With the assistance of other software applications, animations of any graphic in OpticStudio can be generated very easily. There are numerous image capture and animation software packages available, and we are neutral on which one you should buy and use. In this article, we have utilized Easy GIF Animator, an inexpensive and easy-to-use GIF animation software.

Easy GIF can take a set of images and display them in a sequence with a specified delay to create an animation effect. An animated GIF file in Easy GIF Animator may be created from .GIF, .JPG, .JPEG, .BMP, .ICO, .EMF, and .WMF files. As OpticStudio can export graphics to .JPG, .BMP, .EMF, and .WMF formats, a series of images can be exported from OpticStudio and imported into Easy GIF Animator as frames for animation.

Each window can be exported one at a time manually, or you may use the power of ZPL to automate this process for you. ZPL includes several keywords for graphic window export. These keywords mimic the exact GUI calls to export images. The EXPORTBMP and EXPORTJPG will export any graphics window as a BMP or JPG, respectively. One of these keywords, in combination with a string function ($STR), can export multiple images under different file names so that they can be loaded into your animation software.

For the purposes of demonstrating the automation of exporting images through ZPL, we will use a simple sequential file which has been constructed solely for the purposes of drawing a coated mirror.  In conjunction with this file, a short macro will be used to export multiple JPEG images as the MIRROR is tilted about its Y axis. Both files are attached to this article.

The following macro sets the Tilt About Y parameter on the Coordinate Break Surface before the mirror in a FOR loop. For each tilt value, the Shaded Model window is updated and exported as a JPG file under a different filename.

 

macro

 

By importing the 36 images into Easy GIF Animator, we can create an animated rotation of the coated mirror for presentation purposes.

 

 

With the assistance of ZPL and animation software, the possibilities for creating OpticStudio movies are endless, and will really attract the attention of your audience. As each animation package is different, we recommend consulting the product’s documentation for details on creating animations from files which have been exported by OpticStudio. As you may find in several of the OpticStudio Knowledgebase articles, there are any number of possibilities to creating your own animations from exported OpticStudio graphics.

References

1. TALtech. 2019. Raster vs Vector Images and How They Relate to Barcodes. www.taltech.com/support/entry/raster_vs_vector_images_and_how_they_relate_to_barcodes.

 

 

 

KA-01732

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.