source: trunk/examples/flow/demo3/demo3.tcl @ 1464

Last change on this file since 1464 was 1464, checked in by gah, 12 years ago

add flow examples

File size: 1.1 KB
Line 
1
2# Example of using dx file in a vector field.
3source data-dx.tcl
4
5package require Rappture
6
7set driver [Rappture::library [lindex $argv 0]]
8
9set elements {
10    output.field.about.label "SiO2"
11    output.field.component.flow.axis z
12    output.field.component.flow.position 0%
13    output.field.component.flow.volume yes
14    output.field.component.flow.streams no
15    output.field.component.flow.outline no
16    output.field.component.flow.particles(left).axis x
17    output.field.component.flow.particles(left).color lightgreen
18    output.field.component.flow.particles(left).position 10%
19    output.field.component.flow.particles(right).axis x
20    output.field.component.flow.particles(right).color khaki
21    output.field.component.flow.particles(right).position 90%
22    output.field.component.style  "-color blue:red -levels 6 -opacity 1"
23    output.field.component.extents 3
24}
25
26puts stdout "Setting attributes for demo3"
27flush stdout
28foreach {key value} $elements {
29    $driver put $key $value
30}
31
32set data [Rappture::encoding::encode -as zb64 "<DX>$dx"]
33$driver put output.field.component.dx $data
34
35Rappture::result $driver
36
37puts stdout "done"
38flush stdout
39exit 0
40
Note: See TracBrowser for help on using the repository browser.