diff --git a/engine-proto/ConstructionViewer.jl b/engine-proto/ConstructionViewer.jl index 8cfa632..c9b0b7a 100644 --- a/engine-proto/ConstructionViewer.jl +++ b/engine-proto/ConstructionViewer.jl @@ -213,8 +213,8 @@ elements = begin 1 1 -1 -1 0 1 -1 1 -1 0 1 -1 -1 1 0 - -0.5 -0.5 -0.5 -0.5 -a-1 - 0.5 0.5 0.5 0.5 -a+1 + 0.5 0.5 0.5 0.5 1+a + 0.5 0.5 0.5 0.5 1-a ] end diff --git a/engine-proto/gram-test/Engine.jl b/engine-proto/gram-test/Engine.jl index bedda00..73c5c31 100644 --- a/engine-proto/gram-test/Engine.jl +++ b/engine-proto/gram-test/Engine.jl @@ -39,7 +39,7 @@ rand_on_shell(shells::Array{<:Number}) = rand_on_shell(Random.default_rng(), she # === elements === -point(pos) = [pos; -1; 0.25 * dot(pos, pos)] +point(pos) = [pos; 1; 0.25 * dot(pos, pos)] plane(normal, offset) = [normal; 0; offset] @@ -47,7 +47,7 @@ function sphere(center, radius) dist_sq = dot(center, center) [ center / radius; - -0.5 / radius; + 0.5 / radius; 0.5 * (dist_sq / radius - radius) ] end @@ -55,12 +55,12 @@ end # === Gram matrix realization === # basis changes -nullmix = [Matrix{Int64}(I, 3, 3) zeros(Int64, 3, 2); zeros(Int64, 2, 3) [1 -1; 1 1]//2] -unmix = [Matrix{Int64}(I, 3, 3) zeros(Int64, 3, 2); zeros(Int64, 2, 3) [1 1; -1 1]] +nullmix = [Matrix{Int64}(I, 3, 3) zeros(Int64, 3, 2); zeros(Int64, 2, 3) [-1 1; 1 1]//2] +unmix = [Matrix{Int64}(I, 3, 3) zeros(Int64, 3, 2); zeros(Int64, 2, 3) [-1 1; 1 1]] # the Lorentz form ## [old] Q = diagm([1, 1, 1, 1, -1]) -Q = [Matrix{Int64}(I, 3, 3) zeros(Int64, 3, 2); zeros(Int64, 2, 3) [0 2; 2 0]] +Q = [Matrix{Int64}(I, 3, 3) zeros(Int64, 3, 2); zeros(Int64, 2, 3) [0 -2; -2 0]] # project a matrix onto the subspace of matrices whose entries vanish at the # given indices diff --git a/engine-proto/gram-test/overlapping-pyramids.jl b/engine-proto/gram-test/overlapping-pyramids.jl index 8edb981..0d1f018 100644 --- a/engine-proto/gram-test/overlapping-pyramids.jl +++ b/engine-proto/gram-test/overlapping-pyramids.jl @@ -43,8 +43,8 @@ guess = begin 1 1 -1 -1 0 1 -1 1 -1 0 1 -1 -1 1 0 - -0.5 -0.5 -0.5 -0.5 -a-1 - 0.5 0.5 0.5 0.5 -a+1 + 0.5 0.5 0.5 0.5 1+a + 0.5 0.5 0.5 0.5 1-a ] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 5)), Engine.rand_on_shell(fill(BigFloat(-1), 2)) ) diff --git a/engine-proto/gram-test/sphere-in-tetrahedron.jl b/engine-proto/gram-test/sphere-in-tetrahedron.jl index 1c0dda8..631f0e5 100644 --- a/engine-proto/gram-test/sphere-in-tetrahedron.jl +++ b/engine-proto/gram-test/sphere-in-tetrahedron.jl @@ -46,7 +46,7 @@ guess = hcat( 1 1 -1 -1 0 1 -1 1 -1 0 1 -1 -1 1 0 - 0 0 0 0 -1.5 + 0 0 0 0 1.5 1 1 1 1 -0.5 ] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 5)), BigFloat[0, 0, 0, 0, 1] diff --git a/engine-proto/gram-test/tetrahedron-radius-ratio.jl b/engine-proto/gram-test/tetrahedron-radius-ratio.jl index 4218cb7..ed3ceb0 100644 --- a/engine-proto/gram-test/tetrahedron-radius-ratio.jl +++ b/engine-proto/gram-test/tetrahedron-radius-ratio.jl @@ -63,7 +63,7 @@ guess = hcat( 1 1 -1 -1 0 0 1 -1 1 -1 0 0 1 -1 -1 1 0 0 - 0 0 0 0 -1.5 -0.5 + 0 0 0 0 1.5 0.5 1 1 1 1 -0.5 -1.5 ] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 6)), Engine.point([-1, -1, -1] + 0.3*randn(3)),