Try uniformly distributed hyperplane orientations
Unit normals are uniformly distributed over the sphere.
This commit is contained in:
parent
b3b7c2026d
commit
621c4c5776
@ -75,26 +75,29 @@ trivial_soln[sph_z_ind] .= 1
|
||||
println("trivial solutions: $trivial_soln")
|
||||
norm2 = vec -> real(dot(conj.(vec), vec))
|
||||
is_nontrivial = soln -> norm2(abs.(real.(soln)) - trivial_soln) > 1e-4*length(gens(coordring))
|
||||
max_slope = 5
|
||||
binom = Binomial(2max_slope, 1/2)
|
||||
##max_slope = 5
|
||||
##binom = Binomial(2max_slope, 1/2)
|
||||
Random.seed!(6071)
|
||||
n_planes = 3
|
||||
for through_trivial in [false, true]
|
||||
samples = []
|
||||
for _ in 1:n_planes
|
||||
cut_matrix = rand(binom, freedom, length(gens(coordring))) .- max_slope
|
||||
cut_matrix = transpose(hcat(
|
||||
(normalize(randn(length(gens(coordring)))) for _ in 1:freedom)...
|
||||
))
|
||||
##cut_matrix = rand(binom, freedom, length(gens(coordring))) .- max_slope
|
||||
##cut_matrix = [
|
||||
## 1 1 1 1 0 1 1 0 1 1 0;
|
||||
## 1 2 1 2 0 1 1 0 1 1 0;
|
||||
## 1 1 0 1 0 1 2 0 2 0 0
|
||||
##]
|
||||
## [verbose] display(cut_matrix)
|
||||
display(cut_matrix) ## [verbose]
|
||||
if through_trivial
|
||||
cut_offset = [sum(cf[sph_z_ind]) for cf in eachrow(cut_matrix)]
|
||||
## [verbose] display(cut_offset)
|
||||
display(cut_offset) ## [verbose]
|
||||
cut_subspace = LinearSubspace(cut_matrix, cut_offset)
|
||||
else
|
||||
cut_subspace = LinearSubspace(cut_matrix, fill(0, freedom))
|
||||
cut_subspace = LinearSubspace(cut_matrix, fill(0., freedom))
|
||||
end
|
||||
wtns = witness_set(system, cut_subspace)
|
||||
real_solns = solution.(filter(isreal, results(wtns)))
|
||||
|
Loading…
Reference in New Issue
Block a user