User talk:Geek3/VectorFieldPlot

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Adding the source

[edit]

Heyho Geek3,

this is really a great work! I would like to have the source code for the specific pictures (parameters, etc.) on their individual picture description pages, just for the sake of completeness. Anyway, fantastic artwork! :-) --Sven (talk) 15:33, 5 December 2010 (UTC)[reply]

Dear Sven, thanks for your comment. Every of the pictures should have the source code with it already! If this is not always the case, let me know!! Geek3 (talk) 22:02, 4 November 2013 (UTC)[reply]

publish on PyPi?

[edit]

Hi Geek3,

I really like VectorFieldPlot. The images look great!

If somebody wants to use VectorFieldPlot, he has to copy the code from the wikipedia page. It would be easier to use it, if it would be available on PyPi.

Regards Michael — Preceding unsigned comment was added by 2A02:6D40:3401:CB01:9DB2:D585:7361:F43C (talk) 20:56, 21 October 2019 (UTC)[reply]

streamlines in case of current loops

[edit]

Dear Geek3,

please emphasize that your great pictures are mainly meant "to guide the eye" and not to provide measurable physical quantities.

I've just downloaded your VFPt-Code and the addendum for producing the streamlines plot for a Helmholtz coil and checked the results against my Fortran code. VFPt's streamlines are indeed correct streamlines. But in physics, the local density of streamlines is usually meant to be proportional to the local magnitude of the field, which is not true in case of VFPts streamlines.

The magnetic field of plane circular current loops can be determined in a computationally very fast manner by starting with an analytical expression of the vector potential A instead of numerically integrating Biot-Savart's theorem... As you can find in many books on electrodynamics, outside the sources you have B = rot A. Now find a scalar potential p with grad p perpendicular to rot A. Than the contour lines of p are the streamlines of B. In case of planar circular current loops, basically all functions of rho*A_phi do the job, but normalising in order to have the norm of B equalling the norm of grad p yields p=sqrt(2*rho*A_phi) (I know that trick from Landau & Lifschitz, Elektrodynamik der Kontinua, 1930, in German). Try it!

Regards Drgst (talk) 08:15, 15 December 2010 (UTC)[reply]

Dear Drgst, thanks for your comment!
You are right about the relationship of line density to actual field strength. It is not exactly proportional in all the images and it cannot be except when the configuration is perfectly symmetric in z-direction. I tried my best to find suitable compromises for the field line density so they are a good guide to the eye as much as possible. But I don't see any danger of someone trying to measure the line density and trying to derive physical quantities from it.
For your second comment I'm not sure how I can simply find a scalar potential with grad p perpendicular to rot A numerically. Integrating Biot-Savart's theorem on the contrary is straightforward, simple and correct, there is nothing else I need. Geek3 (talk) 22:11, 4 November 2013 (UTC)[reply]

Integration boundary exceeded errors

[edit]

I really like the potential (no pun intended) of this software to generate useful vector field plots of charge configurations.

I was trying to modify the VFPt charges plus minus thumb code to plot the field of two plus charges. Only half of the field was drawn correctly, the other half was blank. Additionally, I got 16 (n=16) Integration boundary at ____ exceeded errors. I'm not really sure what the proper approach to get around this is. I tried different start_v and start_d parameters, but nothing that I tried was any better.

Take a look at File:VFPt_charges_plus_plus.svg. start_p is indeed what you need to modify to have lines on both sides of the image. The integration boundary exceeded error means that despite the filedlines go to infinity the program will not follow it all the way... Geek3 (talk) 22:17, 4 November 2013 (UTC)[reply]

field lines

[edit]

Thx for images and program. I'm not sure, but I suppose it is for vector fields ? Can it be used with field lines of Julia sets / external rays ? Regards. --Adam majewski (talk) 19:22, 14 May 2011 (UTC)[reply]

Dear Adam, I don't think VectorFieldPlot is well suited for Julia sets. They are based on discrete and highly nonlinear equations whereas VectorFieldPlot works out smooth vector fields as created by Maxwells equations. There are probably better choices. Geek3 (talk) 22:20, 4 November 2013 (UTC)[reply]
Dear Geek3. Is it possible that VectorFieldPlot will taka as an input array of numerical values not an equations ? --Adam majewski (talk) 05:09, 29 September 2019 (UTC)[reply]

Category:Images including source code in their description

[edit]

