Engine prototype #13

Merged
glen merged 133 commits from engine-proto into main 2024-10-21 03:18:48 +00:00
Showing only changes of commit 828498b3de - Show all commits

View File

@ -33,6 +33,19 @@ rand_on_shell(rng::AbstractRNG, shells::Array{T}) where T <: Number =
rand_on_shell(shells::Array{<:Number}) = rand_on_shell(Random.default_rng(), shells) rand_on_shell(shells::Array{<:Number}) = rand_on_shell(Random.default_rng(), shells)
# === elements ===
plane(normal, offset) = [normal; offset; offset]
function sphere(center, radius)
dist_sq = dot(center, center)
return [
center / radius;
0.5 * ((dist_sq - 1) / radius - radius);
0.5 * ((dist_sq + 1) / radius - radius)
]
end
# === Gram matrix realization === # === Gram matrix realization ===
# the Lorentz form # the Lorentz form