passagemath-symbolics 10.6.43__cp314-cp314t-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-symbolics might be problematic. Click here for more details.

Files changed (171) hide show
  1. passagemath_symbolics/__init__.py +3 -0
  2. passagemath_symbolics-10.6.43.dist-info/METADATA +187 -0
  3. passagemath_symbolics-10.6.43.dist-info/RECORD +171 -0
  4. passagemath_symbolics-10.6.43.dist-info/WHEEL +5 -0
  5. passagemath_symbolics-10.6.43.dist-info/top_level.txt +3 -0
  6. sage/all__sagemath_symbolics.py +17 -0
  7. sage/calculus/all.py +14 -0
  8. sage/calculus/calculus.py +2826 -0
  9. sage/calculus/desolvers.py +1866 -0
  10. sage/calculus/predefined.py +51 -0
  11. sage/calculus/tests.py +225 -0
  12. sage/calculus/var.cpython-314t-x86_64-linux-musl.so +0 -0
  13. sage/calculus/var.pyx +401 -0
  14. sage/dynamics/all__sagemath_symbolics.py +6 -0
  15. sage/dynamics/complex_dynamics/all.py +5 -0
  16. sage/dynamics/complex_dynamics/mandel_julia.py +765 -0
  17. sage/dynamics/complex_dynamics/mandel_julia_helper.cpython-314t-x86_64-linux-musl.so +0 -0
  18. sage/dynamics/complex_dynamics/mandel_julia_helper.pyx +1035 -0
  19. sage/ext/all__sagemath_symbolics.py +1 -0
  20. sage/ext_data/kenzo/CP2.txt +45 -0
  21. sage/ext_data/kenzo/CP3.txt +349 -0
  22. sage/ext_data/kenzo/CP4.txt +4774 -0
  23. sage/ext_data/kenzo/README.txt +49 -0
  24. sage/ext_data/kenzo/S4.txt +20 -0
  25. sage/ext_data/magma/latex/latex.m +1021 -0
  26. sage/ext_data/magma/latex/latex.spec +1 -0
  27. sage/ext_data/magma/sage/basic.m +356 -0
  28. sage/ext_data/magma/sage/sage.spec +1 -0
  29. sage/ext_data/magma/spec +9 -0
  30. sage/geometry/all__sagemath_symbolics.py +8 -0
  31. sage/geometry/hyperbolic_space/all.py +5 -0
  32. sage/geometry/hyperbolic_space/hyperbolic_coercion.py +743 -0
  33. sage/geometry/hyperbolic_space/hyperbolic_constants.py +5 -0
  34. sage/geometry/hyperbolic_space/hyperbolic_geodesic.py +2409 -0
  35. sage/geometry/hyperbolic_space/hyperbolic_interface.py +206 -0
  36. sage/geometry/hyperbolic_space/hyperbolic_isometry.py +1082 -0
  37. sage/geometry/hyperbolic_space/hyperbolic_model.py +1502 -0
  38. sage/geometry/hyperbolic_space/hyperbolic_point.py +621 -0
  39. sage/geometry/riemannian_manifolds/all.py +7 -0
  40. sage/geometry/riemannian_manifolds/parametrized_surface3d.py +1632 -0
  41. sage/geometry/riemannian_manifolds/surface3d_generators.py +461 -0
  42. sage/interfaces/all__sagemath_symbolics.py +1 -0
  43. sage/interfaces/magma.py +3017 -0
  44. sage/interfaces/magma_free.py +92 -0
  45. sage/interfaces/maple.py +1397 -0
  46. sage/interfaces/mathematica.py +1345 -0
  47. sage/interfaces/mathics.py +1312 -0
  48. sage/interfaces/sympy.py +1398 -0
  49. sage/interfaces/sympy_wrapper.py +197 -0
  50. sage/interfaces/tides.py +938 -0
  51. sage/libs/all__sagemath_symbolics.py +6 -0
  52. sage/manifolds/all.py +7 -0
  53. sage/manifolds/calculus_method.py +555 -0
  54. sage/manifolds/catalog.py +437 -0
  55. sage/manifolds/chart.py +4019 -0
  56. sage/manifolds/chart_func.py +3419 -0
  57. sage/manifolds/continuous_map.py +2183 -0
  58. sage/manifolds/continuous_map_image.py +155 -0
  59. sage/manifolds/differentiable/affine_connection.py +2475 -0
  60. sage/manifolds/differentiable/all.py +1 -0
  61. sage/manifolds/differentiable/automorphismfield.py +1383 -0
  62. sage/manifolds/differentiable/automorphismfield_group.py +604 -0
  63. sage/manifolds/differentiable/bundle_connection.py +1445 -0
  64. sage/manifolds/differentiable/characteristic_cohomology_class.py +1840 -0
  65. sage/manifolds/differentiable/chart.py +1241 -0
  66. sage/manifolds/differentiable/curve.py +1028 -0
  67. sage/manifolds/differentiable/de_rham_cohomology.py +541 -0
  68. sage/manifolds/differentiable/degenerate.py +559 -0
  69. sage/manifolds/differentiable/degenerate_submanifold.py +1671 -0
  70. sage/manifolds/differentiable/diff_form.py +1658 -0
  71. sage/manifolds/differentiable/diff_form_module.py +1062 -0
  72. sage/manifolds/differentiable/diff_map.py +1315 -0
  73. sage/manifolds/differentiable/differentiable_submanifold.py +291 -0
  74. sage/manifolds/differentiable/examples/all.py +1 -0
  75. sage/manifolds/differentiable/examples/euclidean.py +2517 -0
  76. sage/manifolds/differentiable/examples/real_line.py +897 -0
  77. sage/manifolds/differentiable/examples/sphere.py +1186 -0
  78. sage/manifolds/differentiable/examples/symplectic_space.py +187 -0
  79. sage/manifolds/differentiable/examples/symplectic_space_test.py +40 -0
  80. sage/manifolds/differentiable/integrated_curve.py +4035 -0
  81. sage/manifolds/differentiable/levi_civita_connection.py +841 -0
  82. sage/manifolds/differentiable/manifold.py +4254 -0
  83. sage/manifolds/differentiable/manifold_homset.py +1826 -0
  84. sage/manifolds/differentiable/metric.py +3032 -0
  85. sage/manifolds/differentiable/mixed_form.py +1507 -0
  86. sage/manifolds/differentiable/mixed_form_algebra.py +559 -0
  87. sage/manifolds/differentiable/multivector_module.py +800 -0
  88. sage/manifolds/differentiable/multivectorfield.py +1520 -0
  89. sage/manifolds/differentiable/poisson_tensor.py +268 -0
  90. sage/manifolds/differentiable/pseudo_riemannian.py +755 -0
  91. sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +1839 -0
  92. sage/manifolds/differentiable/scalarfield.py +1343 -0
  93. sage/manifolds/differentiable/scalarfield_algebra.py +472 -0
  94. sage/manifolds/differentiable/symplectic_form.py +910 -0
  95. sage/manifolds/differentiable/symplectic_form_test.py +220 -0
  96. sage/manifolds/differentiable/tangent_space.py +412 -0
  97. sage/manifolds/differentiable/tangent_vector.py +616 -0
  98. sage/manifolds/differentiable/tensorfield.py +4665 -0
  99. sage/manifolds/differentiable/tensorfield_module.py +963 -0
  100. sage/manifolds/differentiable/tensorfield_paral.py +2450 -0
  101. sage/manifolds/differentiable/tensorfield_paral_test.py +16 -0
  102. sage/manifolds/differentiable/vector_bundle.py +1728 -0
  103. sage/manifolds/differentiable/vectorfield.py +1717 -0
  104. sage/manifolds/differentiable/vectorfield_module.py +2445 -0
  105. sage/manifolds/differentiable/vectorframe.py +1832 -0
  106. sage/manifolds/family.py +270 -0
  107. sage/manifolds/local_frame.py +1490 -0
  108. sage/manifolds/manifold.py +3090 -0
  109. sage/manifolds/manifold_homset.py +452 -0
  110. sage/manifolds/operators.py +359 -0
  111. sage/manifolds/point.py +994 -0
  112. sage/manifolds/scalarfield.py +3718 -0
  113. sage/manifolds/scalarfield_algebra.py +629 -0
  114. sage/manifolds/section.py +3111 -0
  115. sage/manifolds/section_module.py +831 -0
  116. sage/manifolds/structure.py +229 -0
  117. sage/manifolds/subset.py +2764 -0
  118. sage/manifolds/subsets/all.py +1 -0
  119. sage/manifolds/subsets/closure.py +131 -0
  120. sage/manifolds/subsets/pullback.py +885 -0
  121. sage/manifolds/topological_submanifold.py +891 -0
  122. sage/manifolds/trivialization.py +733 -0
  123. sage/manifolds/utilities.py +1348 -0
  124. sage/manifolds/vector_bundle.py +1342 -0
  125. sage/manifolds/vector_bundle_fiber.py +332 -0
  126. sage/manifolds/vector_bundle_fiber_element.py +111 -0
  127. sage/matrix/all__sagemath_symbolics.py +1 -0
  128. sage/matrix/matrix_symbolic_dense.cpython-314t-x86_64-linux-musl.so +0 -0
  129. sage/matrix/matrix_symbolic_dense.pxd +6 -0
  130. sage/matrix/matrix_symbolic_dense.pyx +1022 -0
  131. sage/matrix/matrix_symbolic_sparse.cpython-314t-x86_64-linux-musl.so +0 -0
  132. sage/matrix/matrix_symbolic_sparse.pxd +6 -0
  133. sage/matrix/matrix_symbolic_sparse.pyx +1029 -0
  134. sage/modules/all__sagemath_symbolics.py +1 -0
  135. sage/modules/vector_callable_symbolic_dense.py +105 -0
  136. sage/modules/vector_symbolic_dense.py +116 -0
  137. sage/modules/vector_symbolic_sparse.py +118 -0
  138. sage/rings/all__sagemath_symbolics.py +4 -0
  139. sage/rings/asymptotic/all.py +6 -0
  140. sage/rings/asymptotic/asymptotic_expansion_generators.py +1485 -0
  141. sage/rings/asymptotic/asymptotic_ring.py +4858 -0
  142. sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py +4153 -0
  143. sage/rings/asymptotic/growth_group.py +5373 -0
  144. sage/rings/asymptotic/growth_group_cartesian.py +1400 -0
  145. sage/rings/asymptotic/term_monoid.py +5237 -0
  146. sage/rings/function_field/all__sagemath_symbolics.py +2 -0
  147. sage/rings/polynomial/all__sagemath_symbolics.py +1 -0
  148. sage/symbolic/all.py +15 -0
  149. sage/symbolic/assumptions.py +985 -0
  150. sage/symbolic/benchmark.py +93 -0
  151. sage/symbolic/callable.py +459 -0
  152. sage/symbolic/complexity_measures.py +35 -0
  153. sage/symbolic/constants.py +1287 -0
  154. sage/symbolic/expression_conversion_algebraic.py +310 -0
  155. sage/symbolic/expression_conversion_sympy.py +317 -0
  156. sage/symbolic/expression_conversions.py +1713 -0
  157. sage/symbolic/function_factory.py +355 -0
  158. sage/symbolic/integration/all.py +1 -0
  159. sage/symbolic/integration/external.py +270 -0
  160. sage/symbolic/integration/integral.py +1115 -0
  161. sage/symbolic/maxima_wrapper.py +162 -0
  162. sage/symbolic/operators.py +267 -0
  163. sage/symbolic/random_tests.py +462 -0
  164. sage/symbolic/relation.py +1907 -0
  165. sage/symbolic/ring.cpython-314t-x86_64-linux-musl.so +0 -0
  166. sage/symbolic/ring.pxd +5 -0
  167. sage/symbolic/ring.pyx +1396 -0
  168. sage/symbolic/subring.py +1025 -0
  169. sage/symbolic/symengine.py +19 -0
  170. sage/symbolic/tests.py +40 -0
  171. sage/symbolic/units.py +1470 -0
