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

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

add flow examples

File size: 2.6 KB
Line 
1
2# Example of using a unirect3d mesh in a vector field
3source data-unirect3d.tcl
4
5package require Rappture
6
7set driver [Rappture::library [lindex $argv 0]]
8
9set elements {
10    output.field.about.label "Jwire example"
11    output.field.component.flow.label "Flow 1"
12    output.field.component.flow.axis z
13    output.field.component.flow.position 0%
14    output.field.component.flow.volume yes
15    output.field.component.flow.streams no
16    output.field.component.flow.outline no
17    output.field.component.flow.particles(left).label "Left particle flow"
18    output.field.component.flow.particles(left).description {
19        Lorem ipsum dolor sit amet, consectetur adipiscing elit.
20    }
21    output.field.component.flow.particles(left).axis x
22    output.field.component.flow.particles(left).color lightgreen
23    output.field.component.flow.particles(left).position 10%
24    output.field.component.flow.particles(right).label "Right particle flow"
25    output.field.component.flow.particles(right).description {
26        This is a description for the right particle flow...
27    }
28    output.field.component.flow.particles(right).axis x
29    output.field.component.flow.particles(right).color khaki
30    output.field.component.flow.particles(right).position 90%
31    output.field.component.style  "-color blue:red -levels 6 -opacity 1"
32    output.field.component.flow.box(one).label "Region 1"
33    output.field.component.flow.box(one).color cyan
34    output.field.component.flow.box(one).corner(1) "0 -100 -100"
35    output.field.component.flow.box(one).corner(2) "3000 400 400"
36    output.field.component.flow.box(two).label "Region 2"
37    output.field.component.flow.box(two).color violet
38    output.field.component.flow.box(two).corner(1) "1000 -150 -100"
39    output.field.component.flow.box(two).corner(2) "3000 3000 3000"
40    output.field.component.flow.box(three).label "Region 3"
41    output.field.component.flow.box(three).color magenta
42    output.field.component.flow.box(three).corner(1) "1000 -150 -100"
43    output.field.component.flow.box(three).corner(2) "2000 450 450"
44    output.field.component.mesh unirect3d
45    output.field.component.extents 3
46    unirect3d.xaxis.min 0
47    unirect3d.xaxis.max 6300
48    unirect3d.xaxis.numpoints  126
49    unirect3d.yaxis.min 0
50    unirect3d.yaxis.max 1500
51    unirect3d.yaxis.numpoints  30
52    unirect3d.zaxis.min 0
53    unirect3d.zaxis.max 1519.05
54    unirect3d.zaxis.numpoints  22
55    unirect3d.components 3
56}
57
58puts stdout "Setting attributes for demo1"
59flush stdout
60
61foreach {key value} $elements {
62    $driver put $key $value
63}
64$driver put output.field.component.values $values
65
66Rappture::result $driver
67
68puts stdout "done"
69flush stdout
70exit 0
71
Note: See TracBrowser for help on using the repository browser.