Engine prototype #13

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

View File

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