2021-10-24 20:50:08 +0100 | received badge | ● Famous Question (source) |

2020-10-04 07:26:12 +0100 | received badge | ● Notable Question (source) |

2020-07-20 20:46:25 +0100 | received badge | ● Notable Question (source) |

2020-03-14 19:54:48 +0100 | received badge | ● Popular Question (source) |

2020-01-07 12:50:17 +0100 | received badge | ● Popular Question (source) |

2020-01-07 12:50:17 +0100 | received badge | ● Notable Question (source) |

2018-10-19 00:26:35 +0100 | received badge | ● Popular Question (source) |

2018-04-20 15:56:46 +0100 | received badge | ● Popular Question (source) |

2016-11-12 20:01:37 +0100 | commented answer | Parametric plot with piecewise input Works, thanks! |

2016-11-12 20:01:25 +0100 | received badge | ● Supporter (source) |

2016-11-04 09:01:38 +0100 | received badge | ● Nice Question (source) |

2016-11-03 20:33:56 +0100 | asked a question | Parametric plot with piecewise input I'm trying to plot a parametric function, which is defined piecewise. For some reason, the plot just jumps to the last piece of the parametric function and plots that. Here's what I want to plot. It just returns a straight line of length 4 |

2015-11-22 23:34:58 +0100 | asked a question | Suggestions for improving speed I'm working on visualizing a flow in R^3, and specifically focusing on how the flow behaves near a torus on inner radius 1 and outer radius 2, centered at the origin. The idea is to take a point (x,y,z), and look at this point using coordinates (r,z), in the plane containing (x,y,z) and the origin. Then I take equations in polar coordinates in this plane, and apply them to the point. Moving back into R^3, I take a rotation of the point, and add in the result of the flow restricted to the plane. Most of these conditions also require that I know the minimum distance from (x,y,z) to the torus mentioned. This is taking a very long time, especially when I try to animate the flow. The last animation I tried took 20 hours, and that was before I found a flaw in the construction. This one works, but I'm hoping to optimize it before I try it again. Any suggestions on how to speed things up would be appreciated. (more) |

2015-09-17 22:17:14 +0100 | received badge | ● Self-Learner (source) |

2015-09-17 22:17:14 +0100 | received badge | ● Teacher (source) |

2015-09-17 13:32:50 +0100 | answered a question | Restricting vector field to a subset of a rectangular region Figured it out. |

2015-09-14 22:01:05 +0100 | asked a question | Restricting vector field to a subset of a rectangular region I'm trying to restrict a vector field plot to a specific region of the plane. I found the code for the plot_vector_field3d function online, and just modified that accordingly, but I'm having trouble with the 2d case. plot_vector_field always picks points in a rectangular region, but there's a part of the region I want to skip. Here's what I have so far. I'm not able to upload an image file, but if you run this, I'm trying to get rid of all of the vectors within the circle. For comparison, here's the working code in 3d. This generates a flow on a torus, with the vectors only coming from points on or in the torus, instead of the usual plot_vector_field3d, which puts the points on an entire cube. dx, dy, and dz are the functions that give the correct vector components. |

2015-08-08 13:57:41 +0100 | asked a question | Efficiently computing the distance from a point to a set I'm working on a 3d vector field, where the derivative at each point is determined by a series, and each term of the series requires computing the distance from the point to a torus. Right now I'm only using 2-3 tori, and am discretizing each one, then computing a list of distances and taking the minimum. This is taking a really long time to run, and still isn't giving me the accuracy I need. Is there any way to improve efficiency in something like this? The tori are defined via parametric equations, changing for each torus, and with moving centers. Let
c(n) = 2/3 For every non-negative integer n, i,j in the range (0,2*pi), and k in {1/10, 2/10,...,9/10,1}, T_n is given by if n is even and if n is odd. So far, I've been discretizing the tori using these equations, computing a list of Euclidean distances, and taking the minimum. Here's the full equations for determining the vector field. First, I make a list of points for each torus. For any p = (x,y,z) in R^3, define a sequence of functions, with Additionally, define if n is even and if n is odd. Finally, for each point p in R^3, the derivative at p is given by over all non-negative integers n. So far I've been restricting myself to the n = 0,1,2 case, but even then, I generally can't get the field to display unless I make the discretization really large, and that doesn't show the detail I need to help me find out where the alpha and omega limit sets are. I'm not having any problems writing the code that will make these calculations, I'm just wondering if there is a more efficient way, rather than taking a list of points for the torus, and just computing the minimum over and over again. |

