The timevarying pressure signals recorded from a photoacoustic source look different depending on the number of dimensions used in the simulation.
This difference occurs because a point source in 1D corresponds to a plane wave in 3D, and a point source in 2D corresponds to an infinite line source in 3D. This examples shows the difference between the signals recorded in each dimension.
It builds on the Simulations in One Dimension, Homogeneous Propagation Medium, and Simulations in Three Dimensions examples.
Contents
The fact that the characteristics of plane (1D), cylindrical (2D), and spherical (3D) wave propagation are different in some fundamental ways is often overlooked. This can lead to incorrect insight into the results from photoacoustic simulations. In particular, three key differences between 1D, 2D and 3D propagation are:
 Photoacoustic waves in 1D and 3D are compactly supported. This means they are zero outside some finite region (they “end”), whereas a waveform in 2D has an infinitely long tail. This can be understood by considering a 2D point source as an infinitely long line source in 3D. This means there will always be some signal arriving at the detector from some (increasingly distant) part of the line source. One implication for photoacoustics is that time reversal image reconstruction is not exact in 2D.
 There is no geometrical spreading in 1D, so wave amplitudes do not decay (unless there is absorption). In 2D, the waves undergo cylindrical spreading in which the acoustic energy is spread out over the growing wavefront. This means the acoustic energy is inversely proportional to radius and the acoustic pressure decays as 1/sqrt(radius). In 3D, the spreading is over a spherical wavefront, so the energy is spread over radius^2, and the pressure decays as 1/radius.
 In 1D, the shape of the initial pressure distribution will be retained in the shape of the propagating pulse. This is not true in 2D and 3D.
