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

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

add flow examples

File size: 1.4 KB
Line 
1
2# Example of using unirect2d mesh in a vector field.
3source data-unirect2d.tcl
4
5package require Rappture
6
7set driver [Rappture::library [lindex $argv 0]]
8
9set elements {
10    output.field.about.label "Flow 2d half"
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 yellow
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 pink
21    output.field.component.flow.particles(right).position 90%
22    output.field.component.style  "-color rainbow -levels 6 -opacity 1"
23    output.field.camera.position {
24        theta 90 phi 0 psi 0 pan-x 0 pan-y 0 zoom 1.0
25    }
26    output.field.component.extents 3
27    output.field.component.mesh unirect2d
28    unirect2d.xaxis.min -0.5
29    unirect2d.xaxis.max 152
30    unirect2d.xaxis.numpoints  305
31    unirect2d.yaxis.min -22
32    unirect2d.yaxis.max 21.6
33    unirect2d.yaxis.numpoints  109
34    unirect2d.components 2
35}
36
37puts stdout "Setting attributes for demo1"
38flush stdout
39
40foreach {key value} $elements {
41    $driver put $key $value
42}
43$driver put output.field.component.values $values
44
45Rappture::result $driver
46
47puts stdout "done"
48flush stdout
49exit 0
Note: See TracBrowser for help on using the repository browser.