Re: [sage-support] Re: arrows in 3d field plots
>> Now to try to track down how to set jmol parameters in a web page... I've given up for now on using Sage for this project, as it turns out that Geogebra can accomplish what I need out of the box. For reference, the resulting webpage is: http://math.oregonstate.edu/bridge/ideas/fields Happy to revisit this choice as we start to port these applets into our online book over the next couple of years. Thanks to all for their suggestions. Tevian -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: arrows in 3d field plots
> Hopefully, some day threejs will replace jmol as the default 3d viewer: > https://trac.sagemath.org/ticket/22408 Good, although I reiterate that it does not appear to respect the orientation flag. > Meanwhile, you can define a subdomain of E, U say, where the vector field > is everywhere regular and plot the restriction of the vector field to U. > For your example, U can be E minus the disk x^2+y^2 <= 0.01: ... Yes, that works perfectly; thank you. Now to try to track down how to set jmol parameters in a web page... Tevian -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: arrows in 3d field plots
Le jeudi 31 janvier 2019 06:52:10 UTC+1, Tevian Dray a écrit : > > >> You can use the plot functionality of vector fields on > >> Euclidean spaces to get better arrowheads: > > OK; I can get jmol to work with some browsers, although it is painfully > slow. But the results are very nice. > > Hopefully, some day threejs will replace jmol as the default 3d viewer: https://trac.sagemath.org/ticket/22408 > Finally, is there a simple mechanism to enable Sage to plot vector fields > with singularities, such as a pole at the origin? I've had no luck yet > trying to plot something like: > E.vector_field((-y/(x^2+y^2),x/(x^2+y^2))) > I've tried piecing together nonsingular domains, although I'm possibly not > doing it correctly. But there is surely a more elegant solution, such as > cutting off the vector field at some maximum magnitude. > The cut off should definitely be added to the plot method of vector fields, among many other improvements to be done... Meanwhile, you can define a subdomain of E, U say, where the vector field is everywhere regular and plot the restriction of the vector field to U. For your example, U can be E minus the disk x^2+y^2 <= 0.01: sage: E. = EuclideanSpace() sage: v = E.vector_field((-y/(x^2+y^2),x/(x^2+y^2))) sage: U = E.open_subset('U', coord_def={E.cartesian_coordinates(): x^2+y^2>0.01}) sage: v.restrict(U).plot(max_range=1, scale=0.2) In the above code, "coord_def" stands for the coordinate definition of the open subset U and "v.restrict(U)" is the restriction of v to U. Best wishes, Eric. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: arrows in 3d field plots
>> You can use the plot functionality of vector fields on >> Euclidean spaces to get better arrowheads: OK; I can get jmol to work with some browsers, although it is painfully slow. But the results are very nice. >> And is there a way to disable the perspective view? >> I want the 2d-view seen from above to look like a with the >> 2d vector field, arrows sitting exactly on top of each other; >> the perspective tries to show them all. I reported this issue with threejs, but it's also present with jmol. Yes, it's possible to eliminate the perspective view interactively, by right-clicking, and unchecking "Perspective Depth" in the Style menu. But I'd like to place these images in final form on a webpage, so I'm looking for a way to encode jmol settings in either Sage or HTML. Is this possible? Finally, is there a simple mechanism to enable Sage to plot vector fields with singularities, such as a pole at the origin? I've had no luck yet trying to plot something like: E.vector_field((-y/(x^2+y^2),x/(x^2+y^2))) I've tried piecing together nonsingular domains, although I'm possibly not doing it correctly. But there is surely a more elegant solution, such as cutting off the vector field at some maximum magnitude. Thanks, Tevian -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: arrows in 3d field plots
>> You can use the plot functionality of vector fields on Euclidean >> spaces to get better arrowheads: Excellent! Thank you! >> You may also replace the last line by >> sage: show(xy, orientation=(0,0,0,0), viewer='threejs') Yes, I had to do that -- jmol froze my browser. I haven't had a chance yet to debug that problem, nor to experiment with parameters. But threejs unfortunately appears to ignore the orientation parameter, which defeats the purpose. And is there a way to disable the perspective view? I want the 2d-view seen from above to look like a 2d vector field, with the arrows sitting exactly on top of each other; the perspective tries to show them all. Again, I haven't had a chance yet myself to debug or explore parameters... Thanks again, Tevian -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.