Note that 1D, 2D, and 3D are used here to refer to the Cartesian coordinate systems in which the variables are (x), (x, y), and (x, y, z). Other cases that could be described as 1D (such as sphericallysymmetric with just a radial coordinate) or 2D (such as cylindricallysymmetric with (r, theta) as the coordinates) are not considered.
Running the simulation in 1D
First, the common settings for all three examples are set, including the grid size, properties of the medium, size of the initial pressure distribution, sourcereceiver separation, time step, and length of time to run the simulation.
Nx = 64; % number of grid points in the x (row) direction
x = 1e3; % size of the domain in the x direction [m]
dx = x/Nx; % grid point spacing in the x direction [m]
medium.sound_speed = 1500; % [m/s]
source_radius = 2; % [grid points]
source_sensor_distance = 10; % [grid points]
dt = 2e9; % [s]
t_end = 300e9; % [s]
input_args = {'DataCast', 'single'};
The final line above sets MATLAB to run the simulations in single precision arithmetic, which is faster than double precision and more than sufficient for most simulations. The next set of commands create the kWave grid, the array of time points, the initial pressure distribution (source), and the sensor mask used to record the wavefield.
kgrid = kWaveGrid(Nx, dx);
kgrid.setTime(round(t_end / dt) + 1, dt);
source.p0 = zeros(Nx, 1);
source.p0(Nx/2 – source_radius:Nx/2 + source_radius) = 1;
sensor.mask = zeros(Nx, 1);
sensor.mask(Nx/2 + source_sensor_distance) = 1;
Finally, the 1D example is run.
sensor_data_1D = kspaceFirstOrder1D(kgrid, medium, source, sensor, input_args{:});
Running the simulation in 2D
Running the simulation in 2D is very similar, except the initial pressure distribution is defined as a disc (filled circle) using makeDisc, and the sensor mask is defined as a single pixel in twodimensions.
kgrid = kWaveGrid(Nx, dx, Nx, dx);
source.p0 = makeDisc(Nx, Nx, Nx/2, Nx/2, source_radius);
sensor.mask = zeros(Nx, Nx);
sensor.mask(Nx/2 – source_sensor_distance, Nx/2) = 1;
sensor_data_2D = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});
Running the simulation in 3D
The 3D example follows the same pattern, except now the source is defined as a ball (filled sphere) using makeBall.
kgrid = kWaveGrid(Nx, dx, Nx, dx, Nx, dx);
source.p0 = makeBall(Nx, Nx, Nx, Nx/2, Nx/2, Nx/2, source_radius);
sensor.mask = zeros(Nx, Nx, Nx);
sensor.mask(Nx/2 – source_sensor_distance, Nx/2, Nx/2) = 1;
sensor_data_3D = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});
Plotting the waveforms
The three recorded time series for 1D, 2D and 3D are shown below (the magnitudes have been normalised). The fact that the 1D and 3D waveforms are compactly supported can be clearly seen.
binning: Binning in 1D, 2D or 3D in aws: Adaptive Weights Smoothing
Description Usage Arguments Value Note Author(s) See Also
The function performs a binning in 1D, 2D or 3D.
binning(x, y, nbins, xrange = NULL) 
x  design matrix, dimension n x d, d %in% 1:3. 
y  either a response vector of length n or NULL 
nbins 
vector of length d containing number of bins for each dimension, may be set to NULL 
xrange 
range for endpoints of bins for each dimension, either matrix of dimension 2 x d or NULL. xrange is increased if the cube defined does not contain all design points. 
A list with components
x  matrix of coordinates of nonempty bin centers 
x.freq  number of observations in nonempty bins 
midpoints.x1  Bin centers in dimension 1 
midpoints.x2  if d>1 Bin centers in dimension 2 
midpoints.x3  if d>2 Bin centers in dimension 3 
breaks.x1  Break points dimension 1 
breaks.x2  if d>1 Break points dimension 2 
breaks.x3  if d>2 Break points dimension 3 
table.freq  number of observations per bin 
means  if !is.null(y) mean of y in nonempty bins 
devs  if !is.null(y) standard deviations of y in nonempty bins 
This function has been adapted from the code of function binning in package sm.
Joerg Polzehl, [email protected]
See Also as aws.irreg
aws documentation built on April 19, 2020, 3:57 p.m.
Distance Formula  Brilliant Math & Science Wiki
Suppose A=x1A=x_1A=x1 and B=x2B=x_2B=x2 are two points lying on the real number line. Then the distance between AAA and BBB is
d(A,B)=∣x1−x2∣. d(A,B) = lvert x_1 – x_2
vert. d(A,B)=∣x1−x2∣.
In the plane, we can consider the xxxaxis as a onedimensional number line, so we can compute the distance between any two points lying on the xxxaxis as the absolute value of the difference of their xxxcoordinates. Similarly, the distance between any two points lying on the yyyaxis is the absolute value of the difference of their yyycoordinates.
Now, consider the xyxyxyplane, and suppose P1=(x1,y1)P_1 = (x_1, y_1)P1=(x1,y1) and P2=(x2,y2)P_2 = (x_2, y_2)P2=(x2,y2) are two points in it . Then the distance between P1P_1P1 and P2P_2P2 is
d(P1,P2)=(x1−x2)2+(y1−y2)2. d(P_1, P_2) = sqrt{(x_1x_2)^2+(y_1y_2)^2}.d(P1,P2)=(x1−x2)2+(y1−y2)2.
Since ∣x1−x2∣lvert x_1 – x_2
vert∣x1−x2∣ is the distance between the xxxcoordinates of the two points and ∣y1−y2∣lvert y_1 – y_2
vert∣y1−y2∣ is the distance between the yyycoordinates of the two points, the distance formula in the xyxyxyplane can be thought of as the length of the hypotenuse of the right triangle with vertices P1=(x1,y1)P_1=(x_1,y_1)P1=(x1,y1), P2=(x2,y2),P_2 = (x_2,y_2),P2=(x2,y2), and P=(x2,y1)P = (x_2,y_1) P=(x2,y1). Then the distance formula is simply a statement of the Pythagorean theorem.
In both 1D and 2D, the distance function satisfies the following properties:
 d(P,Q)≥0d(P,Q) geq 0d(P,Q)≥0 for all points P,Q P,QP,Q with equality if and only if P=QP = QP=Q
 d(P,Q)=d(Q,P)d(P, Q) = d(Q, P) d(P,Q)=d(Q,P) for all points P,QP,QP,Q
 d(P,Q)≤d(P,R)+d(R,Q) d(P,Q) leq d(P, R) + d(R, Q) d(P,Q)≤d(P,R)+d(R,Q) for all points P,Q,R P, Q, RP,Q,R.
