ScPovPlot3D/WireSurf.inc [ Modules ]
AUTHOR
Janusz Opiła Ph.D. jmo@agh.edu.pl, janusz.opila@gmail.com Dept. of Applied Informatics AGH Univ. of Science & Technology. Cracow, Poland Maintained by Janusz Opiła Ph.D.
PURPOSE
Macros for representation of 3D surfaces as wireframes
Fig.[WireFrame] Linear (twice), Cubic and BSpline interpolationCOPYRIGHT
GNU GPL v.3 License (c) 2007-now by Janusz Opiła Ph.D.
WireSurf.inc/DrawBSplineWires() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Draws surface representation in the form of grid of LINEAR splines, ie. straight cuts of line
SYNOPSIS
1126 DrawBSplineWires(float _wireR, boolean _Sphrs)INPUTS
_wireR - float = radii of the wire _Sphrs - boolean = draw spheres in place of nodes? yes/noSEE ALSO
ImportDataRC() ImportDataXY() DrawNodePoints() DrawLinearWires() DrawCubicWires()
WireSurf.inc/DrawCubicWires() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Draws surface representation in the form of grid of LINEAR splines, ie. straight cuts of line
SYNOPSIS
1059 DrawCubicWires(float _wireR, boolean _Sphrs)INPUTS
_wireR - float = radii of the wire _Sphrs - boolean = draw spheres in place of nodes? yes/noSEE ALSO
ImportDataRC() ImportDataXY() DrawNodePoints() DrawLinearWires() DrawBSplineWires()
WireSurf.inc/DrawLinearWires() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Draws surface representation in the form of grid of LINEAR splines, ie. straight cuts of line
SYNOPSIS
1015 DrawLinearWires(float _wireR, boolean _Sphrs)INPUTS
_wireR - float = radii of the wire _Sphrs - boolean = draw spheres in place of nodes? yes/noSEE ALSO
ImportDataRC() ImportDataXY() DrawNodePoints() DrawCubicWires(), DrawBSplineWires()
WireSurf.inc/DrawNodePoints() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Draws grid data points as ellipsoids ie. spheres scaled along vertical axis by _scl factor. If _scl equals 1 one obtains pure sphere, however it can be lower or bigger than 1 This macro is designed to visualize uncertainty at given grid point
SYNOPSIS
996 DrawNodePoints(float _scl)INPUTS
_scl - scaling factor along vertical axis, not perpendicularly to the surface! this is intended for representation of uncertainty of the data (SD? SEM?)
WireSurf.inc/DrawWireFrameRC(), DrawWireFrame() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Draws representation od data from input file as wireframed 3D surface. Input data is organized as a matrix of floats separated by commas. This macro is intendend for visualisation of matrices thus "RC" suffix (Row/Column). macro DrawWireFrame(DataFileName) is just backward compatibility wrapper
SYNOPSIS
463 DrawWireFrameRC(string filename DataFileName)INPUTS
DataFileName - valid name of file with data - see example file for details of its structure. Generally speaking first is Column axis title, Row Yaxis title, number of columns, then min and max value assigned to the first and last item in row, number of rows, then min and max value assigned to the first and last item in column, eventually numeric data in form of matrix, ie. data measured, observed or calculated over the gridSEE ALSO
DrawWireFrameYX()
SOURCE
472 /// #macro DrawWireFrameRC(DataFileName) is intendend for visualisation of matrices 473 /// interpretation of structure of input file (r=Row, c=Column): 474 /// * -----> Column ----> 475 /// | r1c1 r1c2 r1c3 r1c3 476 /// | r2c1 477 /// | r3c1... 478 /// V r4c1.. 479 /// Rows 480 /// ie. rows are treated as rows of the matrix so they are drawn 481 /// along PovRAY X axis (which is Y in REAL coords).
WireSurf.inc/DrawWireFrameXY() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Draws representation od data from input file as wireframed 3D surface. Input data is organized as a matrix of floats separated by commas. This macro is intendend for visualisation of gridded data thus "YX" suffix.
SYNOPSIS
643 DrawWireFrameXY(string filename DataFileName)INPUTS
DataFileName - valid name of file with data - see example file for details of its structure. Generally speaking first is Xaxis title, Yaxis title, number of columns, then min and max value assigned to the items in first and last X column respectively (along POVRay X axis), number of rows, then min and max value assigned to the items in first and last row respectively (along POVRay -Z axis), eventually numeric data in form of matrix, ie. data measured, observed or calculated over the real XY gridSOURCE
652 /// interpretation of structure of input file: 653 /// * -----> X ----> 654 /// | x1y1 x1y2 x1y3 x1y3 655 /// | x2y1 656 /// Y| x3y1... 657 /// V X4y1.. 658 /// ie. rows are treated as x-data so they are drawn 659 /// along REAL X axis (which is -Z in PovRAY coords) ,
WireSurf.inc/ImportDataRC() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Imports only data from input file. Input data is organized as a matrix of floats separated by commas. This macro is part of visualisation suite of matrices thus "RC" suffix (Row/Column).
SYNOPSIS
816 ImportDataRC(string filename DataFileName)INPUTS
DataFileName - valid name of file with data - see example file for details of its structure. Generally speaking first is Column axis title, Row Yaxis title, number of columns, then min and max value assigned to the first and last item in row, number of rows, then min and max value assigned to the first and last item in column, eventually numeric data in form of matrix, ie. data measured, observed or calculated over the gridSOURCE
825 /// structure of the grid is interpreted as follows: 826 /// * -----> Col ----> 827 /// R| r1c1 r1c2 r1c3 r1c4 828 /// o| r2c1 829 /// w| r3c1... 830 /// V r4c1.. 831 /// ie. rows are treated as x-data so they are drawn along REAL X axis (PovRAY '-Z')
WireSurf.inc/ImportDataXY() [ Main macros ]
[ Top ] [ WireSurf.inc ] [ Main macros ]
PURPOSE
Imports representation od data from input file. Input data is organized as a matrix of floats separated by commas. This macro is intendend for visualisation of gridded data thus "YX" suffix.
SYNOPSIS
907 ImportDataXY(string filename DataFileName)INPUTS
DataFileName - valid name of file with data - see example file for details of its structure. Generally speaking first is Xaxis title, Yaxis title, number of columns, then min and max value assigned to the items in first and last X column respectively (along POVRay X axis), number of rows, then min and max value assigned to the items in first and last row respectively (along POVRay -Z axis), eventually numeric data in form of matrix, ie. data measured, observed or calculated over the real XY gridSOURCE
916 /// structure of the grid is interpreted as follows: 917 /// * -----> X real axis ----> 918 /// | x1y1 x2y1 x3y1 x4y1 919 /// | x1y2 920 /// Y| x1y3... 921 /// V X1y4.. 922 /// ie. rows are treated as x-data so they are drawn 923 /// along REAL X axis /-Z in PovRAY coords/ ,
WireSurf.inc/AddColDescr() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Inserts into horizontal axis data block new major label
SYNOPSIS
343 AddColDescr(string Dscr)INPUTS
Dscr - label ("1", "A" or so on..)
WireSurf.inc/AddRowDescr() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Inserts into 2nd horizontal axis data block new major label
SYNOPSIS
407 AddRowDescr(string Dscr)INPUTS
Dscr - label ("1", "A" or so on..)
WireSurf.inc/DrawColDscr() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Inserts into rendering stack description of horizontal axis
SYNOPSIS
367 DrawColDscr(texturedef _Txtr, float _LettrBase, float _LettrSize, float _LettrDepth)INPUTS
_Txtr - texture definition _LettrBase - adjustment to the position of description _LettrSize - Size of characters in description text _LettrDepth - thickness of characters in description text
WireSurf.inc/DrawRowDscr() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Inserts into rendering stack description of 2nd horizontal axis
SYNOPSIS
429 DrawRowDscr(texturedef _Txtr, float _LettrBase, float _LettrSize, float _LettrDepth)INPUTS
_Txtr - texture definition _LettrBase - adjustment to the position of description _LettrSize - Size of characters in description text _LettrDepth - thickness of characters in description text
WireSurf.inc/DrawVrtDescr() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Draws automatically vertical axis description,
SYNOPSIS
295 DrawVrtDescr(uinteger _NVrt, texturedef _Texture)INPUTS
_NVrt - number of major tics _Texture - texture identifier
WireSurf.inc/InitDscrColAxe() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Initializes description data block along horizontal axis (columns)
SYNOPSIS
329 InitDscrColAxe(uinteger N)INPUTS
N - number of categories
WireSurf.inc/InitDscrRowAxe() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Initializes description data block along horizontal axis (rows)
SYNOPSIS
394 InitDscrRowAxe(uinteger N)INPUTS
N - number of categories
WireSurf.inc/SetBgPicture() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets picture for the background of coords system Will be moved to CoordsSys.inc
SYNOPSIS
164 SetBgPicture(string filename Pct)
WireSurf.inc/SetColor() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets default color for different items:
- SetColor( color vector FullColour )
- SetRGBColor( float R, float G, float B) - for RGB definition style
- SetRGBFTColor( float R, float G, float B, float F, float T) for RGBFT definition
- SetRGBFTColor_1( float R, float G, float B, float F, float T) and
- SetRGBFTColor_2( float R, float G, float B, float F, float T) two-color RGBFT items
WireSurf.inc/SetDscrAngle() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets base angle of description of axes (category labels)
SYNOPSIS
153 SetDscrAngle(float)
WireSurf.inc/SetInterior() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
declares texure for the item
SYNOPSIS
243 SetInterior( interiordef tInt )
WireSurf.inc/SetLettrBase() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets base position of letters in description of axes
SYNOPSIS
143 SetLettrBase(float ls)
WireSurf.inc/SetLettrDepth() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets size of letters in description of axes
SYNOPSIS
132 SetLettrDepth(float ls)
WireSurf.inc/SetLettrSize() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets size of letters in description of axes
SYNOPSIS
122 SetLettrSize(float ls)
WireSurf.inc/SetMaterial() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
declares material for the item
SYNOPSIS
254 SetMaterial( materialdef FullMaterial )
WireSurf.inc/SetNodeRadiiCoeff(Coeff) [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
declares radius coefficient for the wire and nodes
SYNOPSIS
265 SetNodeRadiiCoeff(float Coeff)
WireSurf.inc/SetTexture() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
declares texure for the item
SYNOPSIS
232 SetTexture( texturedef FullTexture )
WireSurf.inc/SetWireRadiiCoeff(Coeff) [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
declares radius coefficient for the wire only
SYNOPSIS
276 SetWireRadiiCoeff(float Coeff)
WireSurf.inc/TurnPhotonsDown(), TurnPhotonsUp() [ Helper macros ]
[ Top ] [ WireSurf.inc ] [ Helper macros ]
PURPOSE
Sets internal variable Photons to 'no' or 'yes' ie turns photon mechanism 'off' or 'on'
SYNOPSIS
175 TurnPhotonsUp() 176 TurnPhotonsDown()
WireSurf.inc/DeclareLevel [ Variables ]
[ Top ] [ WireSurf.inc ] [ Variables ]
PURPOSE
DeclareLevel determines what is defined:
- 0 = colour only
- 2 = also texture
- 4 = complete material
this value is valid until next "Set...()" declaration is met SOURCE */