File: CollectSeries

package info (click to toggle)
dxsamples 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 26,340 kB
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,102
file content (29 lines) | stat: -rw-r--r-- 1,016 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Create four fields using Construct, each with a different vector for
// the data component

// vector field mainly in the x direction
field1 = Construct([0 0 0],[1 1 1],[10 10 10], [1.0 0.1 0.1]);

// vector field mainly in the y direction
field2 = Construct([0 0 0],[1 1 1],[10 10 10], [0.0 1.1 0.1]);

// vector field mainly in the x direction
field3 = Construct([0 0 0],[1 1 1],[10 10 10], [1.0 0.2 0.1]);

// vector field mainly in the y direction
field4 = Construct([0 0 0],[1 1 1],[10 10 10], [0.2 1.2 0.1]);

// collect them together into a series field, with evenly spaced time tags
series = CollectSeries(field1, 0.0, field2, 2.0, field3, 4.0, field4, 6.0);

// sample one of the fields to get a set of sample points
samples = Sample(field1, 50);

// create streaklines and display
streaklines = Streakline(NULL,series, samples);
streaklines = Color(streaklines,"red");
camera = AutoCamera(series,"off-diagonal");
box = ShowBox(series);

collected = Collect(box, streaklines);
Display(collected,camera);