passagemath-plot 10.6.31rc3__cp314-cp314-macosx_13_0_arm64.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-plot might be problematic. Click here for more details.

Files changed (82) hide show
  1. passagemath_plot-10.6.31rc3.dist-info/METADATA +172 -0
  2. passagemath_plot-10.6.31rc3.dist-info/RECORD +82 -0
  3. passagemath_plot-10.6.31rc3.dist-info/WHEEL +6 -0
  4. passagemath_plot-10.6.31rc3.dist-info/top_level.txt +2 -0
  5. passagemath_plot.dylibs/libgfortran.5.dylib +0 -0
  6. passagemath_plot.dylibs/libgsl.28.dylib +0 -0
  7. passagemath_plot.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  8. passagemath_plot.dylibs/libquadmath.0.dylib +0 -0
  9. sage/all__sagemath_plot.py +15 -0
  10. sage/ext_data/threejs/animation.css +195 -0
  11. sage/ext_data/threejs/animation.html +85 -0
  12. sage/ext_data/threejs/animation.js +273 -0
  13. sage/ext_data/threejs/fat_lines.js +48 -0
  14. sage/ext_data/threejs/threejs-version.txt +1 -0
  15. sage/ext_data/threejs/threejs_template.html +597 -0
  16. sage/interfaces/all__sagemath_plot.py +1 -0
  17. sage/interfaces/gnuplot.py +196 -0
  18. sage/interfaces/jmoldata.py +208 -0
  19. sage/interfaces/povray.py +56 -0
  20. sage/plot/all.py +42 -0
  21. sage/plot/animate.py +1796 -0
  22. sage/plot/arc.py +504 -0
  23. sage/plot/arrow.py +671 -0
  24. sage/plot/bar_chart.py +205 -0
  25. sage/plot/bezier_path.py +400 -0
  26. sage/plot/circle.py +435 -0
  27. sage/plot/colors.py +1606 -0
  28. sage/plot/complex_plot.cpython-314-darwin.so +0 -0
  29. sage/plot/complex_plot.pyx +1446 -0
  30. sage/plot/contour_plot.py +1792 -0
  31. sage/plot/density_plot.py +318 -0
  32. sage/plot/disk.py +373 -0
  33. sage/plot/ellipse.py +375 -0
  34. sage/plot/graphics.py +3580 -0
  35. sage/plot/histogram.py +354 -0
  36. sage/plot/hyperbolic_arc.py +404 -0
  37. sage/plot/hyperbolic_polygon.py +416 -0
  38. sage/plot/hyperbolic_regular_polygon.py +296 -0
  39. sage/plot/line.py +626 -0
  40. sage/plot/matrix_plot.py +629 -0
  41. sage/plot/misc.py +509 -0
  42. sage/plot/multigraphics.py +1294 -0
  43. sage/plot/plot.py +4183 -0
  44. sage/plot/plot3d/all.py +23 -0
  45. sage/plot/plot3d/base.cpython-314-darwin.so +0 -0
  46. sage/plot/plot3d/base.pxd +12 -0
  47. sage/plot/plot3d/base.pyx +3378 -0
  48. sage/plot/plot3d/implicit_plot3d.py +659 -0
  49. sage/plot/plot3d/implicit_surface.cpython-314-darwin.so +0 -0
  50. sage/plot/plot3d/implicit_surface.pyx +1453 -0
  51. sage/plot/plot3d/index_face_set.cpython-314-darwin.so +0 -0
  52. sage/plot/plot3d/index_face_set.pxd +32 -0
  53. sage/plot/plot3d/index_face_set.pyx +1873 -0
  54. sage/plot/plot3d/introduction.py +131 -0
  55. sage/plot/plot3d/list_plot3d.py +649 -0
  56. sage/plot/plot3d/parametric_plot3d.py +1130 -0
  57. sage/plot/plot3d/parametric_surface.cpython-314-darwin.so +0 -0
  58. sage/plot/plot3d/parametric_surface.pxd +12 -0
  59. sage/plot/plot3d/parametric_surface.pyx +893 -0
  60. sage/plot/plot3d/platonic.py +601 -0
  61. sage/plot/plot3d/plot3d.py +1442 -0
  62. sage/plot/plot3d/plot_field3d.py +162 -0
  63. sage/plot/plot3d/point_c.pxi +148 -0
  64. sage/plot/plot3d/revolution_plot3d.py +309 -0
  65. sage/plot/plot3d/shapes.cpython-314-darwin.so +0 -0
  66. sage/plot/plot3d/shapes.pxd +22 -0
  67. sage/plot/plot3d/shapes.pyx +1382 -0
  68. sage/plot/plot3d/shapes2.py +1512 -0
  69. sage/plot/plot3d/tachyon.py +1779 -0
  70. sage/plot/plot3d/texture.py +453 -0
  71. sage/plot/plot3d/transform.cpython-314-darwin.so +0 -0
  72. sage/plot/plot3d/transform.pxd +21 -0
  73. sage/plot/plot3d/transform.pyx +268 -0
  74. sage/plot/plot3d/tri_plot.py +589 -0
  75. sage/plot/plot_field.py +362 -0
  76. sage/plot/point.py +624 -0
  77. sage/plot/polygon.py +562 -0
  78. sage/plot/primitive.py +249 -0
  79. sage/plot/scatter_plot.py +199 -0
  80. sage/plot/step.py +85 -0
  81. sage/plot/streamline_plot.py +328 -0
  82. sage/plot/text.py +432 -0
