Skip to content

Commit

Permalink
Merge pull request #339 from eric-wieser/citations
Browse files Browse the repository at this point in the history
Use sphinxcontrib-bibtex
  • Loading branch information
eric-wieser committed Jun 22, 2020
2 parents 3d42601 + 3ed204d commit e378723
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 31 deletions.
3 changes: 1 addition & 2 deletions clifford/_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def canonical_reordering_sign(bitmap_a, bitmap_b, metric):
def gmt_element(bitmap_a, bitmap_b, sig_array):
"""
Element of the geometric multiplication table given blades a, b.
The implementation used here is described in chapter 19 of
Leo Dorst's book, Geometric Algebra For Computer Science
The implementation used here is described in :cite:`ga4cs` chapter 19.
"""
output_sign = canonical_reordering_sign(bitmap_a, bitmap_b, sig_array)
output_bitmap = bitmap_a^bitmap_b
Expand Down
4 changes: 2 additions & 2 deletions clifford/_multivector.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def isBlade(self) -> bool:

def isVersor(self) -> bool:
"""Returns true if multivector is a versor.
From Leo Dorsts GA for computer science section 21.5, definition from 7.6.4
From :cite:`ga4cs` section 21.5, definition from 7.6.4
"""
Vhat = self.gradeInvol()
Vrev = ~self
Expand Down Expand Up @@ -837,7 +837,7 @@ def factorise(self) -> Tuple[List['MultiVector'], numbers.Number]:
"""
Factorises a blade into basis vectors and an overall scale.
Uses Leo Dorsts algorithm from 21.6 of GA for Computer Science
Uses the algorithm from :cite:`ga4cs`, section 21.6.
"""
if not self.isBlade():
raise ValueError("self is not a blade")
Expand Down
6 changes: 4 additions & 2 deletions clifford/tools/g3c/cost_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def midpoint_and_error_of_line_cluster(line_cluster):
"""
Gets an approximate center point of a line cluster
as well as an estimate of the error
Hadfield and Lasenby AGACSE2018
From :cite:`rotor-between`.
"""
line_cluster_array = np.array([l.value for l in line_cluster])
cp_val = val_midpoint_of_line_cluster(line_cluster_array)
Expand All @@ -106,7 +107,8 @@ def midpoint_and_error_of_line_cluster_grad(line_cluster):
"""
Gets an approximate center point of a line cluster
as well as an estimate of the error
Hadfield and Lasenby AGACSE2018
From :cite:`rotor-between`.
"""
line_cluster_array = np.array([l.value for l in line_cluster])
cp_val = val_midpoint_of_line_cluster_grad(line_cluster_array)
Expand Down
27 changes: 11 additions & 16 deletions clifford/tools/g3c/rotor_parameterisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def dorst_sinh(A):

