Writes the contents of a field or array of fields to a POVray version 3.1 file.
module WritePovCore <src_file="wr_pov.cxx", cxx_hdr_files="fld/Xfld.h"> { cxxmethod+req update <status=1>( filename+read+notify+req, in+read, top_name+read, nobjs+read, .err+write, .err_str+write ); string filename<export=2,NEportLevels={2,0}>; Mesh+Node_Data &in<export=2,NEportLevels={2,0}>[]; string top_name<export=2,NEportLevels={2,0}> = "default_avs_field"; int nobjs<export=2,NEportLevels={2,0}>; int err<export=2,NEportLevels={0,2}> = 0; string err_str<export=2,NEportLevels={0,2}> = ""; };
This module parses the arrays of meshes in and then creates an ASCII POV output file containing the Cell_Sets of certain 2D elements. The current implementation outputs triangle, quad, line, polyline and polytristrip cell sets. The module takes cell mesh topology from the input field structure and writes this data out to the POV file in a format suitable for processing by the POVray ray tracing software package.
The POVray software system is a ray-trace based rendering system for high quality image production and animation. The system is available on most common platforms. The POVray system is free, as long as the stated conditions are met. Full source code is also available for extension or ray tracing research. POVray software and further information can be obtained from: http://www.povray.org
The WritePovCore module contains no source code from POVray, and does not need any of the POVray software available for module compilation or use. The POVray software is required for processing and rendering the output file. The files generated by this module are compatible with version 3.1 of POVray. They may also work with previous versions; however this has not been tested.
It should be noted that the generated POV files will require a certain amount of manual editing before they can be correctly rendered. Data about camera and light positions is stored in View and Scene objects. The module takes field data as an input and therefore cannot access this data. Sample data is written to the output file. Before the POV file can be rendered the camera and light positions will have to be altered so that they are appropriate for the scene.
The cell-set boundaries are preserved in the POV file format, and union blocks separate each field. Node data is ignored and only mesh geometry is passed to the file. This is done as the POVray system does not appear to allow per-node color values. Lines are defined as thin cylinders. As the module takes an array of meshes as its input it is able to output an array of objects. This is used by the user macro write_pov_ARR to output a GroupObject containing a number of Graphic Display objects. This can, for example, be used to attempt bounds, isosurface and a slice plane objects to a single POV file.
&in[]
Reference to an array of Fields which are to be written to the POVray file. Each Field should consist of a Mesh containing a Cell_Set. Node data is ignored and is not written to the output file.
filename
The name of the file that should be written to. The parameter is of type string. The filename should specify the full path name of the file.
top_name
The name of the object being written to the file. The parameter is of type string. The POV file format stores the names of the objects in the file. This parameter allows these names to be specified. The supplied user macros use the standard AVS object names.
nobjs
The number of objects to be written to the file. The parameter is of type int. The user macro write_pov_ARR uses the GroupObject parameters to set this parameter.
err
This flag is used to indicate whether an error has occurred. The parameter is of type int. If this parameter is set to 1 then an error has occurred within the module and the user should be informed. This can be done by using the parameter to control the visibility of an err_str label.
err_str
The description of the current error condition. The parameter is of type string. This parameter is used to store a user readable description of the current error. If no error has occurred the parameter has a value of "".
The low-level WritePovCore module is used in the User Macros write_pov, write_pov_GD and write_pov_ARR.
Two example applications are provided. WritePovEg demonstrates the use of the write_pov user macro by generating an isosurface and writing that isosurface to a file. WritePovArrEg demonstrates the use of the write_pov_ARR macro by loading a multiblock set of data and generating a series of visualizations. The isosurface can then be written to a file. If the resultant file is examined then it is apparent that the isosurface is written out in several chunks, one per block of data.
iac_proj/wr_pov/wpovmods.v contains the WritePovCore module V definition.
The low-level WritePovMods library containing the module WritePovCore does not specify a process. By default the express process will be used.
Ian Curington Advanced Visual Systems, Ltd. Hanworth Lane, Chertsey Surrey, UK KT16 9JX
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
write_pov, write_pov_GD, write_pov_ARR, WritePovUI, WritePovEg, WritePovArrEg, Write STL, Write VGF