Export Gizmo movie

Hi,

I would like to export a movie from a rotating object in a gizmo plot but with high resolution. If I do this with the create movie... from the menu, the resolution is low. 
If i export a static gizmo however, I can get high resolution. How can I combine the two? Can I write a function that rotates all the objects in the gizmo plot and exports these as single images so I can later ad them up in a movie program? How would I write such a function which rotates all objects from a gizmo?

Or is there a better way to do it?
Cheers

Silvan

Hello Silvan,

I can't recall off hand where is the bottleneck in Igor's movie creation that affects the resulting resolution but I am aware of the issue.  Therefore, if you really require high resolution movie you need to export the images and create the movie elsewhere.

Exporting images is fairly simple.  You can use the SavePict operation or ExportGizmo.

There are various ways to implement the rotations.  You can find the documentation for Gizmo rotations by executing:

DisplayHelpTopic "Programming Rotations in Gizmo"

A simplified approach (if you just want rotations about the z-axis) would be to add a rotation operation to the display list and then run a loop that changes the rotation angle.  For example, insert a rotation (45 degrees) about the z-axis:

ModifyGizmo insertDisplayList=0, opName=rotate0, operation=rotate, data={45,0,0,1}

and then run a loop that changes the rotation, updates and exports the image:

Function rotateFrames(numFrames)
    Variable numFrames
   
        Variable i,angle,dAngle=360/(numFrames-1)
        String name
        for(i=0;i<numFrames;i+=1)
            angle=i*dAngle
            ModifyGizmo opName=rotate0, operation=rotate,data={(angle),0,0,1}
            doUpdate
            name="frame_"+num2str(i)
            SavePict/E=-5/B=288/WIN=Gizmo0/P=home as name
        endfor
End

If you want to handle different kind of rotations you can use the Slerp() function in MatrixOP to compute a linearly interpolated quaternion.  You would then use ModifyGizmo setQuaternion instead of using the rotation operation as in the loop above.

Feel free to contact me directly at support@wavemetrics.com if you need more help with this.

 

A.G.