274
23 Coordinate Systems
1
2
3
4
5
6
x
7
8
9
10 11
-15
-10
-5
0
5
10
15
y
Fig. 23.5 Visualization of imaginary hyperspherical coordinates, Eq. (23.33). For the program
see righthand side
inverse transformation. The syntax of hyper2c is [coordC, coordH] =
hyper2c(r, theta) with “r” the hyperradius, a real scalar value (optional)
with default value 1. “theta” are the hyperangles, a real n × m array. The dimension
of the system is m + 1, and n are the number of discrete data points. For imaginary
angles, the coordinates correspond to hyper-hyperbolical coordinates, see. Figure
23.5, but the inverse transformation would not work. Example:
% hyperspherical to cartesian
r = 2.123;
theta = [rand(12,1) * pi, rand(12,1) * pi, rand(12,1) * pi, ...
rand(12,1) * pi, rand(12,1) * pi, randn(12,1)];
[coordCtest, coordHtest] = hyper2c(r,theta);
% inverse transformation
xn = table2array(ccordCtest);
[coordH, coordC] = c2hyper(xn);
% test for accuracy
>> max(max(abs(table2array(coordH) - ...
table2array(coordHtest))))
ans =
1.9540e-14
Example hyper-hyperbolical coordinates:
theta = linspace(-3,3,1000);
theta = theta(:) * i;
[coordC, coordH]=hyper2c(theta);
x = cos(coordH.theta_1);
y = i * sin(coordH.theta_1);
plot(x,y), shg
23 Coordinate Systems
1
2
3
4
5
6
x
7
8
9
10 11
-15
-10
-5
0
5
10
15
y
Fig. 23.5 Visualization of imaginary hyperspherical coordinates, Eq. (23.33). For the program
see righthand side
inverse transformation. The syntax of hyper2c is [coordC, coordH] =
hyper2c(r, theta) with “r” the hyperradius, a real scalar value (optional)
with default value 1. “theta” are the hyperangles, a real n × m array. The dimension
of the system is m + 1, and n are the number of discrete data points. For imaginary
angles, the coordinates correspond to hyper-hyperbolical coordinates, see. Figure
23.5, but the inverse transformation would not work. Example:
% hyperspherical to cartesian
r = 2.123;
theta = [rand(12,1) * pi, rand(12,1) * pi, rand(12,1) * pi, ...
rand(12,1) * pi, rand(12,1) * pi, randn(12,1)];
[coordCtest, coordHtest] = hyper2c(r,theta);
% inverse transformation
xn = table2array(ccordCtest);
[coordH, coordC] = c2hyper(xn);
% test for accuracy
>> max(max(abs(table2array(coordH) - ...
table2array(coordHtest))))
ans =
1.9540e-14
Example hyper-hyperbolical coordinates:
theta = linspace(-3,3,1000);
theta = theta(:) * i;
[coordC, coordH]=hyper2c(theta);
x = cos(coordH.theta_1);
y = i * sin(coordH.theta_1);
plot(x,y), shg
