@@ -224,7 +224,7 @@ def gale_transform_to_polytope(vectors, base_ring=None, backend=None):
224224
225225 .. SEEALSO::
226226
227- :func:` gale_transform_to_primal`.
227+ :func`~sage.geometry.polyhedron.library. gale_transform_to_primal`.
228228
229229 EXAMPLES::
230230
@@ -333,7 +333,7 @@ def gale_transform_to_primal(vectors, base_ring=None, backend=None):
333333 used interally in case the centroid is not the origin,
334334 see :func:`~sage.geometry.polyhedron.constructor.Polyhedron`
335335
336- OUTPUT: An ordered point confuration as list of vectors.
336+ OUTPUT: An ordered point configuration as list of vectors.
337337
338338 .. NOTE::
339339
@@ -346,24 +346,32 @@ def gale_transform_to_primal(vectors, base_ring=None, backend=None):
346346
347347 ALGORITHM:
348348
349- The dual vector configuration is obtained by taking
350- a basis of the right kernel of ``Matrix(vectors)``.
349+ We assume the centroid of the (input) vectors to be the origin.
350+ We stack ``Matrix(vectors)`` by a row of ones.
351+ The right kernel of this is the dual point configuration.
351352
352- By assuming the centroid of the (input) vectors to be the origin,
353- we can extend the all-ones vector to a basis. Then the (output) vectors
354- are the columns of ``[[1], [V]]``, where ``[1]`` represents
355- a row of all-ones. Then, the columns of ``V`` are
356- the points of a dehomogenization.
353+ More concretely, the dual vector configuration is obtained by
354+ taking a basis of the right kernel of ``Matrix(vectors)``.
357355
358- Hence, the (inhomogenous) dual point configuration is obtained
359- by taking the right kernel of ``Matrix(vectors)`` stacked
360- with the all-ones vector.
356+ If the centroid of the (input) vectors is the origin,
357+ we can extend the all-ones vector to a basis of the right kernel.
358+ In this case the dual vector configuration can be taken to be
359+ the columns of ``[[1], [V]]``, where ``[1]`` represents
360+ a row of all-ones. Clearly, ``V`` is a dehomogenization.
361+
362+ Extending the all-ones vector to a basis of the right kernel is
363+ done by stacking a row of ones on ``Matrix(vectors)`` and then
364+ taking the right kernel.
361365
362366 REFERENCES:
363367
364368 For more information, see Section 6.4 of [Zie2007]_
365369 or Definition 2.5.1 and Definition 4.1.35 of [DLRS2010]_.
366370
371+ .. SEEALSO::
372+
373+ :func`~sage.geometry.polyhedron.library.gale_transform_to_polytope`.
374+
367375 EXAMPLES::
368376
369377 sage: from sage.geometry.polyhedron.library import gale_transform_to_primal
@@ -391,7 +399,7 @@ def gale_transform_to_primal(vectors, base_ring=None, backend=None):
391399 (0.0, 1.0, 0.0),
392400 (0.0, 0.0, 1.0)]
393401
394- One can also specify the backend to be used interally ::
402+ One can also specify the backend to be used internally ::
395403
396404 sage: gale_transform_to_primal(
397405 ....: [(1,1), (-1,-1), (1,0),
@@ -402,17 +410,17 @@ def gale_transform_to_primal(vectors, base_ring=None, backend=None):
402410 (-55, 0, 0),
403411 (0, -55, 0),
404412 (0, 0, -55)]
405- sage: gale_transform_to_primal(
413+ sage: gale_transform_to_primal( # optional - pynormaliz
406414 ....: [(1,1), (-1,-1), (1,0),
407- ....: (-1,0), (1,-1), (-2,1)], backend='normaliz') # optional - pynormaliz
415+ ....: (-1,0), (1,-1), (-2,1)], backend='normaliz')
408416 [(16, -35, 54),
409417 (24, 10, 31),
410418 (-15, 50, -60),
411419 (-25, 0, 0),
412420 (0, -25, 0),
413421 (0, 0, -25)]
414422
415- The input vectors are checked for being totally cyclic::
423+ The input vectors should be totally cyclic::
416424
417425 sage: gale_transform_to_primal([(0,1), (1,0), (1,1), (-1,0)])
418426 Traceback (most recent call last):
@@ -430,12 +438,14 @@ def gale_transform_to_primal(vectors, base_ring=None, backend=None):
430438 # The centroid of the input vectors shall be the origin.
431439 # If this is not the case, we scale them accordingly.
432440 # This has the adventage that right kernel of ``vectors`` can be
433- # presented in the form ``[[1], [V]]``, where ``V`` are the vertices
434- # of the polyhedron. So dehomogenization is straight forward.
441+ # presented in the form ``[[1], [V]]``, where ``V`` are the points
442+ # in the dual point configuration.
443+ # (Dehomogenization is straightforward.)
435444
436- # Scaling of the vertices is equivalent to finding a hyperplane that intersects
437- # all rays of the homogenized polyhedron . But if the input is already provided
445+ # Scaling of the vectors is equivalent to finding a hyperplane that intersects
446+ # all vectors of the dual point configuration . But if the input is already provided
438447 # such that the vectors add up to zero, the coordinates might be nicer.
448+ # (And this is faster.)
439449
440450 if base_ring :
441451 ker = Matrix (base_ring , vectors ).left_kernel ()
0 commit comments