@@ -0,0 +1,273 @@
1
+ // animation.js
2
+
3
+ window.updateAnimation = (function() {
4
+
5
+ var frameDuration = options.delay;
6
+ var frameCount, totalDuration;
7
+ var mixer, action, clock;
8
+ var ui, slider;
9
+
10
+ init();
11
+ options.animationControls && initUI();
12
+ options.autoPlay && play();
13
+ return update;
14
+
15
+ function init() {
16
+
17
+ var frames = partitionScene();
18
+ frameCount = frames.length;
19
+ totalDuration = frameCount * frameDuration;
20
+
21
+ var tracks = createTracks( frames );
22
+ var clip = new THREE.AnimationClip( 'sage_animation', totalDuration, tracks );
23
+
24
+ mixer = new THREE.AnimationMixer( scene );
25
+ mixer.addEventListener( 'finished', function() { pause(); } );
26
+
27
+ action = mixer.clipAction( clip );
28
+ action.timeScale = 100; // Our times are in hundredths of a second.
29
+ action.clampWhenFinished = true; // Sets paused=true instead of disabling.
30
+ action.loop = options.loop ? THREE.LoopRepeat : THREE.LoopOnce;
31
+
32
+ // We start/stop the clock to play/pause. The action's `paused` property
33
+ // is instead used to determine if the animation has finished.
34
+ action.play();
35
+
36
+ clock = new THREE.Clock( false ); // Don't start playing yet.
37
+
38
+ }
39
+
40
+ // Group objects in by keyframe. The result is a potentially sparse list of
41
+ // lists of objects. Assumes keyframe index specified in objects' user data.
42
+ function partitionScene() {
43
+ var frames = [];
44
+ for ( var i=0 ; i < scene.children.length ; i++) {
45
+ var obj = scene.children[i];
46
+ var k = obj.userData && parseInt( obj.userData.keyframe );
47
+ if ( k >= 0 ){
48
+ if ( k in frames ) frames[k].push( obj );
49
+ else frames[k] = [obj];
50
+ }
51
+ }
52
+ return frames;
53
+ }
54
+
55
+ // Create and return a list of keyframe tracks to animate objects'
56
+ // visibility depending on which keyframe they appear in.
57
+ function createTracks( frames ) {
58
+ var tracks = [];
59
+ for ( var keyframe=0 ; keyframe < frames.length ; keyframe++ ) {
60
+ var frame = frames[keyframe];
61
+ if ( frame ) {
62
+ // Show during the frame.
63
+ var times = [keyframe * frameDuration];
64
+ var values = [true];
65
+ // For all but the first frame, start off hidden.
66
+ if ( keyframe > 0 ) {
67
+ times.unshift( 0 );
68
+ values.unshift( false );
69
+ }
70
+ // For all but the last frame, end up hidden.
71
+ if ( keyframe < frames.length - 1 ) {
72
+ times.push( ( keyframe + 1 ) * frameDuration );
73
+ values.push( false );
74
+ }
75
+ for ( var i=0; i < frame.length ; i++ ) {
76
+ var binding = frame[i].uuid + '.visible';
77
+ var track = new THREE.BooleanKeyframeTrack( binding, times, values );
78
+ tracks.push( track );
79
+ }
80
+ }
81
+ }
82
+ return tracks;
83
+ }
84
+
85
+ function initUI() {
86
+
87
+ ui = document.getElementById( 'animation-ui' );
88
+
89
+ initSlider();
90
+
91
+ hookupButton( 'play-pause', togglePlayback );
92
+ hookupButton( 'previous', gotoPreviousFrame );
93
+ hookupButton( 'next', gotoNextFrame );
94
+ hookupButton( 'slower', slowDown );
95
+ hookupButton( 'faster', speedUp );
96
+ hookupButton( 'toggle-loop', toggleLooping );
97
+
98
+ function hookupButton( _class, onclick ) {
99
+ var button = ui.getElementsByClassName( _class )[0];
100
+ button.addEventListener( 'click', onclick );
101
+ return button;
102
+ }
103
+
104
+ }
105
+
106
+ function initSlider() {
107
+
108
+ slider = ui.getElementsByClassName( 'slider' )[0];
109
+ slider.value = action.time;
110
+ slider.setAttribute( 'max', totalDuration );
111
+ slider.addEventListener( 'change', change );
112
+ slider.addEventListener( 'input', change );
113
+ slider.addEventListener( 'mousedown', mousedown );
114
+ slider.addEventListener( 'mouseup', mouseup );
115
+ slider.addEventListener( 'keydown', keydown );
116
+
117
+ function change() {
118
+ // Keep animation in sync with position of the knob.
119
+ seek( parseFloat( slider.value ) );
120
+ }
121
+
122
+ // Temporarily pause playback while the knob is being dragged around.
123
+ var dragging = false;
124
+ var wasPlaying = false;
125
+ function mousedown( event ) {
126
+ if ( event.button === 0 && !dragging ) {
127
+ dragging = true;
128
+ wasPlaying = isPlaying();
129
+ pause();
130
+ }
131
+ }
132
+ function mouseup( event ) {
133
+ if ( event.button === 0 && dragging ) {
134
+ dragging = false;
135
+ if ( wasPlaying && !isFinished() ) play();
136
+ }
137
+ }
138
+
139
+ function keydown( event ) {
140
+ switch ( event.key ) {
141
+ // Toggle playback using spacebar/enter.
142
+ case ' ':
143
+ case 'Enter':
144
+ if ( !event.repeat ) {
145
+ togglePlayback();
146
+ event.preventDefault();
147
+ }
148
+ break;
149
+ // Adjust speed using up/down arrows.
150
+ case 'Down':
151
+ case 'ArrowDown':
152
+ slowDown();
153
+ event.preventDefault();
154
+ break;
155
+ case 'Up':
156
+ case 'ArrowUp':
157
+ speedUp();
158
+ event.preventDefault();
159
+ break;
160
+ // Navigate frame-by-frame using left/right arrows.
161
+ case 'Left':
162
+ case 'ArrowLeft':
163
+ gotoPreviousFrame();
164
+ event.preventDefault();
165
+ break;
166
+ case 'Right':
167
+ case 'ArrowRight':
168
+ gotoNextFrame();
169
+ event.preventDefault();
170
+ break;
171
+ }
172
+ }
173
+
174
+ }
175
+
176
+ function isPlaying() {
177
+ return clock.running;
178
+ }
179
+
180
+ function isFinished() {
181
+ return action.paused;
182
+ }
183
+
184
+ function play() {
185
+ if ( isFinished() ) action.reset(); // Return to the beginning.
186
+ clock.start();
187
+ updateUI();
188
+ requestAnimationFrame( render ); // Re-enter render loop.
189
+ }
190
+
191
+ function pause() {
192
+ clock.stop();
193
+ updateUI();
194
+ }
195
+
196
+ function togglePlayback() {
197
+ isPlaying() ? pause() : play();
198
+ }
199
+
200
+ function seek( time ) {
201
+
202
+ // Ensure time is in range: [0, totalDuration].
203
+ time = Math.max( 0, Math.min( totalDuration, time ) );
204
+ action.time = time;
205
+
206
+ // Make sure the animation is treated as finished if set to the very
207
+ // end of the animation.
208
+ action.paused = ( !isLooping() && time == totalDuration );
209
+
210
+ updateUI();
211
+
212
+ if ( !isPlaying() ) {
213
+ // Ensure the animation gets re-rendered at the new position.
214
+ requestAnimationFrame( render ); // Trigger a re-render.
215
+ }
216
+
217
+ }
218
+
219
+ function moveKeyframes( delta ) {
220
+ var keyframe = Math.floor( action.time / frameDuration );
221
+ keyframe += delta;
222
+ // Ensure keyframe is in range: [0, frameCount].
223
+ keyframe = Math.max( 0, Math.min( frameCount, keyframe ) );
224
+ seek( keyframe * frameDuration );
225
+ }
226
+
227
+ function gotoPreviousFrame() {
228
+ pause();
229
+ moveKeyframes( -1 );
230
+ }
231
+
232
+ function gotoNextFrame() {
233
+ pause();
234
+ moveKeyframes( +1 );
235
+ }
236
+
237
+ function speedUp() {
238
+ action.timeScale *= 1.25;
239
+ }
240
+
241
+ function slowDown() {
242
+ action.timeScale /= 1.25;
243
+ }
244
+
245
+ function isLooping() {
246
+ return action.loop === THREE.LoopRepeat;
247
+ }
248
+
249
+ function setLooping( looping ) {
250
+ action.loop = looping ? THREE.LoopRepeat : THREE.LoopOnce;
251
+ updateUI();
252
+ }
253
+
254
+ function toggleLooping() {
255
+ setLooping( !isLooping() );
256
+ }
257
+
258
+ function update() {
259
+ mixer.update( clock.getDelta() );
260
+ updateUI();
261
+ return clock.running; // Should exit render loop if false.
262
+ }
263
+
264
+ function updateUI() {
265
+ if ( ui ) {
266
+ ui.classList.remove( 'playing', 'paused', 'once', 'loop' );
267
+ ui.classList.add( isPlaying() ? 'playing' : 'paused' );
268
+ ui.classList.add( isLooping() ? 'loop' : 'once' );
269
+ }
270
+ if ( slider ) slider.value = action.time;
271
+ }
272
+
273
+ })();
@@ -0,0 +1,48 @@
1
+ // fat_lines.js
2
+
3
+ var _fatLines = [];
4
+
5
+ function _createFatLine( lineStrip, geometry, materialOptions ) {
6
+
7
+ var vertexCount = geometry.vertices.length;
8
+ var positions = [];
9
+ for ( var i=0 ; i < vertexCount ; i++ ) {
10
+ var v = geometry.vertices[i];
11
+ positions.push( v.x, v.y, v.z );
12
+ // For a line strip, duplicate all but the first and last vertices.
13
+ if ( lineStrip && i > 0 && i < vertexCount - 1 ) {
14
+ positions.push( v.x, v.y, v.z );
15
+ }
16
+ }
17
+
18
+ geometry = new THREE.LineSegmentsGeometry();
19
+ geometry.setPositions( positions );
20
+
21
+ var material = new THREE.LineMaterial( materialOptions );
22
+ material.resolution = new THREE.Vector2( window.innerWidth, window.innerHeight );
23
+
24
+ var line = new THREE.LineSegments2( geometry, material );
25
+ line.computeLineDistances();
26
+ line.scale.set( 1, 1, 1 );
27
+
28
+ _fatLines.push( line );
29
+
30
+ return line;
31
+
32
+ }
33
+
34
+ function createFatLineStrip( geometry, materialOptions ) {
35
+ return _createFatLine( true, geometry, materialOptions );
36
+ }
37
+
38
+ function createFatLineSegments( geometry, materialOptions ) {
39
+ return _createFatLine( false, geometry, materialOptions );
40
+ }
41
+
42
+ function rescaleFatLines() {
43
+ var res = new THREE.Vector2( window.innerWidth, window.innerHeight );
44
+ var n = _fatLines.length;
45
+ for ( var i=0 ; i < n ; i++ ) {
46
+ _fatLines[i].material.resolution = res;
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ r122