Engine prototype #13

Open
Vectornaut wants to merge 117 commits from engine-proto into main
Showing only changes of commit ea354b6c2b - Show all commits

View File

@ -3,6 +3,7 @@ include("Engine.jl")
using SparseArrays
using AbstractAlgebra
using PolynomialRoots
using Random
# initialize the partial gram matrix for an arrangement of seven spheres in
# which spheres 1 through 5 are mutually tangent, and spheres 3 through 7 are
@ -34,13 +35,17 @@ gram[1, 6] = gram[6, 1]
# in this initial guess, the mutual tangency condition is satisfied for spheres
# 1 through 5
guess = sqrt(1/BigFloat(2)) * BigFloat[
1 1 -1 -1 0 -0.1 0.3;
1 -1 1 -1 0 -0.5 0.4;
1 -1 -1 1 0 0.1 -0.2;
0 0 0 0 -sqrt(BigFloat(6)) 0.3 -0.2;
1 1 1 1 2 0.2 0.1;
]
Random.seed!(50793)
guess = hcat(
sqrt(1/BigFloat(2)) * BigFloat[
1 1 -1 -1 0;
1 -1 1 -1 0;
1 -1 -1 1 0;
0 0 0 0 -sqrt(BigFloat(6));
1 1 1 1 2;
] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 5)),
Engine.rand_on_shell(fill(BigFloat(-1), 2))
)
# complete the gram matrix using gradient descent
L, history = Engine.realize_gram(gram, guess)