Skip to content

Commit 65adab7

Browse files
author
Tomás Méndez Echenagucia
committed
references update
1 parent 0d7cdee commit 65adab7

File tree

15 files changed

+30
-142
lines changed

15 files changed

+30
-142
lines changed

src/compas/com/matlab_/engine.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def __init__(self, message=None):
2727

2828

2929
class MatlabEngine(object):
30-
"""Communicate with Matlab through the MATLAB engine.
30+
"""Communicate with Matlab through the MATLAB engine [mathworks2017a]_, [mathworks2017b]_,
31+
[mathworks2017c]_, [mathworks2017d]_, [mathworks2017e]_.
3132
3233
Attributes
3334
----------
@@ -43,14 +44,6 @@ class MatlabEngine(object):
4344
>>> matlab.engine.isprime(37)
4445
True
4546
46-
References
47-
----------
48-
* `MATLAB Engine API for Python <https://ch.mathworks.com/help/matlab/matlab-engine-for-python.html>`_
49-
* `Pass Data to MATLAB from Python <https://ch.mathworks.com/help/matlab/matlab_external/pass-data-to-matlab-from-python.html>`_
50-
* `Use MATLAB Arrays in Python <https://ch.mathworks.com/help/matlab/matlab_external/use-matlab-arrays-in-python.html>`_
51-
* `Use MATLAB Engine Workspace in Python <https://ch.mathworks.com/help/matlab/matlab_external/use-the-matlab-engine-workspace-in-python.html>`_
52-
* `Call MATLAB Functions from Python <https://ch.mathworks.com/help/matlab/matlab_external/call-matlab-functions-from-python.html>`_
53-
5447
"""
5548

5649
def __init__(self):

src/compas/datastructures/volmesh/volmesh.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class VolMesh(FromToData,
6666
6767
Volumetric meshes are 3-mainfold, cellular structures.
6868
69-
The implementation of ``VolMesh`` is based on the notion of *x-maps* [xmaps]
70-
and the concepts behind the *OpenVolumeMesh* library [ovm].
69+
The implementation of ``VolMesh`` is based on the notion of *x-maps*
70+
and the concepts behind the *OpenVolumeMesh* library [vci2016]_.
7171
In short, we add an additional entity compared to polygonal meshes,
7272
the *cell*, and relate cells not through *half-edges*, but through a combination
7373
of *half-faces* and *planes*. Each cell consists of a series of vertex pairs,
@@ -92,7 +92,7 @@ class VolMesh(FromToData,
9292
halffaces.
9393
``self.cell[ckey][u][v] -> fkey``
9494
halfface : dict
95-
The halffaces of the volmesh. Each halfface is represented by
95+
The halffaces of the volmesh. Each halfface is represented by
9696
``self.halfface[fkey] -> vertex cycle``
9797
plane : dict
9898
The planes of the volmesh. Every plane is uniquely defined by three
@@ -104,11 +104,6 @@ class VolMesh(FromToData,
104104
pointing at the cells of the volmesh.
105105
``self.plane[u][v][w] -> ckey``.
106106
107-
References
108-
----------
109-
.. [xmaps] xxx
110-
.. [ovm] `Open Volum Mesh <http://www.openvolumemesh.org>`_
111-
112107
"""
113108

114109
def __init__(self):
@@ -888,5 +883,5 @@ def scale(self, factor=1.0):
888883

889884
viewer.setup()
890885

891-
viewer.camera.zoom_out(5)
886+
viewer.camera.zoom_out(5)
892887
viewer.show()

src/compas/files/obj.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, filepath, remote=False, precision=None):
4040

4141

4242
class OBJReader(object):
43-
"""Read the contents of an *obj* file.
43+
"""Read the contents of an *obj* file [Bourke]_.
4444
4545
Parameters:
4646
filepath (str): Path to the file.
@@ -61,9 +61,6 @@ class OBJReader(object):
6161
curves2 (list): Curves
6262
surfaces (list): Surfaces
6363
64-
References:
65-
http://paulbourke.net/dataformats/obj/
66-
6764
"""
6865

6966
def __init__(self, filepath, remote=False):

src/compas/geometry/algorithms/bestfit.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
def bestfit_plane(points):
32-
"""Fit a plane to a list of (more than three) points.
32+
"""Fit a plane to a list of (more than three) points [Ernerfeldt2015]_.
3333
3434
Parameters
3535
----------
@@ -41,10 +41,6 @@ def bestfit_plane(points):
4141
plane : tuple
4242
Base point and normal vector (normalized).
4343
44-
References
45-
----------
46-
http://www.ilikebigbits.com/blog/2015/3/2/plane-from-points
47-
4844
Warning
4945
-------
5046
This method will minimize the squares of the residuals as perpendicular
@@ -210,7 +206,7 @@ def bestfit_plane_numpy4(points):
210206

211207

212208
def bestfit_circle_numpy(points):
213-
"""Fit a circle through a set of points.
209+
"""Fit a circle through a set of points [Scipya]_.
214210
215211
Warning
216212
-------
@@ -233,11 +229,6 @@ def bestfit_circle_numpy(points):
233229
234230
#
235231
236-
237-
References
238-
----------
239-
* http://scipy-cookbook.readthedocs.io/items/Least_Squares_Circle.html
240-
241232
"""
242233
from numpy import sqrt
243234
from numpy import mean

