LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI of the Day (9/1/2009)

Today we will explore one of the my favorite indicators, the "Intensity Graph".  This is a great tool for visualizing large datasets, 8-bit bitmaps and for making cool pictures.  The hardest part for me is getting the z-scale colors that I want.  In my example below you can create a picture and then either adjust the ramp or manually adjust the color array.  I'd like to channel your inner artist, so if you find a cool color scheme please post a screenshot.  I have tacked on an export button to generate a PNG file so I can't make it much easier.

 

The example I have chosen is using Newton's method to find the Nth roots of unity.  It was the quickest way I could think of to create some interesting pictures.  It is well-known that the convergence region for the different roots is a fractal.  The points on the graph indicate the starting point for Newton's method to find a zero of z^N - 1 and you can display either the number of iterations to converge or the argument of the root found.  Plenty of room to explore more complicated polynomials.  Bonus points for scaling the axes to display the actual real and imaginary components, I didn't have time to add that this morning.

 

As always, groundrules for VIOTD are found here.

 

Here is my addition to the art gallery. 

 

Newton1.png

Message 1 of 5
(3,935 Views)
fun stuff.png
Tim
GHSP
Message 2 of 5
(3,886 Views)

As you said, the colors for the z-axis should be selected wisely. In the playground presented, everything is fine and crazy shemes are cool. But if you work sientifically, consider the following:

You (or the customer using your SW) is publishing an articel in color printing. But the poor student will only have a BW copy. So now it is important, that the color scale is linear with the grey-scale intensity. A rainbow (red-green-blue) palette won't give that to you. The task is to have a higher resolution than the built-in white->blue palette.

 

Felix

0 Kudos
Message 3 of 5
(3,862 Views)

Indeed, color is both a tool and a weapon.  And don't forget that a surprising number of people are color blind. 

 

But today is about getting the "money shot" that lands you on the cover of Nature.  Here is a picture where I cheated a little by using Ben's trick to combine two images.  The background shading shows the various regions of convergence and the highlights from the iteration picture add contrast to the edges.

 

NewtonImage2.png

Message 4 of 5
(3,821 Views)
I have a new, excellent background image on my desktop. Smiley Happy
PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 5 of 5
(3,810 Views)