diff options
| author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-03 14:33:39 -0400 |
|---|---|---|
| committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-03 14:33:39 -0400 |
| commit | 4e1047698bad5a600dd6a2aaa825667fc3617b07 (patch) | |
| tree | 0fe658ce1f3fd2ef272997d800757056cfd18291 /solids/pmts.py | |
| parent | 4bf95f452e3275c12026b16b51dc646846598f19 (diff) | |
| parent | 91bf7a2e2371a321b3bd402810cfe3b2774e2777 (diff) | |
| download | chroma-4e1047698bad5a600dd6a2aaa825667fc3617b07.tar.gz chroma-4e1047698bad5a600dd6a2aaa825667fc3617b07.tar.bz2 chroma-4e1047698bad5a600dd6a2aaa825667fc3617b07.zip | |
merge heads
Diffstat (limited to 'solids/pmts.py')
| -rw-r--r-- | solids/pmts.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/solids/pmts.py b/solids/pmts.py index 6b10522..377024d 100644 --- a/solids/pmts.py +++ b/solids/pmts.py @@ -64,3 +64,14 @@ def build_pmt(filename, glass_thickness, outer_material=water, theta=np.pi/8): pmt.theta = theta return pmt + +def build_light_collector_from_file(filename, outer_material, theta=np.pi/24): + profile = read_csv(filename) + + # Convert mm to m + profile /= 1000.0 + + mesh = rotate_extrude(profile[:,0], profile[:,1], theta) + solid = Solid(mesh, outer_material, outer_material, color=0xFF0000, + surface=shiny_surface) + return solid |