Note that both of these points lie on the yyyaxis and therefore the distance between the points is the absolute value of the difference of the yyycoordinates, which is ∣5−13∣=∣−8∣=8. □ lvert 5 – 13
vert = lvert 8
vert =8 . _square∣5−13∣=∣−8∣=8. □
To generalize the above problem, if two points P1=(x1,y1)P_1 = (x_1, y_1) P1=(x1,y1) and P2=(x2,y2)P_2 = (x_2, y_2) P2=(x2,y2) have the same xxxcoordinate, i.e. x1=x2x_1=x_2x1=x2, then the distance between the two points is d(P1,P2)=∣y1−y2∣ d(P_1, P_2) = y_1y_2d(P1,P2)=∣y1−y2∣ and the line segment P1P2‾overline{P_1P_2} P1P2 is a vertical line segment.
Similarly, if P1P_1P1 and P2P_2P2 have the same yyycoordinate (y1=y2y_1=y_2y1=y2), then d(P1,P2)=∣x1−x2∣d(P_1, P_2) = x_1x_2d(P1,P2)=∣x1−x2∣ and the line segment P1P2‾overline{P_1P_2} P1P2 is a horizontal line segment.
A=(6,−3),B=(6,7),C=(2,7), and D=(2,−3). A = (6, 3), B=(6, 7), C=(2, 7), ext{ and } D=(2, 3).A=(6,−3),B=(6,7),C=(2,7), and D=(2,−3).
Points AAA and BBB have the same xxxcoordinate, implying d(A,B)=∣7−(−3)∣=10d(A,B) = lvert 7 – (3)
vert = 10d(A,B)=∣7−(−3)∣=10.
Points BBB and CCC have the same yyycoordinate, implying d(B,C)=∣6−2∣=4d(B,C) = lvert 6 – 2
vert = 4d(B,C)=∣6−2∣=4.
We check that points CCC and DDD have the same xxxcoordinate and DDD and AAA have the same yyycoordinate, implying the points are indeed vertices of a rectangle.
The area of the rectangle is then
[ABCD]=AB⋅BC=4⋅10=40. □ [ABCD]=AB cdot BC = 4 cdot 10 = 40. _square [ABCD]=AB⋅BC=4⋅10=40. □
Dimension
This article is about the dimension of a space. For the dimension of an object, see size. For the dimension of a quantity, see Dimensional analysis. For other uses, see Dimension (disambiguation).
Maximum number of independent directions within a mathematical space
From left to right: the square, the cube and the tesseract. The twodimensional (2D) square is bounded by onedimensional (1D) lines; the threedimensional (3D) cube by twodimensional areas; and the fourdimensional (4D) tesseract by threedimensional volumes. For display on a twodimensional surface such as a screen, the 3D cube and 4D tesseract require projection.
The first four spatial dimensions, represented in a twodimensional picture.
 Two points can be connected to create a line segment.
 Two parallel line segments can be connected to form a square.
 Two parallel squares can be connected to form a cube.
 Two parallel cubes can be connected to form a tesseract.
Projecting a sphere to a plane.  


Branches


Dimension


Zerodimensional


Onedimensional


Twodimensional
Triangle
Parallelogram
Quadrilateral
Circle


Threedimensional


Four / otherdimensional


by name


by period
BCE
1–1400s
1400s–1700s
1700s–1900s
Present day



In physics and mathematics, the dimension of a mathematical space (or object) is informally defined as the minimum number of coordinates needed to specify any point within it.[1][2] Thus a line has a dimension of one (1D) because only one coordinate is needed to specify a point on it – for example, the point at 5 on a number line. A surface such as a plane or the surface of a cylinder or sphere has a dimension of two (2D) because two coordinates are needed to specify a point on it – for example, both a latitude and longitude are required to locate a point on the surface of a sphere. The inside of a cube, a cylinder or a sphere is threedimensional (3D) because three coordinates are needed to locate a point within these spaces.
In classical mechanics, space and time are different categories and refer to absolute space and time. That conception of the world is a fourdimensional space but not the one that was found necessary to describe electromagnetism.
The four dimensions (4D) of spacetime consist of events that are not absolutely defined spatially and temporally, but rather are known relative to the motion of an observer.
Minkowski space first approximates the universe without gravity; the pseudoRiemannian manifolds of general relativity describe spacetime with matter and gravity.
10 dimensions are used to describe superstring theory (6D hyperspace + 4D), 11 dimensions can describe supergravity and Mtheory (7D hyperspace + 4D), and the statespace of quantum mechanics is an infinitedimensional function space.
The concept of dimension is not restricted to physical objects. Highdimensional spaces frequently occur in mathematics and the sciences. They may be parameter spaces or configuration spaces such as in Lagrangian or Hamiltonian mechanics; these are abstract spaces, independent of the physical space we live in.
In mathematics
In mathematics, the dimension of an object is, roughly speaking, the number of degrees of freedom of a point that moves on this object.
In other words, the dimension is the number of independent parameters or coordinates that are needed for defining the position of a point that is constrained to be on the object.
For example, the dimension of a point is zero; the dimension of a line is one, as a point can move on a line in only one direction (or its opposite); the dimension of a plane is two, etc.
The dimension is an intrinsic property of an object, in the sense that it is independent of the dimension of the space in which the object is or can be embedded.
For example, a curve, such as a circle is of dimension one, because the position of a point on a curve is determined by its signed distance along the curve to a fixed point on the curve.
This is independent from the fact that a curve cannot be embedded in a Euclidean space of dimension lower than two, unless it is a line.
The dimension of Euclidean nspace En is n.
When trying to generalize to other types of spaces, one is faced with the question “what makes En ndimensional?” One answer is that to cover a fixed ball in En by small balls of radius ε, one needs on the order of ε−n such small balls.
This observation leads to the definition of the Minkowski dimension and its more sophisticated variant, the Hausdorff dimension, but there are also other answers to that question. For example, the boundary of a ball in En
Leave a Reply