Editing
Vtk/Quadric
(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!
==Various Modules== ===vtkQuadric=== In the workflow image displayed above, the vtkQuadric module has been highlighted, so the inset window to the right of the workflow pipeline displays the values of the 10 separate model coefficients that have been used to generate the default "Quadric" configuration. Presumably, these values correspond, respectively, to coefficients <math>~a0, a1, a2, a3 \ldots a9</math> as they appear in the quadric function definition as provided in the default module documentation and as reprinted here: <table border="1" align="center" width="60%" cellpadding="8"> <tr><th align="center">vtkQuadric Module Documentation</th></tr> <tr><td align="left"><font face="Courier"> vtkQuadric - evaluate implicit quadric function Superclass: vtkImplicitFunction vtkQuadric evaluates the quadric function F(x,y,z) = a0*x^2 + a1*y^2 + a2*z^2 + a3*x*y + a4*y*z + a5*x*z + a6*x + a7*y + a8*z + a9. vtkQuadric is a concrete implementation of vtkImplicitFunction. </font></td></tr> </table> We conclude that the default image displayed above illustrates geometric properties of an underlying scalar field that has been generated from the function, <div align="center"> <table border="0" cellpadding="5" align="center"> <tr> <td align="right"> <math>~F_0(x,y,z)</math> </td> <td align="center"> <math>~=</math> </td> <td align="left"> <math>~\frac{x^2}{2} + y^2 + \frac{z^2}{5} + \frac{yz}{10} + \frac{y}{5}\, .</math> </td> </tr> </table> </div> ===vtkSampleFunction=== As implemented in this example visualization, this module assigns default values and behavior to all methods ''except'' one: * SampleDimensions is specified by the three integers (30, 30, 30); this is presumably the number of (uniformly sized) grid cells in each of the three coordinate directions — respectively, (x, y, z) — that will be assigned values of the function, <math>~F_0(x, y, z)</math>. While initially deciphering the behavior of this entire workflow, I wondered how the edges of the (black) bounding box were specified. Simultaneously, I wondered over what range of values of x, y, and z the grid resolution of (30, 30, 30) was being stretched. The answer to both of these questions is the same. The function is sampled over the range of coordinate values — and the (black) bounding box is drawn at the edges of this sampled region — as specified by the vtkSampleFunction method, ModelBounds. * By experimentation, I discovered that the ''default'' coordinate values assigned to Modelbounds are, for x, y, and z, respectively, (-1.0, 1.0), (-1.0, 1.0), and (-1.0, 1.0). By assigning, instead, values of (0.0, 1.0), (0.0, 1.0), and (0.0, 1.0), precisely one octant of the original configuration is displayed. ===vtkContourFilter=== As is explained at the top of p. 78 of the [http://www.kitware.com/products/books/vtkguide.html ''VTK User's Guide''], five different contours — that is, five different surfaces differentiated from one another by color — have been drawn. The ''specific'' set of surfaces has been specified via the "GenerateValues" method inside the vtkContourFilter module. Clicking on (''i.e.,'' highlighting) the vtkContourFilter module in the VisTrails workflow reveals that three numbers have been specified: * Two floating-point numbers identify the "scalar range" — in the default case, the specified range is <math>0.0 \rightarrow 1.2</math>; * The single integer identifies the "number of contours to be generated in the range (end values inclusive). We conclude that the five separately colored "surfaces" correspond to contours for which the function, <math>~F_0(x,y,z)</math>, is constant and has the following values: <table border="1" cellpadding="5" align="center"> <tr> <th align="right">Contour Color:</th> <td align="center">red</td> <td align="center">yellow</td> <td align="center">green</td> <td align="center">light blue</td> <td align="center">dark blue</td> </tr> <tr> <th align="right">Associated Scalar Value:</th> <td align="center">0.0</td> <td align="center">0.3</td> <td align="center">0.6</td> <td align="center">0.9</td> <td align="center">1.2</td> </tr> </table> ===vtkPolyDataMapper=== This default workflow contains two independent instances of the vtkPolyDataMapper module. The instance on the left plays a role in mapping the nested color contours to the image screen (that is, to the spreadsheet window) while the instance on the right plays a role in mapping the bounding box to the screen. * vtkPolyDataMapper (left) — notice that a ScalarRange of (0.0, 1.2) has been explicitly assigned, which is exactly the same "scalar range" that has been explicitly assigned inside the vtkContourFilter module. This means that the [[vtk/SimpleCubeTutorial#Deciphering_VTK.27s_default_Lookup_Table|default color table]], which spans from red to dark blue, should be stretched to cover the entire range of scalar values that is being probed. The colors of the five distinct contours can be changed by specifying a different ScalarRange inside this instance of vtkPolyDataMapper (left). For example, setting ScalarRange = (0.0, 0.6) will squeeze the full dynamic range of the color table into a narrower range of scalar values; the first three contours — <math>~F_0</math> = 0.0, 0.3, and 0.6 — will be colored red, green, and dark blue, while the last two contours — <math>~F_0</math> = 0.9 and 1.2 — will be pegged to the color dark blue because they are outside of the new identified range. * vtkPolyDataMapper (right) — notice that default values and behaviors are accepted throughout. We should point out that, in this default workflow, the color of the bounding box is set (to black) by the Color method inside of the vtkProperty module; this can be readily changed to generate a bounding box whose edges are a different color, for example, red.
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