Add egs_circle_perpendicular shape #592
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new circle shape where the angle of the surface of the circle depends on the position of the source particle directed toward it.
This shape is specified via
and delivers points uniformly distributed within a circle. The surface of this circle is always perpendicular to a ray based on the source particle position, when this shape is used as the target in a source that calls the
getPointSourceDirection()
function. For example, in a collimated source when a source shape and target shape are defined, the special properties of this circle only apply when it is used as the target shape. Otherwise, it behaves like an egs_circle.For each source particle, when
getPointSourceDirection()
is called, the circle shape is rotated so that the circle surface is perpendicular to the vector between the source location, and the origin of the circle. In effect this means that the source particles see a sphere instead of a circle, except that for a given particle, the possible target locations are on the surface of a circle rather than within a sphere.Thanks to Nathan Murtha for both requesting and helping to debug this feature!