Editing
Vtk/SimpleCubeTutorial
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Reading Cube Model from a Web Site=== 1. Start from scratch: Generate the "tomato-colored" cylinder depicted in Figure "Cylinder01" by following the first two steps of the "Getting Started" example presented above. [[Image:ModifiedPipeline.jpg|right|thumb|250px|Pipeline01]]2. Disconnect the "vtkCylinderSource" module from the pipeline, then add (and connect) the following two modules to the pipeline: "HTTPFile" and "vtkPolyDataReader". This is done by finding the names of these modules in the library list shown in the "Modules" segment of the VisTrails Builder Window, then highlighting, and dragging and dropping the modules into VisTrail's Pipeline widget. After doing this, the VisTrails pipeline should look like the one depicted here as Figure "Pipeline01". (If desired, the "vtkCylinderSource" module can actually be deleted from the Builder Window.) 3. Go to the following website: <div align="center"> [http://www.phys.lsu.edu/~tohline/vistrails/datafiles/SimpleCube_step01.vtk http://www.phys.lsu.edu/~tohline/vistrails/datafiles/SimpleCube_step01.vtk] </div> The information provided in this 20-line ASCII file — also displayed in the left-hand panel of the "Minimalistic Cube" figure, below — supplies the POINTS (vertices) and POLYGONS that are sufficient to define the wireframe model of a simple cube. The information in this file is identical to the first 20 lines of the example cube description shown in §15.3 (specifically, starting at the bottom of p. 331) of the [http://www.kitware.com/products/books/vtkguide.html ''VTK User's Guide'']. 4. Click on the "HTTPFile" module in the newly modified pipeline; drag the "url" method into the "Set Methods" segment of the VisTrails Builder Window; then, type (or cut and paste) into the blank window allocated for the url "String," the full "SimpleCube_step01" web address, including the "http://" prefix, as identified in step #3 above. 5. Executing this modified pipeline should generate the tomato-colored cube as shown here in the right-hand panel of the "Minimalistic Cube" figure. <div align="center"> <table border="1"> <tr> <td align="center" colspan="2"> '''Minimalistic Cube: ASCII File & Rendered Image''' </td> </tr> <tr> <td align="left"> <pre style="color:maroon;font-size:100%"> # vtk DataFile Version 2.0 Cube example ASCII DATASET POLYDATA POINTS 8 float 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 POLYGONS 6 30 4 0 1 2 3 4 4 5 6 7 4 0 1 5 4 4 2 3 7 6 4 0 4 7 3 4 1 2 6 5 </pre> </td> <td align="center"> [[Image:MinimalisticCube.jpg|center|thumb|250px|Minimalistic Cube]] </td> </tr> <tr> <td align="left" colspan="2"> The sets of numbers used to define the POINTS & POLYGONS of this simple cube are [[vtk/SimpleCubeTutorial/CubeDetails|explained here]]. </td> </tr> </table> </div> 6. In an [[vtk/SimpleCubeTutorial/CubeDetails|accompanying discussion]], we explain how to interpret — and, therefore, also how to modify as desired — the rows and columns of numbers that have been used here to define the POINTS (vertices) and POLYGONS of a simple cube. 7. For fun, use VisTrails' "HTTPFile" module to load each of the following files that provide ASCII data written in VTK's Simple Legacy Format to specify a more intricate multi-polygonal structure. I found these posted on [http://people.sc.fsu.edu/~jburkardt/data/vtk/vtk.html J. Burkardt's FSU website]: * [http://people.sc.fsu.edu/~jburkardt/data/vtk/polyex.vtk Simple Cube] * [http://people.sc.fsu.edu/~jburkardt/data/vtk/vtk.vtk vtk.vtk] = (Simple lines spelling out "vtk") * [http://people.sc.fsu.edu/~jburkardt/data/vtk/t.vtk v.vtk] = (A 3D version of the letter "v") * [http://people.sc.fsu.edu/~jburkardt/data/vtk/t.vtk t.vtk] = (A 3D version of the letter "t") * [http://people.sc.fsu.edu/~jburkardt/data/vtk/k.vtk k.vtk] = (A 3D version of the letter "k")
Summary:
Please note that all contributions to JETohlineWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JETohlineWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Tiled Menu
Table of Contents
Old (VisTrails) Cover
Appendices
Variables & Parameters
Key Equations
Special Functions
Permissions
Formats
References
lsuPhys
Ramblings
Uploaded Images
Originals
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information