Difference between revisions of "User:Tohline/vtk/Quadric"

From VistrailsWiki
Jump to navigation Jump to search
(More explanation of default figure generation)
(→‎Generating Spheroids, Ellipsoids, and Quadrics: more discussion of default parameter values)
Line 22: Line 22:
</tr>
</tr>
</table>
</table>
==Various Modules==
===vtkQuadric===




Line 38: Line 41:
vtkQuadric is a concrete implementation of vtkImplicitFunction.
vtkQuadric is a concrete implementation of vtkImplicitFunction.
</font></td></tr>
</font></td></tr>
</table>
* We conclude that the default image 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(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>
===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 &#8212; that is five different surfaces differentiated from one another by color &#8212; 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" &#8212; 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(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>
</table>


=Related Discussions=
=Related Discussions=

Revision as of 21:43, 16 September 2015

Generating Spheroids, Ellipsoids, and Quadrics

Whitworth's (1981) Isothermal Free-Energy Surface
|   Tiled Menu   |   Tables of Content   |  Banner Video   |  Tohline Home Page   |

Getting Started

Here we explore the vtkQuadric method, which has been used to generate Figure 5-2 (§5.1, p. 77) of the VTK User's Guide, authored and published by Kitware, Inc., in an effort to learn how to draw two-dimensional spheroidal structures, three-dimensional ellipsoidal structures, and other analytically specifiable configurations.

1. Inside VisTrails, open, then execute "VisQuad.vt" without making any changes to the default pipeline or to any module parameters:

  • Follow this directory path: VisTrails/examples/vtk_examples/VisualizationAlgorighms/VisQuad.vt
  • The default workflow pipeline is shown in the top panel of the following figure. Upon execution, the default composite image that pops up in the VisTrails spreadsheet window is shown in the bottom panel.


Figure 1:     Default

Default Workflow

Default Figure 5-2 from User's Guide

Various Modules

vtkQuadric

  • In the workflow, 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:


vtkQuadric Module Documentation

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.

  • We conclude that the default image illustrates geometric properties of an underlying scalar field that has been generated from the function,

<math>~F(x,y,z)</math>

<math>~=</math>

<math>~\frac{x^2}{2} + y^2 + \frac{z^2}{5} + \frac{yz}{10} + \frac{y}{5}\, .</math>

vtkContourFilter

As is explained at the top of p. 78 of the 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(x,y,z)</math>, is constant and has the following values:

Contour Color: red yellow green light blue dark blue
Associated Scalar Value: 0.0 0.3 0.6 0.9 1.2

Related Discussions