Write examples directly in light cone basis

This commit is contained in:
Aaron Fenyes 2024-07-17 15:37:14 -07:00
parent bde42ebac0
commit 2038103d80
5 changed files with 33 additions and 31 deletions

View file

@ -29,7 +29,7 @@ function rand_on_shell(rng::AbstractRNG, shell::T) where T <: Number
space_part = rand_on_sphere(rng, T, 4)
rapidity = randn(rng, T)
sig = sign(shell)
[sconh(rapidity, sig)*space_part; sconh(rapidity, -sig)]
nullmix * [sconh(rapidity, sig)*space_part; sconh(rapidity, -sig)]
end
rand_on_shell(rng::AbstractRNG, shells::Array{T}) where T <: Number =
@ -39,19 +39,16 @@ rand_on_shell(shells::Array{<:Number}) = rand_on_shell(Random.default_rng(), she
# === elements ===
## [temp] in light cone coordinates
point(pos) = [pos; 1; dot(pos, pos)]
## [temp] in standard coordinates
plane(normal, offset) = [normal; offset; offset]
plane(normal, offset) = [normal; 0; offset]
## [temp] in standard coordinates
function sphere(center, radius)
dist_sq = dot(center, center)
[
center / radius;
0.5 * ((dist_sq - 1) / radius - radius);
0.5 * ((dist_sq + 1) / radius - radius)
-0.5 / radius;
0.5 * (dist_sq / radius - radius)
]
end