src/compas/geometry/algorithms/hull.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
def convex_hull(points):
28-
"""Construct convex hull for a set of points.
28+
"""Construct convex hull for a set of points [githubgist_a]_.
2929
3030
Parameters
3131
----------
@@ -77,9 +77,6 @@ def convex_hull(points):
7777
show_vertices = False,
7878
show_edges = False)
7979
80-
References
81-
----------
82-
* https://gist.github.com/anonymous/5184ba0bcab21d3dd19781efd3aae543
8380
8481
"""
8582
def _normal_face(face):
@@ -118,7 +115,7 @@ def _add_point(hull, p):
118115

119116

120117
def convex_hull_xy(points):
121-
"""Computes the convex hull of a set of 2D points.
118+
"""Computes the convex hull of a set of 2D points [wikibooks2017]_.
122119
123120
Note
124121
----
@@ -139,9 +136,6 @@ def convex_hull_xy(points):
139136
XY(Z) coordinates of vertices of the convex hull in counter-clockwise order,
140137
starting from the vertex with the lexicographically smallest coordinates.
141138
142-
References
143-
----------
144-
* https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain
145139
146140
"""
147141

src/compas/geometry/algorithms/interpolation.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
def discrete_coons_patch(ab, bc, dc, ad):
2424
"""Creates a coons patch from a set of four or three boundary
25-
polylines (ab, bc, dc, ad).
25+
polylines (ab, bc, dc, ad) [wikipedia2017]_, [ferreol2013]_.
2626
2727
Direction and order of polylines::
2828
@@ -61,11 +61,6 @@ def discrete_coons_patch(ab, bc, dc, ad):
6161
--------
6262
* :func:`compas.datastructures.mesh_cull_duplicate_vertices`
6363
64-
References
65-
----------
66-
* https://en.wikipedia.org/wiki/Coons_patch
67-
* https://www.mathcurve.com/surfaces/patchcoons/patchcoons.shtml
68-
6964
"""
7065
if not ab:
7166
ab = [ad[0]] * len(dc)

src/compas/geometry/basic.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ def plane_from_points(a, b, c):
11031103

11041104

11051105
def circle_from_points(a, b, c):
1106-
"""Construct a circle from three points.
1106+
"""Construct a circle from three points [wikipedia2017b]_.
11071107
11081108
Parameters
11091109
----------
@@ -1119,10 +1119,6 @@ def circle_from_points(a, b, c):
11191119
circle : tuple
11201120
Center, radius, normal of the circle.
11211121
1122-
References
1123-
----------
1124-
https://en.wikipedia.org/wiki/Circumscribed_circle
1125-
11261122
Examples
11271123
--------
11281124
>>>
@@ -1148,7 +1144,7 @@ def circle_from_points(a, b, c):
11481144

11491145

11501146
def circle_from_points_xy(a, b, c):
1151-
"""Create a circle from three points lying in the XY-plane.
1147+
"""Create a circle from three points lying in the XY-plane [wikipedia2017b]_
11521148
11531149
Parameters
11541150
----------
@@ -1164,10 +1160,6 @@ def circle_from_points_xy(a, b, c):
11641160
tuple
11651161
XYZ coordinates of center in the XY-plane (Z = 0.0) and radius of the circle.
11661162
1167-
References
1168-
----------
1169-
https://en.wikipedia.org/wiki/Circumscribed_circle
1170-
11711163
Examples
11721164
--------
11731165
>>>

src/compas/geometry/distance.py

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def distance_point_point_sqrd_xy(a, b):
173173

174174

