1 | |
---|
2 | # Example of using unirect2d mesh with a vector field. |
---|
3 | # This is included only for testing purposes, since unirect2d meshes are |
---|
4 | # deprecated. |
---|
5 | if 0 { |
---|
6 | # extents=2 is deprecated, since VTK needs 3D vectors, even for 2D meshes |
---|
7 | # Enabling this block should cause an error |
---|
8 | source data-unirect2d.tcl |
---|
9 | set extents 2 |
---|
10 | } else { |
---|
11 | source data-2dflow.tcl |
---|
12 | set extents 3 |
---|
13 | } |
---|
14 | |
---|
15 | package require Rappture |
---|
16 | |
---|
17 | set driver [Rappture::library [lindex $argv 0]] |
---|
18 | |
---|
19 | set elements [subst { |
---|
20 | output.field.about.label "Flow 2d half" |
---|
21 | output.field.component.flow.axis z |
---|
22 | output.field.component.flow.position 0% |
---|
23 | output.field.component.flow.volume yes |
---|
24 | output.field.component.flow.streams no |
---|
25 | output.field.component.flow.outline no |
---|
26 | output.field.component.flow.particles(left).axis x |
---|
27 | output.field.component.flow.particles(left).color yellow |
---|
28 | output.field.component.flow.particles(left).position 10% |
---|
29 | output.field.component.flow.particles(right).axis x |
---|
30 | output.field.component.flow.particles(right).color pink |
---|
31 | output.field.component.flow.particles(right).position 90% |
---|
32 | output.field.component.flow.box(one).label "Region 1" |
---|
33 | output.field.component.flow.box(one).color magenta |
---|
34 | output.field.component.flow.box(one).corner(1) "50 -10 0" |
---|
35 | output.field.component.flow.box(one).corner(2) "70 20 0" |
---|
36 | |
---|
37 | output.field.component.style "-nonuniformcolors {0.0 steelblue4 0.000001 blue 0.01 green 0.1 grey 1.0 white} -markers {1% 2% 3% 5% 8% 10% 20% 50% 80%} -opacity 1" |
---|
38 | output.field.camera.position { |
---|
39 | -qw 1 -qx 0 -qy 0 -qz 0 -xpan 0 -ypan 0 -zoom 1.0 |
---|
40 | } |
---|
41 | output.field.component.extents $extents |
---|
42 | output.field.component.mesh unirect2d |
---|
43 | unirect2d.xaxis.min -0.5 |
---|
44 | unirect2d.xaxis.max 152 |
---|
45 | unirect2d.xaxis.numpoints 305 |
---|
46 | unirect2d.yaxis.min -22 |
---|
47 | unirect2d.yaxis.max 21.6 |
---|
48 | unirect2d.yaxis.numpoints 109 |
---|
49 | unirect2d.components 2 |
---|
50 | }] |
---|
51 | |
---|
52 | puts stdout "Setting attributes for demo1" |
---|
53 | flush stdout |
---|
54 | |
---|
55 | foreach {key value} $elements { |
---|
56 | $driver put $key $value |
---|
57 | } |
---|
58 | $driver put output.field.component.values $values |
---|
59 | |
---|
60 | Rappture::result $driver |
---|
61 | |
---|
62 | puts stdout "done" |
---|
63 | flush stdout |
---|
64 | exit 0 |
---|