P(r) function calculator
This Javascript calculates the distance-distribution function of models consisting of up to 20 spheres with different x/y/z coordinates and optionally different radii and different electron densities using the Debye-formula in real space. Enter the number of spheres, their coordinates x(i), y(i), z(i), their radii r(i) and their electron-densities c(i). The spheres can also overlap (totally or partially) where the resulting electron density of the overlapping region is the sum of the overlapping electron densities. For N points the p(r) function from r = 0 to rz with a scaling factor f (optionally also the gamma (r)-function) will be calculated. The values are listed in r vs p(r) or vs gamma(r) in arbitrary units and can be copied and pasted from the window into any text-file for further processing and graphical displaying.

Input I(q)/p(r) action
 qz n f rz n f x(1) y(1) z(1) r(1) c(1) x(2) y(2) z(2) r(2) c(2) x(3) y(3) z(3) r(3) c(3) x(4) y(4) z(4) r(4) c(4) x(5) y(5) z(5) r(5) c(5) x(6) y(6) z(6) r(6) c(6) x(7) y(7) z(7) r(7) c(7) x(8) y(8) z(8) r(8) c(8) x(9) y(9) z(9) r(9) c(9) x(10) y(10) z(10) r(10) c(10) x(11) y(11) z(11) r(11) c(11) x(12) y(12) z(12) r(12) c(12) x(13) y(13) z(13) r(13) c(13) x(14) y(14) z(14) r(14) c(14) x(15) y(15) z(15) r(15) c(15) x(16) y(16) z(16) r(16) c(16) x(17) y(17) z(17) r(17) c(17) x(18) y(18) z(18) r(18) c(18) x(19) y(19) z(19) r(19) c(19) x(20) y(20) z(20) r(20) c(20)

 spheres 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 I(q) log I(q) p(r) g(r) Rg

### I(q)/p(r)-plot

Author: M.Kriechbaum, TU-Graz (2020), e-mail: manfred.kriechbaum@tugraz.at