public class SphericalPoints
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double[][] |
icosahedron
These points are the vertices of an icosahedron.
|
static java.lang.String |
pointSetDirectory |
Constructor and Description |
---|
SphericalPoints() |
Modifier and Type | Method and Description |
---|---|
static double[][] |
getElecPointSet(int n)
Reads in a returns the electrostatic pairs point set with the specified
number of pairs.
|
static double[][] |
getIcosahedralPointSet(int density,
int seedOffset)
Returns a list of points on the sphere which is the vertices of
a number of icosahedra each having undergone a separate random
rotation.
|
static double[] |
getRandomPoint(java.util.Random r)
Get a single random point on the unit sphere, drawn from a uniform
distribution over its surface.
|
static double[] |
getSphPolars(double[] xyz)
Converts an xyz vector to spherical polar coordinates: r, theta, phi.
|
static double[][] |
getZPhiXs(int sampRes)
Returns an array of unit vectors obtained by sampling z and phi
evenly at the resolution specified.
|
static double[][] |
readFromFile(java.lang.String filename)
Loads a spherical point set from a file converted by PointSetReformat
from the format output by the ElecPairsOnSphere program.
|
static double[][] |
rotatePointSet(double[][] pointSet,
RealMatrix rot)
Rotates a list of points.
|
public static java.lang.String pointSetDirectory
public static final double[][] icosahedron
public static double[] getRandomPoint(java.util.Random r)
r
- A random number generator.public static double[][] getElecPointSet(int n)
n
- The number of pairs.public static double[][] getIcosahedralPointSet(int density, int seedOffset)
density
- The number of randomly rotated icosahedraseedOffset
- An offset of the seeds used in the random number generator
used to get the random rotations.public static double[][] rotatePointSet(double[][] pointSet, RealMatrix rot)
pointSet
- This list of pointsrot
- The rotation matrixpublic static double[][] readFromFile(java.lang.String filename)
filename
- The name of the file to read the directions in from.public static double[] getSphPolars(double[] xyz)
xyz
- Cartesian coordinates {x, y, z}.public static double[][] getZPhiXs(int sampRes)
sampRes
- The sampling resolution