Package org.opensourcephysics.display2d
Class TestData
java.lang.Object
org.opensourcephysics.display2d.TestData
Title: TestData
Description: Static methods to generate test data for various programs.
Copyright: Copyright (c) 2005 Gould, Christian, and Tobochnik
- Version:
- 1.0
- Author:
- Wolfgang Christian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double[][][]
circulatingVectorField
(int nx, int ny) static double
dipole
(double x, double y) Dipole distribution with poles at +1 and -1 on the x axis.static double[][][]
dipoleScalarField
(GridPointData pointdata) Generate a dipole scalar field.static double[]
dipoleVector
(double x, double y) Dipole field with poles at +1 and -1 on the x axis.static double[][][]
dipoleVectorField
(int nx, int ny, double xmin, double xmax, double ymin, double ymax) static double
gaussian
(double x, double y, double sigma) A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1.static double[][][]
gaussianScalarField
(GridPointData pointdata) Generate a gaussian scalar field.static void
randomScalarField
(GridPointData pointdata) Generate a random scalar field.static double
saddle
(double x, double y) Saddle function centered at x=0 and y=0.
-
Constructor Details
-
TestData
public TestData()
-
-
Method Details
-
dipole
public static double dipole(double x, double y) Dipole distribution with poles at +1 and -1 on the x axis. -
gaussian
public static double gaussian(double x, double y, double sigma) A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1. -
saddle
public static double saddle(double x, double y) Saddle function centered at x=0 and y=0. -
dipoleScalarField
Generate a dipole scalar field. -
gaussianScalarField
Generate a gaussian scalar field. -
randomScalarField
Generate a random scalar field. -
dipoleVector
public static double[] dipoleVector(double x, double y) Dipole field with poles at +1 and -1 on the x axis. Field strength is proportional to 1/r. -
circulatingVectorField
public static double[][][] circulatingVectorField(int nx, int ny) -
dipoleVectorField
public static double[][][] dipoleVectorField(int nx, int ny, double xmin, double xmax, double ymin, double ymax)
-