175175
def distance_point_line(point, line):
176-
"""Compute the distance between a point and a line.
176+
"""Compute the distance between a point and a line [wikipedia2017c]_.
177177
178178
This implementation computes the *right angle distance* from a point P to a
179179
line defined by points A and B as twice the area of the triangle ABP divided
@@ -195,10 +195,6 @@ def distance_point_line(point, line):
195195
--------
196196
>>>
197197
198-
References
199-
----------
200-
https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
201-
202198
"""
203199
a, b = line
204200
ab = subtract_vectors(b, a)
@@ -210,7 +206,7 @@ def distance_point_line(point, line):
210206

211207

212208
def distance_point_line_xy(point, line):
213-
"""Compute the distance between a point and a line, assuming they lie in the XY-plane.
209+
"""Compute the distance between a point and a line, assuming they lie in the XY-plane [wikipedia2017c]_.
214210
215211
This implementation computes the orthogonal distance from a point P to a
216212
line defined by points A and B as twice the area of the triangle ABP divided
@@ -228,10 +224,6 @@ def distance_point_line_xy(point, line):
228224
float
229225
The distance between the point and the line.
230226
231-
References
232-
----------
233-
https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
234-
235227
"""
236228
a, b = line
237229
ab = subtract_vectors_xy(b, a)
@@ -243,7 +235,7 @@ def distance_point_line_xy(point, line):
243235

244236

245237
def distance_point_line_sqrd(point, line):
246-
"""Compute the squared distance between a point and a line.
238+
"""Compute the squared distance between a point and a line [wikipedia2017c]_.
247239
248240
Parameters
249241
----------
@@ -257,9 +249,6 @@ def distance_point_line_sqrd(point, line):
257249
float
258250
The squared distance between the point and the line.
259251
260-
References
261-
----------
262-
https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
263252
264253
"""
265254
a, b = line
@@ -272,7 +261,7 @@ def distance_point_line_sqrd(point, line):
272261

273262

274263
def distance_point_line_sqrd_xy(point, line):
275-
"""Compute the squared distance between a point and a line lying in the XY-plane.
264+
"""Compute the squared distance between a point and a line lying in the XY-plane [wikipedia2017c]_.
276265
277266
This implementation computes the orthogonal squared distance from a point P to a
278267
line defined by points A and B as twice the area of the triangle ABP divided
@@ -290,10 +279,6 @@ def distance_point_line_sqrd_xy(point, line):
290279
float
291280
The squared distance between the point and the line.
292281
293-
References
294-
----------
295-
https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
296-
297282
"""
298283
a, b = line
299284
ab = subtract_vectors_xy(b, a)
@@ -305,7 +290,7 @@ def distance_point_line_sqrd_xy(point, line):
305290

306291

307292
def distance_point_plane(point, plane):
308-
r"""Compute the distance from a point to a plane defined by three points.
293+
r"""Compute the distance from a point to a plane defined by three points [nykamp2012]_.
309294
310295
The distance from a pioint to a planbe can be computed from the coefficients
311296
of the equation of the plane and the coordinates of the point.
@@ -350,18 +335,14 @@ def distance_point_plane(point, plane):
350335
--------
351336
>>>
352337
353-
References
354-
----------
355-
http://mathinsight.org/distance_point_plane
356-
357338
"""
358339
base, normal = plane
359340
vector = subtract_vectors(point, base)
360341
return fabs(dot_vectors(vector, normal))
361342

362343

363344
def distance_line_line(l1, l2, tol=0.0):
364-
"""Compute the shortest distance between two lines.
345+
"""Compute the shortest distance between two lines [wisstein2017]_, [wikipedia2017d]_.
365346
366347
The distance is the absolute value of the dot product of a unit vector that
367348
is perpendicular to the two lines, and the vector between two points on the lines.
@@ -386,11 +367,6 @@ def distance_line_line(l1, l2, tol=0.0):
386367
--------
387368
>>>
388369
389-
References
390-
----------
391-
http://mathworld.wolfram.com/Line-LineDistance.html
392-
https://en.wikipedia.org/wiki/Skew_lines#Distance
393-
394370
"""
395371
a, b = l1
396372
c, d = l2
@@ -763,7 +739,7 @@ def closest_point_on_polygon_xy(point, polygon):
763739

764740
def closest_point_on_plane(point, plane):
765741
"""
766-
Compute closest point on a plane to a given point.
742+
Compute closest point on a plane to a given point [wikipedia2017e]_.
767743
768744
Parameters
769745
----------
@@ -783,10 +759,6 @@ def closest_point_on_plane(point, plane):
783759
>>> point = [1.0, 2.0, 3.0]
784760
>>> closest_point_on_plane(point, plane)
785761
786-
References
787-
----------
788-
http://en.wikipedia.org/wiki/Distance_from_a_point_to_a_plane
789-
790762
"""
791763
base, normal = plane
792764
x, y, z = base

0 commit comments

Comments
 (0)