summaryrefslogtreecommitdiff
path: root/geometry.py
AgeCommit message (Collapse)Author
2011-09-08Geometry.build() waits until a certain number of triangles are grouped ↵Anthony LaTorre
together before creating leaf nodes in the bounding volume hierarchy.
2011-09-06geometry on the GPU is now a struct created in the GPUGeometry class. coding ↵Anthony LaTorre
style for cuda code is now compliant with python PEP 7 -- Style Guide for C Code.
2011-09-03update documenation in geometry.py.Anthony LaTorre
2011-09-02update event structure. break gpu.GPU class into separate smaller ↵Anthony LaTorre
independent classes.
2011-08-17Add flag to Simulation() and Geometry.build() to ignore the BVH cache.Stan Seibert
2011-08-17import chroma modules from subpackages with import chroma.module_nameAnthony LaTorre
2011-08-16update geometry.py() documentationAnthony LaTorre
2011-08-12speedup Mesh.remove_duplicate_vertices()Anthony LaTorre
2011-08-11merge headsAnthony LaTorre
2011-08-11add consume() to itertoolset. checksum the number of bits shifted in each ↵Anthony LaTorre
iteration of the bounding volume hierarchy construction. only cache the bounding volume hierarchy information.
2011-08-10Using gzip compression level 1, the BVH at 10 bit is 7x smaller. AddsStan Seibert
10 seconds to cache load time if the BVH file is in the memory cache, otherwise this is faster if the BVH file must be read fresh from disk.
2011-08-10add the ability to cache a geometry along with its bounding volume ↵Anthony LaTorre
hierarchy. cached files are stored in $HOME/.chroma. fixed the timeit() decorator so that the decorated function is still able to pass back a return value.
2011-08-09switch to indexing child nodes by start and stop indices instead of start ↵Anthony LaTorre
and length; this reduces a bit of arithmetic when traversing the bounding volume hierarchy and makes the code in Geometry.build() more concise. add an untested cuda kernel to interleave the bits in three uint64 arrays.
2011-08-08speedup Geometry.build()Anthony LaTorre
2011-08-08add a simple event viewer. view events by running ./camera.py ↵Anthony LaTorre
<detector_name> -i <name_of_io_file>.
2011-08-05merge headsAnthony LaTorre
2011-08-05update bounding box construction for nodes to determine each bound in a ↵Anthony LaTorre
single call by calling np.min() and np.max() along an axis
2011-08-05Remove the unused load() function from Geometry class.Stan Seibert
2011-08-05speedup bounding volume construction of leaf nodes by taking the min and max ↵Anthony LaTorre
of ungrouped instead of grouped vertices from a mesh
2011-08-03GEANT4-based photon vertex generator.Stan Seibert
Propagates a particle through a huge volume of some material and harvest the photon vertices that are created for propagation with Chroma. Relies on a patched version of g4py, plus a local boost.python module that is built at import time if needed. (Does not detect changes to rebuild, however.) Chroma materials can now have a density set, as well as an elemental composition (by weight) that is used by this generator.
2011-07-30when throwing photons from the light source out onto the scene, photons are ↵Anthony LaTorre
now thrown randomly across each triangle instead of only at the center of each triangle. all of the rendering kernels have been rewritten so that they operate additively; for example, you may now throw photons from the light source onto the scene, render from the camera to the scene, then throw more photons and render again.
2011-07-26added a camera class which is able to render using the simple ray tracer or ↵Anthony LaTorre
the hybrid monte carlo ray tracer in a separate thread. the camera object is initialized by passing a pycuda.driver.Context object and a threading.Lock object; you can then run kernels and copy arrays to and from the device in the same context as that used by the camera by acquiring the lock, calling context.push(), executing the kernel and/or copying arrays, calling context.pop(), and then releasing the lock. fixed mistakes in both build_rgb_lookup() and render() where I had accidently switched the green and blue photons. updated the lbne geometry with the latest specifications. added profiles for the sno pmt and concentrator.
2011-07-25moved triangle colors to a separate global device array so that the ray ↵Anthony LaTorre
tracer and photon simulation can be run in the same context. added the ability to add alpha channel to triangle color so that triangles can be made transparent. added __noinline__ modifier to certain device functions to speed up kernel compilation.
2011-07-20pulled a lot of the photon propagation code out of src/kernel.cu into ↵Anthony LaTorre
src/photon.h so that photon propagation by propagate() in kernel.cu and the hybrid monte carlo ray tracing use the same code. instead of a single state, photons now carry the history of the processes they've undergone. this history is stored as a bitmask; see src/photon.h. start_node and first_node of the mesh are now stored as global variables in mesh.h instead of being passed to kernel functions.
2011-07-19removed STL pmt models; pmt models are now built by calling rotate_extrude() ↵Anthony LaTorre
on a profile of the PMT model (see build_pmt() in solids/pmts.py). triangle intersection now allows one of the two coefficients multiplying the vectors which span the triangle to float slightly negative (up to -EPSILON; EPSILON is defined in src/intersect.h) in order to eliminate rays passing through the line between two triangles. cleaned up a lot of unused code. pulled duplicate code in view() and render() into functions in view.py. in order to allow view.py and render.py to search pre-defined geometries, solids, meshes, etc. without requiring them to be pre-built, pre-defined geometries, solids, meshes, etc. should be returned by a function tagged by the decorator @buildable(identifier) defined in view.py, where identifier is a string used to identify the object as an argument to either view.py or render.py. optical materials and surfaces are now defined in optics.py. added an image directory to save cool screenshots.
2011-07-10added a hybrid monte carlo ray tracing rendering algorithmAnthony LaTorre
2011-06-24argument '-j' to threadtest.py now specifies a list of device ids to be ↵Anthony LaTorre
used. GPUThread objects now shallow copy the geometry so that threads are not writing to the same memory when the geometry is loaded onto the gpu. the model number for the 12" Hamamatsu PMT is R11708, not r7081 (which is the model for the 10" PMT); all references to the 12" PMT were changed accordingly. only allocate space for 20 materials and 20 surfaces on the gpu instead of 100 to save some space. started to modify track.py to build its own photons and module since the GPUThread object only copies photon hit times back from the gpu (not track information), but I am waiting to find out if pycuda GPUArrays can be used with vector types.
2011-06-24speedup mesh intersection by skipping directly to the child node of nodes ↵Anthony LaTorre
with only one child.
2011-06-22Switch from float4 to float3 for vertices.Stan Seibert
2011-06-21speedup geometry.build() by using more iterators and keeping a list of ↵Anthony LaTorre
unique materials and surfaces in each solid.
2011-06-21Merge speedup of build()Stan Seibert
2011-06-21added rotate_extrude() and a number of functions to produce meshes of useful ↵Anthony LaTorre
solid shapes. tried to speed up geometry.build() by replacing some for loops with np.fromiter() and imap().
2011-06-21Switch vertex list on GPU from a texture to a standard device array.Stan Seibert
This avoids the texture size limitation.
2011-06-20pack material and surface indices into the fourth byte of the triangle array ↵Anthony LaTorre
on the GPU. you can now take a screenshot of an image rendered with view.py() by pressing the f12 key.
2011-06-18moved class definitions for Solid, Mesh, Material, and Surface into ↵Anthony LaTorre
geometry.py and moved instances of these classes into separate folders. the Solid object no longer contains a rotation, displacement, or id variable; instead, they are passed to a geometry object when calling add_solid().
2011-06-17visually tested optics code. added models of the inner and outer meshes for ↵Anthony LaTorre
the 12" hamamatsu and sno pmts. ratdb.py is able to parse ratdb files. chromaticity.py provides a function to map wavelength -> rgb color. lbne detector model now includes an outer black cylinder and pmts with a glass layer and photocathode/reflective surfaces.
2011-06-12added some fun models; added some untested code to implement absorption, ↵Anthony LaTorre
scattering, reflection, and refraction
2011-06-07Switch triangle texture to device array, use int32 and float32Stan Seibert
datatypes everywhere, and build final mesh without concatenation of lists. This allows for very large detectors, like full size LBNE.
2011-06-03load material/surface index lookup arrays to the gpu and bind them to ↵Anthony LaTorre
textures. also, forgot to include the gpu code for material/surface structures
2011-06-03load materials/surfaces onto the gpuAnthony LaTorre
2011-06-02oops; corrected material/surface code packing into fourth byte of triangle ↵Anthony LaTorre
data in Geometry.build()
2011-06-02material/surface codes or color are packed into the fourth byte of the ↵Anthony LaTorre
triangle data texture depending on the color keyword passed to Geometry.build()
2011-06-02triangle mesh is now stored everywhere as a split list of vertices and trianglesAnthony LaTorre
2011-06-01first step towards moving to a new mesh/solid/geometry structureAnthony LaTorre
2011-05-20faster bounding volume hierarchy constructionAnthony LaTorre
2011-05-18added test likelihoodAnthony LaTorre
2011-05-18added some more documentation and a more accurate miniature version of lbneAnthony LaTorre
2011-05-17added documentationAnthony LaTorre
2011-05-16typoAnthony LaTorre
2011-05-16interleave the zvalue bits all at once; big speed improvement in building ↵Anthony LaTorre
the bounding volume hierarchy