Example Code

Mini Animation Package

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example is a simple 2D Drawing and Animation tool.


Description

You impliment a series of doodles on the drawing pad, and then play the drawings at a configurable frame rate to view the animation.


Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Doodle on the Drawing Pad
  2. Select Next Frame to create a new frame in the animation
  3. Repeat instructions i & ii, until you are happy with your creation
  4. Hit Done
  5. Watch in amazement as your doodles come to life
  6. Hit STOP when you grow bored of your creation

 

Additional Information or References 

Front Panel

Front Panel.jpg

The tool includes an animation technique called Onion Skinning - when you create a new frame, the drawing pad retains a grayed-out version of the previous frame. This aids the animator in the creation of smoother animations.

http://en.wikipedia.org/wiki/Onion_skinning

 

Before stopping the application, the user is prompted to save the animation as a series of bitmaps, which can be viewed at a later stage or uploaded to an online gif generator, such as http://gickr.com/ or http://www.gifup.com/

The images will be saved in a sub-folder called Saved Animations inside the application directory.

I would like to work on producing an animated gif directly from LabVIEW, but have been unable to do this so far. If any esteemed members of the community would like to help me, I would be very grateful.

The challenge has been set!!!

I have also attached an example animation, created with the tool, called Fireworks.gif. It is certainly not going to get me a job at Pixar.

To see the animation, just click on the image below.Fireworks.gif

 

VI Snippet

323.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
JohnMc19
Active Participant
Active Participant
on

Amazing! Nice work.

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
Tom9390
NI Employee (retired)
on

Love it

G-Money
NI Employee (retired)
on

Nice job. What are you wanting to do with gif in LabVIEW? Just create a gif file or to view it? There are some users on our forums who have used gif in LabVIEW in the past (http://forums.ni.com/t5/LabVIEW/GIF-Reader-VI/m-p/796039?view=by_date_ascending#M363305).

ECNU
Member
Member
on

creative job~

AmitKaria2k
Member
Member
on

Good job.. Keep it up !

SwapsG
Member
Member
on

Nice...

jawadtld
Member
Member
on

Nice work.. keep it up..