def dorst_atanh2(s, c):
"""
Atanh2 of a bivector as given in square root and logarithm of rotors
by Dorst and Valkenburg
Atanh2 of a bivector as given in :cite:`log-of-rotors`
"""
s2 = (s * s)[0]
if s2 > 0:
Expand Down Expand Up @@ -72,8 +71,8 @@ def decompose_bivector(F):
def general_logarithm(R):
"""
Takes a general conformal rotor and returns the log
From square root and loagrithm of rotors by Leo Dorst
and Robert Valkenburg
From :cite:`log-of-rotors`.
"""
F = 2 * (R(4) - R[0]) * R(2)
S1, S2 = decompose_bivector(F)
Expand Down Expand Up @@ -197,8 +196,8 @@ def ga_exp(B):
def interpolate_TR_rotors(R_n_plus_1, R_n, interpolation_fraction):
"""
Interpolates TR type rotors
Mesh Vertex Pose and Position Interpolation using Geometric Algebra.
Rich Wareham and Joan Lasenby
From :cite:`wareham-interpolation`.
"""
if interpolation_fraction < np.finfo(float).eps:
return R_n
Expand All @@ -211,11 +210,7 @@ def interpolate_TR_rotors(R_n_plus_1, R_n, interpolation_fraction):
def interpolate_rotors(R_n_plus_1, R_n, interpolation_fraction):
"""
Interpolates all conformal type rotors
Mesh Vertex Pose and Position Interpolation using Geometric Algebra
Rich Wareham and Joan Lasenby
and
Square Root and Logarithm of Rotors
Leo Dorst and Robert Valkenburg
From :cite:`wareham-interpolation` and :cite:`log-of-rotors`.
"""
if interpolation_fraction < np.finfo(float).eps:
return R_n
Expand All @@ -228,8 +223,8 @@ def interpolate_rotors(R_n_plus_1, R_n, interpolation_fraction):
def extractRotorComponents(R):
"""
Extracts the translation and rotation information from a TR rotor
Mesh Vertex Pose and Position Interpolation using Geometric Algebra.
Rich Wareham and Joan Lasenby
From :cite:`wareham-interpolation`.
"""
phi = np.arccos(float(R[0])) # scalar
phi2 = phi * phi # scalar
Expand All @@ -245,10 +240,10 @@ def ga_log(R):
"""
R must be a TR rotor. grades in [0, 2, 4]
Presented by R. Wareham (Applications of CGA)
Presented in :cite:`wareham-applications`.
WARNING: DOES NOT COMMUTE log(A * B) != log(A) + log(B)
.. warning::
Does not commute, ``log(A * B) != log(A) + log(B)``
"""
phiP, t_normal_n, t_perpendicular_n = extractRotorComponents(R)
return phiP + t_normal_n + t_perpendicular_n
Expand Down
4 changes: 2 additions & 2 deletions clifford/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def adjoint(self) -> "LinearMatrix":
This is such that :math:`f(a) * b = a * \bar f(b)`, where :math:`*` is the scalar product.
See GA4CS section 4.3.2.
See :cite:`ga4cs` section 4.3.2.
"""
raise NotImplementedError

Expand Down Expand Up @@ -319,7 +319,7 @@ class OutermorphismMatrix(LinearMatrix):
Such a transformation is grade preserving.
See GA4CS Chapter 4 for more information
See :cite:`ga4cs` Chapter 4 for more information
Arguments
---------
Expand Down
5 changes: 5 additions & 0 deletions docs/bibliography.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bibliography
------------

.. bibliography:: refs.bib
:all:
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
'IPython.sphinxext.ipython_console_highlighting',
#'numpydoc',
'sphinx.ext.viewcode',
'sphinxcontrib.bibtex',

#'sphinx.ext.mathjax',
]
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ Scalars, vectors, and higher-grade entities can be mixed freely and consistently
:hidden:

resources
bibliography
64 changes: 64 additions & 0 deletions docs/refs.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
@book{ga4cs,
author = {Dorst, Leo and Fontijne, Daniel and Mann, Stephen},
title = {Geometric Algebra for Computer Science: An Object-Oriented Approach to Geometry},
shorttitle = {Geometric algebra for computer science},
year = {2009},
isbn = {9780080553108},
publisher = {Morgan Kaufmann Publishers Inc.}
}

@inbook{log-of-rotors,
author = {Dorst, Leo and Valkenburg, Robert},
year = {2011},
month = {01},
pages = {81--104},
title = {Square Root and Logarithm of Rotors in 3D Conformal Geometric Algebra Using Polar Decomposition},
bookTitle = {Guide to Geometric Algebra in Practice},
publisher = {Springer London},
doi = {10.1007/978-0-85729-811-9_5}
}

@inproceedings{wareham-interpolation,
author = {Wareham, Rich and Lasenby, Joan},
title = {Mesh Vertex Pose and Position Interpolation Using Geometric Algebra},
booktitle = {Articulated Motion and Deformable Objects},
year = {2008},
publisher = {Springer Berlin Heidelberg},
address = {Berlin, Heidelberg},
pages = {122--131},
isbn = {978-3-540-70517-8}
}

@inproceedings{wareham-applications,
author = {Wareham, Rich and Cameron, Jonathan and Lasenby, Joan},
editor = {Li, Hongbo and Olver, Peter J. and Sommer, Gerald},
title = {Applications of Conformal Geometric Algebra in Computer Vision and Graphics},
booktitle = {Computer Algebra and Geometric Algebra with Applications},
year = {2005},
publisher = {Springer Berlin Heidelberg},
address = {Berlin, Heidelberg},
pages = {329--349},
isbn = {978-3-540-32119-4}
}

@article{rotor-between,
author = {Lasenby, Joan and Hadfield, Hugo and Lasenby, Anthony},
year = {2019},
month = {10},
pages = {102},
title = {Calculating the Rotor Between Conformal Objects},
volume = {29},
journal = {Advances in Applied Clifford Algebras},
doi = {10.1007/s00006-019-1014-8}
}

@article{direct-linear-interpolation,
author = {Hadfield, Hugo and Lasenby, Joan},
year = {2019},
month = {09},
pages = {},
title = {Direct Linear Interpolation of Geometric Objects in Conformal Geometric Algebra},
volume = {29},
journal = {Advances in Applied Clifford Algebras},
doi = {10.1007/s00006-019-1003-y}
}
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ nbsphinx
ipywidgets
sphinx>=2.4
sphinx_rtd_theme
sphinxcontrib-bibtex

-r ../requirements.txt
10 changes: 3 additions & 7 deletions docs/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ Links
Introductory textbooks
~~~~~~~~~~~~~~~~~~~~~~

* `Geometric Algebra for Physicists <ga4physicists>`_, by Doran and Lasenby
* `Geometric Algebra for Computer Science <ga4cs>`_, by Dorst, Fontijne and Mann
* `New Foundations for Classical Mechanics <nf4mechanics>`_, by David Hestenes

.. _ga4physicists: http://www.mrao.cam.ac.uk/~cjld1/pages/book.htm
.. _ga4cs: https://dl.acm.org/doi/book/10.5555/1610323
.. _nf4mechanics: http://geocalc.clas.asu.edu/html/NFCM.html
* `Geometric Algebra for Physicists <http://www.mrao.cam.ac.uk/~cjld1/pages/book.htm>`_, by Doran and Lasenby
* `Geometric Algebra for Computer Science <https://dl.acm.org/doi/book/10.5555/1610323>`_, by Dorst, Fontijne and Mann
* `New Foundations for Classical Mechanics <http://geocalc.clas.asu.edu/html/NFCM.html>`_, by David Hestenes

0 comments on commit e378723

Please sign in to comment.