2015-08-05 23:21:24 +0100 | answered a question | plot_vector_field returning blank screen I figured something out, using a manual grid, and scaling the drawn arrows appropriately. I also modified it so any level set between z = -1 and z = 1 will work. Thank you for the help with cleaning up the code! |

2015-08-04 16:19:19 +0100 | commented answer | plot_vector_field returning blank screen I've added revisions above to clarify. I think I can get away without discretizing the circles for now, but I'll need to go back to it when I work out the 3d case. The point of getting a picture of this level set is to try and figure out the alpha and omega limit sets of the various trajectories in the 3d case. |

2015-08-03 21:41:37 +0100 | asked a question | plot_vector_field returning blank screen I'm working on the level set at z=0 of a complicated vector field, but I only get a blank screen each time I try to run it. Any thoughts? The functions I'm calling for the vector field seem to return non-zero values on their own, but nothing appears when I ask for the plot. This is actually a small part of a level set for a flow on all of R^3. In R^3, I take an infinite sequence of nested tori, and the differential equation at each point is described by an infinite series, with each term having a coefficient determined by the distance from that point to each torus in the space. c1 and c3 represent the inner and outer radii of the first torus. c4 represents the boundary of the second torus, which is 4 times as large as the first, and rotated from the xy-plane to the yz-plane, and completely contains the first torus. So that's why I'd discretized everything, since I'd already done that for the torus case, and was just trying to scale down. If I call the region between c1 and c3 T0, then h0(x,y) should return the minimum of 1 and 1-d((x,y),T0). If I call the union of the region inside of c1 and the region between c3 and c4 T1, then h1(x,y) should return the minimum of 1, d((x,y),T0) and 1-d((x,y),T1). (more) |

2015-06-15 19:34:59 +0100 | asked a question | Data type error when constructing a vector field I'm trying to get a 3d vector field, using a smooth bump function, and I keep getting this error. I've searched around and can't figure out what the issue is. Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_26.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# - File "/private/var/folders/hs/vjm81xg9127bn9_6d1c4fp5w37f6j0/T/tmpTVrC6O/___code___.py", line 3, in <module> exec compile(u'plot_vector_field3d((Y1_0, Y1_1, Y1_2),(x,_sage_const_0 ,_sage_const_2 *pi),(y,-_sage_const_1 ,_sage_const_1 ),(z,-_sage_const_1 ,_sage_const_1 ),plot_points=_sage_const_15 ) File "", line 1, in <module> File "/Applications/Sage-6.1.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/plot/plot3d/plot_field3d.py", line 90, in plot_vector_field3d return sum([plot(v,color=cm(v.norm()),**kwds).translate(p) for v,p in zip(scaled_vectors, points)]) File "/Applications/Sage-6.1.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/matplotlib/colors.py", line 589, in __call__ lut.take(xa, axis=0, mode='clip', out=rgba) TypeError: Cannot cast array data from dtype('O') to dtype('int64') according to the rule 'safe' |

2015-06-09 00:11:40 +0100 | commented answer | Unscaled arrows in a vector field That's working, thanks! |

2015-06-09 00:11:31 +0100 | received badge | ● Scholar (source) |

2015-06-08 23:31:35 +0100 | received badge | ● Student (source) |

2015-06-08 19:43:19 +0100 | received badge | ● Editor (source) |

2015-06-08 19:36:17 +0100 | asked a question | Unscaled arrows in a vector field I have a vector field I'm plotting, but the arrows are scaled so small near the singular points, it's unclear which are sinks, sources, and saddles. Is there a way to change the arrow scaling so they are all the same length and the behavior is clearer? |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.