File: Rotate

package info (click to toggle)
dxsamples 4.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 26,348 kB
  • ctags: 1,513
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,101
file content (23 lines) | stat: -rw-r--r-- 693 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
// import the electron density field
electrondensity = Import("watermolecule");

// partition the data for parallelism
electrondensity = Partition(electrondensity);

// Create an isosurface at value 0.3
isosurface = Isosurface(electrondensity,0.3);

// Create a camera
camera = AutoCamera(electrondensity);

// Display the isosurface using the camera
Display(isosurface,camera);

// Rotate the isosurface about the y axis by 45 degrees and display
rotated = Rotate(isosurface,"y",45);
Display(rotated,camera);

// Rotate the isosurface about the x axis by 45 degrees and then about the
// z axis by 30 degrees and display
rotated = Rotate(isosurface,"x",45, "z", 30);
Display(rotated,camera);