12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

570 appendix cIf you want to see some of the capabilities of DX without doing any work, lookat some of the built-in Samples accessible from the main menu (we recommendThunderStreamlines.net and RubberTube.net). Once the pretty picture appears,go to Options/ViewControl/Mode and try out Rotate and Navigate. If you wantto see how the graphical program created the visualization, go to Windows/OpenVisual Program Editor and rearrange the program elements.1. Prepare input data: Run the program ShockLax.java that describes shockwave formation and produces the file Shock.dat we wish to visualize; alternatively,copy the file ShockLax.dat from the CD (Codes/JavaCodes). If you arerunning DX under Cygwin, you will need to copy this file to the appropriatefolder in /home/userid, where userid is your name on the computer.2. Examine input data: Take note of the structure of the data in Shock.dat.Itisin a file format designed for creating a surface plot of z(x, y) with Gnuplot. Itcontains a column of 25 data values, a blank line, and then another 25 valuesfollowed by another blank lines, and so forth, for a total of 13 columns eachwith 25 data values:0.00.69508436939714831.3553052083635031.9461146066793003…–1.0605832625347442–0.380140746321537(blank line)0.00.64038687572353011.2556172093991282…2.30599770702864732.685151549102467(blank line)2.9987593603912095···Recall that the data are the z values, the locations in the column are the xvalues, and the column number gives the y values. The blank lines were putin to tell Gnuplot that we are starting a new column.3. Edit data: While you can leave the blank lines in the file and still produce aDX visualization, they are not necessary because we explicitly told DX thatwe have one column of 25 × 13 data elements. Try both and see!4. Start DX: Either key in dx at the Unix prompt or start an X-Windows serverand then start DX. A Data Explorer main window (Figure C.1 left) shouldappear.−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 570

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!