@@ -0,0 +1,461 @@
1
+ # sage_setup: distribution = sagemath-symbolics
2
+ r"""
3
+ Common parametrized surfaces in 3D.
4
+
5
+ AUTHORS::
6
+
7
+ - Joris Vankerschaver (2012-06-16)
8
+ """
9
+ #*****************************************************************************
10
+ # Copyright (C) 2010 Joris Vankerschaver <joris.vankerschaver@gmail.com>
11
+ #
12
+ # Distributed under the terms of the GNU General Public License (GPL)
13
+ # http://www.gnu.org/licenses/
14
+ #*****************************************************************************
15
+
16
+
17
+ from sage.symbolic.constants import pi
18
+ from sage.functions.log import log
19
+ from sage.functions.trig import sin, cos, tan
20
+ from sage.functions.hyperbolic import cosh, tanh
21
+ from sage.symbolic.ring import var
22
+ from sage.geometry.riemannian_manifolds.parametrized_surface3d import \
23
+ ParametrizedSurface3D
24
+
25
+
26
+ class SurfaceGenerators:
27
+ """
28
+ A class consisting of generators for several common parametrized surfaces
29
+ in 3D.
30
+ """
31
+ @staticmethod
32
+ def Catenoid(c=1, name='Catenoid'):
33
+ r"""
34
+ Return a catenoid surface, with parametric representation.
35
+
36
+ .. MATH::
37
+
38
+ \begin{aligned}
39
+ x(u, v) & = c \cosh(v/c) \cos(u); \\
40
+ y(u, v) & = c \cosh(v/c) \sin(u); \\
41
+ z(u, v) & = v.
42
+ \end{aligned}
43
+
44
+ INPUT:
45
+
46
+ - ``c`` -- surface parameter
47
+
48
+ - ``name`` -- string; name of the surface
49
+
50
+ For more information, see :wikipedia:`Catenoid`.
51
+
52
+ EXAMPLES::
53
+
54
+ sage: cat = surfaces.Catenoid(); cat
55
+ Parametrized surface ('Catenoid') with equation (cos(u)*cosh(v), cosh(v)*sin(u), v)
56
+ sage: cat.plot() # needs sage.plot
57
+ Graphics3d Object
58
+ """
59
+ u, v = var('u, v')
60
+ catenoid_eq = [c*cosh(v/c)*cos(u), c*cosh(v/c)*sin(u), v]
61
+ coords = ((u, 0, 2 * pi), (v, -1, 1))
62
+ return ParametrizedSurface3D(catenoid_eq, coords, name)
63
+
64
+ @staticmethod
65
+ def Crosscap(r=1, name='Crosscap'):
66
+ r"""
67
+ Return a crosscap surface, with parametrization.
68
+
69
+ .. MATH::
70
+
71
+ \begin{aligned}
72
+ x(u, v) & = r(1 + \cos(v)) \cos(u); \\
73
+ y(u, v) & = r(1 + \cos(v)) \sin(u); \\
74
+ z(u, v) & = - r\tanh(u - \pi) \sin(v).
75
+ \end{aligned}
76
+
77
+ INPUT:
78
+
79
+ - ``r`` -- surface parameter
80
+
81
+ - ``name`` -- string; name of the surface
82
+
83
+ For more information, see :wikipedia:`Cross-cap`.
84
+
85
+ EXAMPLES::
86
+
87
+ sage: crosscap = surfaces.Crosscap(); crosscap
88
+ Parametrized surface ('Crosscap') with equation ((cos(v) + 1)*cos(u), (cos(v) + 1)*sin(u), -sin(v)*tanh(-pi + u))
89
+ sage: crosscap.plot() # needs sage.plot
90
+ Graphics3d Object
91
+ """
92
+ u, v = var('u, v')
93
+ crosscap_eq = [r*(1+cos(v))*cos(u), r*(1+cos(v))*sin(u),
94
+ -tanh(u-pi)*r*sin(v)]
95
+ coords = ((u, 0, 2 * pi), (v, 0, 2 * pi))
96
+ return ParametrizedSurface3D(crosscap_eq, coords, name)
97
+
98
+ @staticmethod
99
+ def Dini(a=1, b=1, name="Dini's surface"):
100
+ r"""
101
+ Return Dini's surface, with parametrization.
102
+
103
+ .. MATH::
104
+
105
+ \begin{aligned}
106
+ x(u, v) & = a \cos(u)\sin(v); \\
107
+ y(u, v) & = a \sin(u)\sin(v); \\
108
+ z(u, v) & = u + \log(\tan(v/2)) + \cos(v).
109
+ \end{aligned}
110
+
111
+ INPUT:
112
+
113
+ - ``a``, ``b`` -- surface parameters
114
+
115
+ - ``name`` -- string; name of the surface
116
+
117
+ For more information, see :wikipedia:`Dini%27s_surface`.
118
+
119
+ EXAMPLES::
120
+
121
+ sage: dini = surfaces.Dini(a=3, b=4); dini
122
+ Parametrized surface ('Dini's surface') with equation (3*cos(u)*sin(v), 3*sin(u)*sin(v), 4*u + 3*cos(v) + 3*log(tan(1/2*v)))
123
+ sage: dini.plot() # needs sage.plot
124
+ Graphics3d Object
125
+ """
126
+ u, v = var('u, v')
127
+ dini_eq = [a*cos(u)*sin(v), a*sin(u)*sin(v),
128
+ a*(cos(v) + log(tan(v/2))) + b*u]
129
+ coords = ((u, 0, 2 * pi), (v, 0, 2 * pi))
130
+ return ParametrizedSurface3D(dini_eq, coords, name)
131
+
132
+ @staticmethod
133
+ def Ellipsoid(center=(0, 0, 0), axes=(1, 1, 1), name='Ellipsoid'):
134
+ r"""
135
+ Return an ellipsoid centered at ``center`` whose semi-principal axes
136
+ have lengths given by the components of ``axes``. The
137
+ parametrization of the ellipsoid is given by
138
+
139
+ .. MATH::
140
+
141
+ \begin{aligned}
142
+ x(u, v) & = x_0 + a \cos(u) \cos(v); \\
143
+ y(u, v) & = y_0 + b \sin(u) \cos(v); \\
144
+ z(u, v) & = z_0 + c \sin(v).
145
+ \end{aligned}
146
+
147
+ INPUT:
148
+
149
+ - ``center`` -- 3-tuple; coordinates of the center of the ellipsoid
150
+
151
+ - ``axes`` -- 3-tuple; lengths of the semi-principal axes
152
+
153
+ - ``name`` -- string; name of the ellipsoid
154
+
155
+ For more information, see :wikipedia:`Ellipsoid`.
156
+
157
+ EXAMPLES::
158
+
159
+ sage: ell = surfaces.Ellipsoid(axes=(1, 2, 3)); ell
160
+ Parametrized surface ('Ellipsoid') with equation (cos(u)*cos(v), 2*cos(v)*sin(u), 3*sin(v))
161
+ sage: ell.plot() # needs sage.plot
162
+ Graphics3d Object
163
+ """
164
+ u, v = var('u, v')
165
+ x, y, z = center
166
+ a, b, c = axes
167
+ ellipsoid_parametric_eq = [x + a*cos(u)*cos(v),
168
+ y + b*sin(u)*cos(v),
169
+ z + c*sin(v)]
170
+ coords = ((u, 0, 2 * pi), (v, -pi / 2, pi / 2))
171
+ return ParametrizedSurface3D(ellipsoid_parametric_eq, coords, name)
172
+
173
+ @staticmethod
174
+ def Enneper(name="Enneper's surface"):
175
+ r"""
176
+ Return Enneper's surface, with parametrization.
177
+
178
+ .. MATH::
179
+
180
+ \begin{aligned}
181
+ x(u, v) & = u(1 - u^2/3 + v^2)/3; \\
182
+ y(u, v) & = -v(1 - v^2/3 + u^2)/3; \\
183
+ z(u, v) & = (u^2 - v^2)/3.
184
+ \end{aligned}
185
+
186
+ INPUT:
187
+
188
+ - ``name`` -- string; name of the surface
189
+
190
+ For more information, see :wikipedia:`Enneper_surface`.
191
+
192
+ EXAMPLES::
193
+
194
+ sage: enn = surfaces.Enneper(); enn
195
+ Parametrized surface ('Enneper's surface') with equation (-1/9*(u^2 - 3*v^2 - 3)*u, -1/9*(3*u^2 - v^2 + 3)*v, 1/3*u^2 - 1/3*v^2)
196
+ sage: enn.plot() # needs sage.plot
197
+ Graphics3d Object
198
+ """
199
+ u, v = var('u, v')
200
+ enneper_eq = [u*(1-u**2/3+v**2)/3, -v*(1-v**2/3+u**2)/3, (u**2-v**2)/3]
201
+ coords = ((u, -3, 3), (v, -3, 3))
202
+ return ParametrizedSurface3D(enneper_eq, coords, name)
203
+
204
+ @staticmethod
205
+ def Helicoid(h=1, name='Helicoid'):
206
+ r"""
207
+ Return a helicoid surface, with parametrization.
208
+
209
+ .. MATH::
210
+
211
+ \begin{aligned}
212
+ x(\rho, \theta) & = \rho \cos(\theta); \\
213
+ y(\rho, \theta) & = \rho \sin(\theta); \\
214
+ z(\rho, \theta) & = h\theta/(2\pi).
215
+ \end{aligned}
216
+
217
+ INPUT:
218
+
219
+ - ``h`` -- distance along the z-axis between two
220
+ successive turns of the helicoid
221
+
222
+ - ``name`` -- string; name of the surface
223
+
224
+ For more information, see :wikipedia:`Helicoid`.
225
+
226
+ EXAMPLES::
227
+
228
+ sage: helicoid = surfaces.Helicoid(h=2); helicoid
229
+ Parametrized surface ('Helicoid') with equation (rho*cos(theta), rho*sin(theta), theta/pi)
230
+ sage: helicoid.plot() # needs sage.plot
231
+ Graphics3d Object
232
+ """
233
+ rho, theta = var('rho, theta')
234
+ helicoid_eq = [rho*cos(theta), rho*sin(theta), h*theta/(2*pi)]
235
+ coords = ((rho, -2, 2), (theta, 0, 2 * pi))
236
+ return ParametrizedSurface3D(helicoid_eq, coords, name)
237
+
238
+ @staticmethod
239
+ def Klein(r=1, name="Klein bottle"):
240
+ r"""
241
+ Return the Klein bottle, in the figure-8 parametrization given by
242
+
243
+ .. MATH::
244
+
245
+ \begin{aligned}
246
+ x(u, v) & = (r + \cos(u/2)\cos(v) - \sin(u/2)\sin(2v)) \cos(u); \\
247
+ y(u, v) & = (r + \cos(u/2)\cos(v) - \sin(u/2)\sin(2v)) \sin(u); \\
248
+ z(u, v) & = \sin(u/2)\cos(v) + \cos(u/2)\sin(2v).
249
+ \end{aligned}
250
+
251
+ INPUT:
252
+
253
+ - ``r`` -- radius of the "figure-8" circle
254
+
255
+ - ``name`` -- string; name of the surface
256
+
257
+ For more information, see :wikipedia:`Klein_bottle`.
258
+
259
+ EXAMPLES::
260
+
261
+ sage: klein = surfaces.Klein(); klein
262
+ Parametrized surface ('Klein bottle') with equation (-(sin(1/2*u)*sin(2*v) - cos(1/2*u)*sin(v) - 1)*cos(u), -(sin(1/2*u)*sin(2*v) - cos(1/2*u)*sin(v) - 1)*sin(u), cos(1/2*u)*sin(2*v) + sin(1/2*u)*sin(v))
263
+ sage: klein.plot() # needs sage.plot
264
+ Graphics3d Object
265
+ """
266
+ u, v = var('u, v')
267
+ x = (r + cos(u/2)*sin(v) - sin(u/2)*sin(2*v))*cos(u)
268
+ y = (r + cos(u/2)*sin(v) - sin(u/2)*sin(2*v))*sin(u)
269
+ z = sin(u/2)*sin(v) + cos(u/2)*sin(2*v)
270
+ klein_eq = [x, y, z]
271
+ coords = ((u, 0, 2 * pi), (v, 0, 2 * pi))
272
+
273
+ return ParametrizedSurface3D(klein_eq, coords, name)
274
+
275
+ @staticmethod
276
+ def MonkeySaddle(name="Monkey saddle"):
277
+ r"""
278
+ Return a monkey saddle surface, with equation
279
+
280
+ .. MATH::
281
+
282
+ z = x^3 - 3xy^2.
283
+
284
+ INPUT:
285
+
286
+ - ``name`` -- string; name of the surface
287
+
288
+ For more information, see :wikipedia:`Monkey_saddle`.
289
+
290
+ EXAMPLES::
291
+
292
+ sage: saddle = surfaces.MonkeySaddle(); saddle
293
+ Parametrized surface ('Monkey saddle') with equation (u, v, u^3 - 3*u*v^2)
294
+ sage: saddle.plot() # needs sage.plot
295
+ Graphics3d Object
296
+ """
297
+ u, v = var('u, v')
298
+ monkey_eq = [u, v, u**3 - 3*u*v**2]
299
+ coords = ((u, -2, 2), (v, -2, 2))
300
+
301
+ return ParametrizedSurface3D(monkey_eq, coords, name)
302
+
303
+ @staticmethod
304
+ def Paraboloid(a=1, b=1, c=1, elliptic=True, name=None):
305
+ r"""
306
+ Return a paraboloid with equation.
307
+
308
+ .. MATH::
309
+
310
+ \frac{z}{c} = \pm \frac{x^2}{a^2} + \frac{y^2}{b^2}
311
+
312
+ When the plus sign is selected, the paraboloid is elliptic. Otherwise
313
+ the surface is a hyperbolic paraboloid.
314
+
315
+ INPUT:
316
+
317
+ - ``a``, ``b``, ``c`` -- surface parameters
318
+
319
+ - ``elliptic`` -- boolean (default: ``True``); whether to create an
320
+ elliptic or hyperbolic paraboloid
321
+
322
+ - ``name`` -- string; name of the surface
323
+
324
+ For more information, see :wikipedia:`Paraboloid`.
325
+
326
+ EXAMPLES::
327
+
328
+ sage: epar = surfaces.Paraboloid(1, 3, 2); epar
329
+ Parametrized surface ('Elliptic paraboloid') with equation (u, v, 2*u^2 + 2/9*v^2)
330
+ sage: epar.plot() # needs sage.plot
331
+ Graphics3d Object
332
+
333
+ sage: hpar = surfaces.Paraboloid(2, 3, 1, elliptic=False); hpar
334
+ Parametrized surface ('Hyperbolic paraboloid') with equation (u, v, -1/4*u^2 + 1/9*v^2)
335
+ sage: hpar.plot() # needs sage.plot
336
+ Graphics3d Object
337
+ """
338
+ u, v = var('u, v')
339
+ x = u
340
+ y = v
341
+ if elliptic:
342
+ z = c*(v**2/b**2 + u**2/a**2)
343
+ else:
344
+ z = c*(v**2/b**2 - u**2/a**2)
345
+ paraboloid_eq = [x, y, z]
346
+ coords = ((u, -3, 3), (v, -3, 3))
347
+
348
+ if name is None:
349
+ if elliptic:
350
+ name = "Elliptic paraboloid"
351
+ else:
352
+ name = "Hyperbolic paraboloid"
353
+
354
+ return ParametrizedSurface3D(paraboloid_eq, coords, name)
355
+
356
+ @staticmethod
357
+ def Sphere(center=(0, 0, 0), R=1, name='Sphere'):
358
+ r"""
359
+ Return a sphere of radius ``R`` centered at ``center``.
360
+
361
+ INPUT:
362
+
363
+ - ``center`` -- 3-tuple; center of the sphere
364
+
365
+ - ``R`` -- radius of the sphere
366
+
367
+ - ``name`` -- string; name of the surface
368
+
369
+ For more information, see :wikipedia:`Sphere`.
370
+
371
+ EXAMPLES::
372
+
373
+ sage: sphere = surfaces.Sphere(center=(0, 1, -1), R=2); sphere
374
+ Parametrized surface ('Sphere') with equation (2*cos(u)*cos(v), 2*cos(v)*sin(u) + 1, 2*sin(v) - 1)
375
+ sage: sphere.plot() # needs sage.plot
376
+ Graphics3d Object
377
+
378
+ Note that the radius of the sphere can be negative. The surface thus
379
+ obtained is equal to the sphere (or part thereof) with positive radius,
380
+ whose coordinate functions have been multiplied by -1. Compare for
381
+ instant the first octant of the unit sphere with positive radius::
382
+
383
+ sage: octant1 = surfaces.Sphere(R=1); octant1
384
+ Parametrized surface ('Sphere') with equation (cos(u)*cos(v), cos(v)*sin(u), sin(v))
385
+ sage: octant1.plot((0, pi/2), (0, pi/2)) # needs sage.plot
386
+ Graphics3d Object
387
+
388
+ with the first octant of the unit sphere with negative radius::
389
+
390
+ sage: octant2 = surfaces.Sphere(R=-1); octant2
391
+ Parametrized surface ('Sphere') with equation (-cos(u)*cos(v), -cos(v)*sin(u), -sin(v))
392
+ sage: octant2.plot((0, pi/2), (0, pi/2)) # needs sage.plot
393
+ Graphics3d Object
394
+ """
395
+ return SurfaceGenerators.Ellipsoid(center, (R, R, R), name)
396
+
397
+ @staticmethod
398
+ def Torus(r=2, R=3, name='Torus'):
399
+ r"""
400
+ Return a torus obtained by revolving a circle of radius ``r`` around
401
+ a coplanar axis ``R`` units away from the center of the circle. The
402
+ parametrization used is
403
+
404
+ .. MATH::
405
+
406
+ \begin{aligned}
407
+ x(u, v) & = (R + r \cos(v)) \cos(u); \\
408
+ y(u, v) & = (R + r \cos(v)) \sin(u); \\
409
+ z(u, v) & = r \sin(v).
410
+ \end{aligned}
411
+
412
+ INPUT:
413
+
414
+ - ``r``, ``R`` -- minor and major radius of the torus
415
+
416
+ - ``name`` -- string; name of the surface
417
+
418
+ For more information, see :wikipedia:`Torus`.
419
+
420
+ EXAMPLES::
421
+
422
+ sage: torus = surfaces.Torus(); torus
423
+ Parametrized surface ('Torus') with equation ((2*cos(v) + 3)*cos(u), (2*cos(v) + 3)*sin(u), 2*sin(v))
424
+ sage: torus.plot() # needs sage.plot
425
+ Graphics3d Object
426
+ """
427
+ u, v = var('u, v')
428
+ torus_eq = [(R+r*cos(v))*cos(u), (R+r*cos(v))*sin(u), r*sin(v)]
429
+ coords = ((u, 0, 2 * pi), (v, 0, 2 * pi))
430
+ return ParametrizedSurface3D(torus_eq, coords, name)
431
+
432
+ @staticmethod
433
+ def WhitneyUmbrella(name="Whitney's umbrella"):
434
+ r"""
435
+ Return Whitney's umbrella, with parametric representation
436
+
437
+ .. MATH::
438
+
439
+ x(u, v) = uv, \quad y(u, v) = u, \quad z(u, v) = v^2.
440
+
441
+ INPUT:
442
+
443
+ - ``name`` -- string; name of the surface
444
+
445
+ For more information, see :wikipedia:`Whitney_umbrella`.
446
+
447
+ EXAMPLES::
448
+
449
+ sage: whitney = surfaces.WhitneyUmbrella(); whitney
450
+ Parametrized surface ('Whitney's umbrella') with equation (u*v, u, v^2)
451
+ sage: whitney.plot() # needs sage.plot
452
+ Graphics3d Object
453
+ """
454
+ u, v = var('u, v')
455
+ whitney_eq = [u*v, u, v**2]
456
+ coords = ((u, -1, 1), (v, -1, 1))
457
+ return ParametrizedSurface3D(whitney_eq, coords, name)
458
+
459
+
460
+ # Easy access to the surface generators
461
+ surfaces = SurfaceGenerators()
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-symbolics