-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sampleplotting #109
Sampleplotting #109
Conversation
plotobject = CylindricalPoint.(sample(hp, sampling_vector)) | ||
elseif coord_sys == :cartesian | ||
sampling_vector = T.([width(grid.x.interval)/points, width(grid.y.interval)/points, width(grid.z.interval)/points]) | ||
plotobject = CartesianPoint{T}.(sample(hp, sampling_vector)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CartesianPoint{T}
is not needed.
Updates: Instead of detector being passed a world_size is passed. Instead of the contact being passed, an array of negative geometries is being passed. |
Color choosing is available via keyword palette. Examples: |
This looks very good! And I think it is ready. Great job |
Added a scatter plot method for plotting detectors
This method is based on the sample function of each primitive
It supports negative geometries
Relatively fast for examples. However, will take too long if contacts are too thick in comparison to the world.
Scatter plotting code (
SSD_style = :samplesurface
) is written in the plot recipe of each primitivePlot recipes now pass the detector and the contact to each other so that sampling can be done with respect to world size and negative geometries can be removed.
plot(simulation.detector, camera = (20,30))
OR
plot(simulation.detector, camera = (20,30), SSD_style = :wireframe)
Note that there is a hexagonal negative geometry not shown by :wireframe. This can now be shown by :samplesurface
plot(simulation.detector, camera = (20,30), SSD_style = :samplesurface)
OR
plot(simulation.detector, camera = (20,30), SSD_style = :samplesurface, alpha_factor = 1)
alpha_factor
can be any number >= 0. At some point the opacity will saturate. Each positive geometry has a different calculatedalpha
plot(simulation.detector, camera = (20,30), SSD_style = :samplesurface, alpha_factor = 0.3
)
More examples with default alpha_factor follow:
plot(simulation.detector, camera = (20,30), SSD_style = :samplesurface)