11.07.2015 Views

VMD User's Guide

VMD User's Guide

VMD User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}display update offfor {set i 0} {$i < 1024} {incr i} {if {$i == 0} {set r 1; set g 0; set b 0}if {$i == 511} {set r 1; set g 1; set b 1}if {$i == 513} {set r 0; set g 0; set b 1}color change rgb [expr $i + $color_start ] $r $g $b}display update ontricolor_scale11.5.2 Creating a set of black-and-white color definitionsTo map grayscale on the color ids 0-16 (0=black; 16=white):proc make_grayscale {} {display update offfor {set i 0} {$i < 17} {incr i} {set val [expr $i / 16.0]color change rgb $i $val $val $val}display update on}Note that the display updates are switched off for the time of redefinition, so that the screenwould not be redrawn every time one color is changed. This way the procedure works faster. Theonly bad thing about this idea is that black becomes white, and white changes too, so the namesof the colors (yellow, orange, etc.) become useless.11.5.3 Revert all RGB values to defaultsAfter some of the color definitions have been changed and you want to restore the default definitions,the following procedure might be useful.proc revert_colors {} {display update offforeach color [colorinfo colors] {color change rgb $color}display update on}169

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!