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 5652719642 - Show all commits

View File

@ -1,20 +1,28 @@
include("Engine.jl")
using SparseArrays
using AbstractAlgebra
using PolynomialRoots
# initialize the partial gram matrix for a sphere inscribed in a regular
# tetrahedron
J = Int64[]
K = Int64[]
values = BigFloat[]
for j in 1:8
for k in 1:8
for j in 1:9
for k in 1:9
filled = false
if j == k
push!(values, 1)
push!(values, j < 9 ? 1 : 0)
filled = true
elseif (j == 9)
if (k <= 5 && k != 2)
push!(values, 0)
filled = true
end
elseif (k == 9)
if (j <= 5 && j != 2)
push!(values, 0)
filled = true
end
elseif (j == 1 || k == 1)
push!(values, 0)
filled = true
@ -56,7 +64,8 @@ guess = hcat(
Engine.plane(BigFloat[cos(-2pi/3), sin(-2pi/3), 0], BigFloat(1)),
Engine.sphere(BigFloat[-1, 0, 0], BigFloat(1//5)),
Engine.sphere(BigFloat[cos(-pi/3), sin(-pi/3), 0], BigFloat(1//5)),
Engine.sphere(BigFloat[cos(pi/3), sin(pi/3), 0], BigFloat(1//5))
Engine.sphere(BigFloat[cos(pi/3), sin(pi/3), 0], BigFloat(1//5)),
BigFloat[0, 0, 0, 1, 1]
)
=#
guess = hcat(
@ -67,7 +76,8 @@ guess = hcat(
Engine.plane(BigFloat[cos(-2pi/3), sin(-2pi/3), 0], BigFloat(1)),
Engine.sphere(4//3*BigFloat[-1, 0, 0], BigFloat(1//3)),
Engine.sphere(4//3*BigFloat[cos(-pi/3), sin(-pi/3), 0], BigFloat(1//3)),
Engine.sphere(4//3*BigFloat[cos(pi/3), sin(pi/3), 0], BigFloat(1//3))
Engine.sphere(4//3*BigFloat[cos(pi/3), sin(pi/3), 0], BigFloat(1//3)),
BigFloat[0, 0, 0, 1, 1]
)
# complete the gram matrix using gradient descent