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

Last change on this file since 3484 was 3484, checked in by ldelgass, 8 years ago

Update flow example to use quaternion to configure initial camera angle

File size: 1.8 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.flow.box(one).label "Region 1"
23    output.field.component.flow.box(one).color magenta
24    output.field.component.flow.box(one).corner(1) "50 -10 0"
25    output.field.component.flow.box(one).corner(2) "70 20 0"
26   
27    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"
28    output.field.camera.position {
29        qw 1 qx 0 qy 0 qz 0 pan-x 0 pan-y 0 zoom 1.0
30    }
31    output.field.component.extents 2
32    output.field.component.mesh unirect2d
33    unirect2d.xaxis.min -0.5
34    unirect2d.xaxis.max 152
35    unirect2d.xaxis.numpoints  305
36    unirect2d.yaxis.min -22
37    unirect2d.yaxis.max 21.6
38    unirect2d.yaxis.numpoints  109
39    unirect2d.components 2
40}
41
42puts stdout "Setting attributes for demo1"
43flush stdout
44
45foreach {key value} $elements {
46    $driver put $key $value
47}
48$driver put output.field.component.values $values
49
50Rappture::result $driver
51
52puts stdout "done"
53flush stdout
54exit 0
Note: See TracBrowser for help on using the repository browser.