Study mutually tangent spheres with two fixed

This commit is contained in:
Aaron Fenyes 2024-02-15 13:28:01 -08:00
parent e41bcc7e13
commit 291d5c8ff6
2 changed files with 62 additions and 55 deletions

View file

@ -186,19 +186,19 @@ function realize(ctx::Construction{T}) where T
# add relations to center, orient, and scale the construction
# [to do] the scaling constraint, as written, can be impossible to satisfy
# when all of the spheres have to go through the origin
if !isempty(ctx.points)
append!(eqns, [sum(pt.coords[k] for pt in ctx.points) for k in 1:3])
end
if !isempty(ctx.spheres)
append!(eqns, [sum(sph.coords[k] for sph in ctx.spheres) for k in 3:4])
end
n_elts = length(ctx.points) + length(ctx.spheres)
if n_elts > 0
push!(eqns, sum(elt.vec[2] for elt in Iterators.flatten((ctx.points, ctx.spheres))) - n_elts)
end
##if !isempty(ctx.points)
## append!(eqns, [sum(pt.coords[k] for pt in ctx.points) for k in 1:3])
##end
##if !isempty(ctx.spheres)
## append!(eqns, [sum(sph.coords[k] for sph in ctx.spheres) for k in 3:4])
##end
##n_elts = length(ctx.points) + length(ctx.spheres)
##if n_elts > 0
## push!(eqns, sum(elt.vec[2] for elt in Iterators.flatten((ctx.points, ctx.spheres))) - n_elts)
##end
## [test] (Generic.Ideal(coordring, eqns), eqns)
(nothing, eqns)
(Generic.Ideal(coordring, eqns), eqns)
## [test] (nothing, eqns)
end
end