Hi. Your images made with vectorFiledPlot have source code. Do you think that ther should be category images with Python source code or upper category Category:Images including source code in their description ? Regards --Adam majewski (talk) 17:42, 10 March 2012 (UTC)[reply]

Dear Adam, I think they should be in the Python source code category. They are in fact created from python. A subcategory of their own can be considered. Geek3 (talk) 22:23, 4 November 2013 (UTC)[reply]

python version

[edit]

Is there any version that works with python 3.4? Svjo (talk) 02:07, 28 November 2015 (UTC)[reply]

New image

[edit]

Hi. I try to make image of vector field , like in http://arxiv.org/pdf/1506.07120v1.pdf image 1.b. How can I do it with vector field ? ( I can run script and create example image and I know that re(z^3) = x^3-3*x*y^2 and im(z^3) = 3*y*x^2-y^3. TIA --Adam majewski (talk) 22:03, 16 February 2016 (UTC)[reply]

Bug/Error in Field Line Direction

[edit]

There must be an error in the calculation of the field lines. Look at https://commons.wikimedia.org/wiki/File:VFPt_charges_plus_plus.svg and consider the field lines next to the vertical symmetry axis of the setup: The field lines must never bend away from the symmetry axis as it is the case next to the borders of the picture. If you move from the symmetry axis to the left, the field of the left charge will increase, the field of the right charge will decrease. The sum of the fields will have a component in direction to the symmetry axis, never away from it.

I hope this can be fixed, as the plots are really nice. --And1mu (talk) 11:31, 15 October 2016 (UTC)[reply]

I thought a bit more about the issue and came to the conclusion that I was wrong above. The argument is correct on the symmetry axis (a field line on this axis must not again leave the axis to the left or right). However it is not valid for field lines left or right of the symmetry axis. A good example are field lines further away from the symmetry axis: They direct towards the axis, but then bend away from it. --And1mu (talk) 18:16, 8 December 2016 (UTC)[reply]
Hi And1mu, I checked your remark, and I also think the code is correct. There is the possibility to have the field pointing away from the symmetry axis when the vertical distance from the center is large. Then the total field strength from both charges is similar and the horizontal component from each one increases linearly with the horizontal distance to each charge. For instance, vertically above one charge there is only a horizontal component from the other charge, so the field clearly points away from the symmetry axis. Closer to the axis this still holds. -- Geek3 (talk) 19:51, 8 December 2016 (UTC)[reply]

gradient

[edit]

Hi. Can you describe how you create such beatiful gradients ? TIA --Adam majewski (talk) 17:46, 19 January 2019 (UTC)[reply]

I'm not exactly sure which ones you mean. The Gradients of image elements such as cylinders are really just svg gradients where I chose approptiate stop colors to be interpolated. If you mean the colored field potentials in some of the plots, those have a chosen colormap (defined in the source code), are then evaluated on a raster grid and actually included in the svg files as embedded png raster images. As to how I choose the colors, it's simply a lot of playing around. --Geek3 (talk) 21:39, 7 September 2019 (UTC)[reply]
out of curiosity the function "draw_scalar_field" and "draw_contour" are mentioned in the guide but do not exist in the source code. Are these custom functions that you've written and not included? Thanks! 2602:802:2000:1:0:0:0:27EF 18:45, 14 June 2022 (UTC)[reply]
In the current published version 3.3, these functions are implemented. Just copy the text from the page again. --Geek3 (talk) 17:22, 6 July 2022 (UTC)[reply]

Field Function

[edit]

The line "field = vfp.Field([ ['wires', rod] for rod in rods])" is used in a few of your examples but throws an error because you are passing in a list when it should be a dict so that you can access .items. I'm working on a fix now just curious if you've solved this. The source line that throws the error is line 1263. Thanks, awesome library! — Preceding unsigned comment was added by 2602:802:2000:1:0:0:0:27EF (talk) 18:47, 14 June 2022 (UTC)[reply]

Hi, thanks for the hint! I checked, and the error doesn't seem to appear in the latest version. Fields are defined as lists instead of a dict in the newer version. Can you try with version 3.3 if it works? --Geek3 (talk) 10:57, 6 July 2022 (UTC)[reply]

Bifurcation of Quartic Polynomial Vector Fields

[edit]

Hi Is is possible to do such plots, like Bifurcation of Quartic Polynomial Vector Fields with Vector FiledPlot ? Soul windsurfer (talk) 07:44, 21 May 2023 (UTC)[reply]