Does setting focal length allow divergent beams from ring source? #223
Replies: 2 comments 1 reply
-
@RecurvedBow, the focal point of an area source (which ring source is one) is located on the axis perpendicular to the area and passing by the center of the source. The signed focal length is basically the distance from the intersection point of the axis to the source aperture, positive means converting beam, negative means diverging. however, for disk/ring/Gaussian sources, the axis passes by the center of the circle determined by cfg.srcpos, even in the case of ring it can be asymmetrical. https://github.com/fangq/mcx/blob/v2024.2/src/mcx_core.cu#L1361-L1385 |
Beta Was this translation helpful? Give feedback.
-
@RecurvedBow, if you set the focal length parameter to nan, every point on the source launches photons isotropically in space (like an isotropic point source), this will give you a highly divergent source, although perhaps too divergent if you set the focal length to -inf, the launch angular profile follows the Lambertian (cosine) distribution. you can adjust the distance to surface to control the spreading. https://github.com/fangq/mcx/blob/v2024.2/mcxlab/mcxlab.m#L76-L79 but if you want to create a finite angle spreading profile like you drew, you will need to use the customized launchangle control like I showed in this example script |
Beta Was this translation helpful? Give feedback.
-
Hello, I have the following problem: I defined a ring source with an inner radius r_i and an outer radius r_o. Based on #182 (comment), I want to set a focal length f from an angle alpha (in radians) so that the ring source generates divergent beams with an angle a/2 on each side, so something like this:
Therefore, I set the focal length to be: f = -(r_o - r_i) / tan(alpha / 2) and set cfg.srcdir(4) = f. However, resulting from this, I rather seem to get something like this instead:
Based on the results:
Thanks for the help in advance.
Beta Was this translation helpful? Give feedback.
All reactions