Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /tests/examples/fs3d/README.md
ViewVC logotype

View of /tests/examples/fs3d/README.md

Parent Directory Parent Directory | Revision Log Revision Log

Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 10 months ago) by glk
File size: 1942 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
## fs3d-scl.diderot: function sampler, 3D scalar synthetic fields

`fs3d-scl.diderot` is based on [`fs2d-scl.diderot`](../fs2d); some
copy-and-pasting was involved.  Like that program, the value of this
is not so much as a model of what a good or typical Diderot program
looks like, but as a utility for generating datasets for other Diderot
programs to work on.  This same directory has a `fs3d-vec.diderot` for
generating vector fields, and possibly other programs; the
documentation below is for `fs3d-scl.diderot` though the other
programs will have very similar structure and usage.

This programs generates synthetic scalar 3D data on regular grids that
are located and oriented in world space.  The input arguments here
make it easy to sample the same underlying function on different
grids.  Grid orientation is specified by the angle and axis of

Assuming the directions at https://github.com/Diderot-Language/examples
this program can be compiled with:

	../../vis12/bin/diderotc --exec fs3d-scl.diderot

The `-which` option will determine which function is sampled; look for
`(0 == which)` in the code to see the start of the function
definitions, this includes 3D functions used to make datasets for

This program is unusual in that its printed output needs to be captured
in order to have a NRRD header that records the orientation of the
sampling grid, so using the program involves redirection.  To
get a self-contained parab.nrrd containing a parabola function

	./fs2d-scl -which 3 | unu save -f nrrd -o parab.nrrd
	rm out.nrrd

Note that like in [`fs2d-scl.diderot`](../fs2d), the NRRD header
generated by this program assumes:

1. This program was not compiled with `--double`
2. The program is running on a little-endian machine.

ViewVC Help
Powered by ViewVC 1.0.0