Macaulay2 » Documentation
Packages » Bertini :: makeB'Section
next | previous | forward | backward | up | index | toc

makeB'Section -- makeB'Section creates a hash table that represents a hyperplane.

Synopsis

Description

makeB'Section allows for easy creation of equations that define hyperplanes. The default creates a hash table with two keys: B'NumberCoefficients and B'SectionString. The first key is a list of numbers in CC that are coefficients, and the second key is a string representing the linear polynomial. The option RandomCoefficientGenerator can be set to a function to generate random numbers for the coefficients.

To get affine linear equations include 1 in the input list.

To have an affine linear equation that contains a particular point we set the ContainsPoint option to a list of coordinates or a point. To get an homogeneous equation that contains a projective point we have to set the ContainsPoint option as well as the B'Homogenization option.

i1 : s=makeB'Section({x,y,z})

o1 = B'Section{...2...}

o1 : B'Section
i2 : class s

o2 = B'Section

o2 : Type
i3 : randomRealCoefficientGenerator=()->random(RR)

o3 = randomRealCoefficientGenerator

o3 : FunctionClosure
i4 : sReal=makeB'Section({x,y,z},RandomCoefficientGenerator=>randomRealCoefficientGenerator)

o4 = B'Section{...2...}

o4 : B'Section
i5 : sReal#B'NumberCoefficients

o5 = {.0741835, .808694, .362835}

o5 : List
i6 : randomRationalCoefficientGenerator=()->random(QQ)

o6 = randomRationalCoefficientGenerator

o6 : FunctionClosure
i7 : sRational=makeB'Section({x,y,z},RandomCoefficientGenerator=>randomRationalCoefficientGenerator)

o7 = B'Section{...2...}

o7 : B'Section
i8 : sRational#B'NumberCoefficients

       7  1   7
o8 = {--, -, --}
      10  2  10

o8 : List
i9 : affineSection=makeB'Section({x,y,z,1})

o9 = B'Section{...2...}

o9 : B'Section
i10 : X={x,y,z}

o10 = {x, y, z}

o10 : List
i11 : P={1,2,3}

o11 = {1, 2, 3}

o11 : List
i12 : affineContainingPoint=makeB'Section({x,y,z},ContainsPoint=>P)

o12 = B'Section{...3...}

o12 : B'Section
i13 : r= affineContainingPoint#B'SectionString

o13 = (1.18921+.849539*ii)*(x-(1)*(1))+(-.542371+.307137*ii)*(y-(1)*(2))+(
      1.36945+.015633*ii)*(z-(1)*(3))
i14 : print r
(1.18921+.849539*ii)*(x-(1)*(1))+(-.542371+.307137*ii)*(y-(1)*(2))+(1.36945+.015633*ii)*(z-(1)*(3))
i15 : rHomogeSection= makeB'Section({x,y,z},ContainsPoint=>P,B'Homogenization=>"x+y+z")

o15 = B'Section{...3...}

o15 : B'Section
i16 : peek rHomogeSection

o16 = B'Section{B'Homogenization => x+y+z                           
                B'NumberCoefficients => {.534614-.175945*ii, .426704
                B'SectionString => (.534614-.175945*ii)*(x-(x+y+z)*(
      -----------------------------------------------------------------------
                                                                             
      -.97539*ii, -.478803+.0416008*ii}
      1))+(.426704-.97539*ii)*(y-(x+y+z)*(2))+(-.478803+.0416008*ii)*(z-(x+y+
      -----------------------------------------------------------------------
             }

      z)*(3))
i17 : print rHomogeSection#B'SectionString
(.534614-.175945*ii)*(x-(x+y+z)*(1))+(.426704-.97539*ii)*(y-(x+y+z)*(2))+(-.478803+.0416008*ii)*(z-(x+y+z)*(3))
i18 : f="y^3-x*y+1"

o18 = y^3-x*y+1
i19 : s1=makeB'Section({x,y,1})

o19 = B'Section{...2...}

o19 : B'Section
i20 : makeB'InputFile(storeBM2Files,
        AffVariableGroup=>{x,y},
        B'Polynomials=>{f,s1});
i21 : runBertini(storeBM2Files)
i22 : #importSolutionsFile(storeBM2Files)==3

o22 = true

Ways to use makeB'Section :

For the programmer

The object makeB'Section is a method function with options.