JuliaWaveScattering / MultipleScattering.jl

A Julia library for simulating, processing, and plotting multiple scattering of waves.
Other
45 stars 12 forks source link

plot fields inside particles #6

Closed arturgower closed 6 years ago

arturgower commented 6 years ago

The package already calculates the field inside the particles. So we should plot this field! Only graphical issue is that if the scatterers are impenetrable, then the fields inside will return 0 , which could make visualisation tricky.

I suggest we draw a grey outline around the particles, so that we can continue to see them.

Adding this feature will allow to simulate waveguides!

jondea commented 6 years ago

Zero shouldn't be a problem at all, try just removing the fill and see what happens. If it is zero then it should just be white inside

arturgower commented 6 years ago

I made the fillalpha inversely proportional to soundspeed*density of the particle. That is, the stronger the scattering, the more opaque the particle. Looks great!

jondea commented 6 years ago

Does that obscure the field inside the particle?

arturgower commented 6 years ago

Not really, as the field turns white inside the particles when soundspeed*density becomes very low. Though I also think we can just remove this fill if we find that it does get in the way.

jondea commented 6 years ago

Are you saying that the field inside the particle is usually negligible when the grey is significant? Wouldn't it be less confusing just to have the outline of the particle and just show field?

arturgower commented 6 years ago

Yeah sure, the fill might confuse. Feel free to remove it =]