diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-09 12:54:56 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-09 12:54:56 -0400 |
commit | cb07b863464ad85cf4f18a2e97764db5c3bcc766 (patch) | |
tree | dd4d1bf664e470f91859e7be1eaa4edfd7c35e14 /doc | |
parent | eb964fe9fcf13ad1a72e40451c5d85b6765d945f (diff) | |
download | chroma-cb07b863464ad85cf4f18a2e97764db5c3bcc766.tar.gz chroma-cb07b863464ad85cf4f18a2e97764db5c3bcc766.tar.bz2 chroma-cb07b863464ad85cf4f18a2e97764db5c3bcc766.zip |
update sphinx documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/geometry.rst | 61 | ||||
-rw-r--r-- | doc/source/images/bipyramid.png | bin | 0 -> 19223 bytes | |||
-rw-r--r-- | doc/source/images/box.png | bin | 0 -> 19836 bytes | |||
-rw-r--r-- | doc/source/images/cube.png | bin | 0 -> 14692 bytes | |||
-rw-r--r-- | doc/source/images/cylinder.png | bin | 0 -> 22259 bytes | |||
-rw-r--r-- | doc/source/images/hexagonal_prism.png | bin | 0 -> 13874 bytes | |||
-rw-r--r-- | doc/source/images/sphere.png | bin | 0 -> 55150 bytes | |||
-rw-r--r-- | doc/source/images/torus.png | bin | 0 -> 87454 bytes | |||
-rw-r--r-- | doc/source/render.rst | 68 |
9 files changed, 125 insertions, 4 deletions
diff --git a/doc/source/geometry.rst b/doc/source/geometry.rst index 347e1d3..a3f7463 100644 --- a/doc/source/geometry.rst +++ b/doc/source/geometry.rst @@ -9,14 +9,67 @@ The Mesh Class .. autoclass:: Mesh :members: +The Solid Class +--------------- + +.. autoclass:: Solid + :members: + +The Material Class +------------------ + +.. autoclass:: Material + :members: + +The Geometry Class +------------------ + +.. autoclass:: Geometry + :members: + Importing from STL ------------------ -.. automodule:: chroma.stl - :members: mesh_from_stl +.. autofunction:: chroma.mesh_from_stl Mesh Modelling Tools -------------------- -.. automodule:: chroma.make - :members: linear_extrude, rotate_extrude, box, cube, cylinder, segmented_cylinder, sphere, torus +.. module:: chroma.make + +.. autofunction:: linear_extrude + +.. image:: images/hexagonal_prism.png + :height: 100px + +.. autofunction:: rotate_extrude + +.. image:: images/bipyramid.png + :height: 100px + +.. autofunction:: box + +.. image:: images/box.png + :height: 100px + +.. autofunction:: cube + +.. image:: images/cube.png + :height: 100px + +.. autofunction:: cylinder + +.. image:: images/cylinder.png + :height: 100px + +.. autofunction:: segmented_cylinder + +.. autofunction:: sphere + +.. image:: images/sphere.png + :height: 100px + +.. autofunction:: torus + +.. image:: images/torus.png + :height: 100px diff --git a/doc/source/images/bipyramid.png b/doc/source/images/bipyramid.png Binary files differnew file mode 100644 index 0000000..17f6f64 --- /dev/null +++ b/doc/source/images/bipyramid.png diff --git a/doc/source/images/box.png b/doc/source/images/box.png Binary files differnew file mode 100644 index 0000000..c9ab226 --- /dev/null +++ b/doc/source/images/box.png diff --git a/doc/source/images/cube.png b/doc/source/images/cube.png Binary files differnew file mode 100644 index 0000000..fff0c39 --- /dev/null +++ b/doc/source/images/cube.png diff --git a/doc/source/images/cylinder.png b/doc/source/images/cylinder.png Binary files differnew file mode 100644 index 0000000..7574f0f --- /dev/null +++ b/doc/source/images/cylinder.png diff --git a/doc/source/images/hexagonal_prism.png b/doc/source/images/hexagonal_prism.png Binary files differnew file mode 100644 index 0000000..04b1341 --- /dev/null +++ b/doc/source/images/hexagonal_prism.png diff --git a/doc/source/images/sphere.png b/doc/source/images/sphere.png Binary files differnew file mode 100644 index 0000000..bb1c8a5 --- /dev/null +++ b/doc/source/images/sphere.png diff --git a/doc/source/images/torus.png b/doc/source/images/torus.png Binary files differnew file mode 100644 index 0000000..79bde5b --- /dev/null +++ b/doc/source/images/torus.png diff --git a/doc/source/render.rst b/doc/source/render.rst index 297c083..23b4735 100644 --- a/doc/source/render.rst +++ b/doc/source/render.rst @@ -1,2 +1,70 @@ Rendering Tools =============== + +.. module:: chroma + +There are three different ways to render a geometry: you can explicitly create a :class:`Camera` instance, call the function :func:`view`, or use the script `chroma-cam`. + +Example: + >>> chroma.view(chroma.make.cube()) + +.. image:: images/cube.png + :height: 100px + +To control the camera refer to the following table and :ref:`camera_hotkeys`. + +.. _camera_controls: + +============== =========== =========================== +Thing You Do Modifier Thing That Happens +============== =========== =========================== +click and drag rotate camera around object +click and drag shift translate camera +click and drag control rotate camera +mouse wheel zoom +============== =========== =========================== + + +.. _camera_hotkeys: + +Camera Hotkeys +-------------- + +========= =============================== +Command Thing That Happens +========= =============================== +alt toggle fine motion +F11 toggle fullscreen +escape quit += increase the alpha depth by one +\- decrease the alpha depth by one +pagedown move down through the bounding volume hierarchy tree +pageup move up through the bounding volume hierarchy tree +3 toggle 3d mode +g toggle 3d colors between red/cyan and green/magenta +F12 take a screenshot +m make a movie +F5 [#f1]_ toggle hybrid monte carlo rendering mode +F6 [#f2]_ place a light source at the camera's current location +F7 [#f2]_ add another light source at the camera's current location +========= =============================== + +.. rubric:: Footnotes + +.. [#f1] The hybrid monte carlo rendering mode requires the geometry have surfaces with a non-zero diffuse reflection probability. + +.. [#f2] Only available in hybrid monte carlo rendering mode. + +The Camera Class +---------------- + +.. class:: Camera(geometry, size=(800,600), device_id=None) + + The :class:`Camera` class uses :mod:`pygame` to render a geometry. + :class:`Camera` objects inherit from :class:`multiprocessing.Process` so + that you can render multiple geometries in separate windows at the same + time. + + .. method:: start() + + Create a :mod:`pygame` window, intialize CUDA, and start the camera. |