Skip to main content
14 events
when toggle format what by license comment
Feb 9, 2015 at 17:23 comment added Jens @Ruslan I tried to be as efficient as possible in terms of graphics, so I would blame the rest on Mathematica - in terms of efficiency and speed, it can't compete with dedicated 3D visualization software. However, one can always build complex 3D scenes in Mathematica by doing it in smaller chunks and combining them with Show later. You could try that by doing chunks with smaller lists of seed points and combining them only at the end. As in: seedList[[1;;5]], seedList[[6;;10]], etc. for the argument of fieldLinePlot.
Feb 9, 2015 at 9:46 comment added Ruslan Thanks, that looks great. But for some reason it uses a huge amount of RAM and goes into heavy swapping on my machine with 4G of RAM.
Feb 9, 2015 at 6:03 comment added Jens @Ruslan I've edited the code so it can now do line thickness variations.
Feb 9, 2015 at 6:02 history edited Jens CC BY-SA 3.0
Added requested tube thickness variability
Feb 8, 2015 at 18:55 comment added Jens @Ruslan Sure, that's up to anyone's taste. I may have time to do some modifications regarding thickness later... it's doable but not straightforward, unfortunately. The Tube command lets you adjust the thickness along the curve, but ParametricPlot (which I rely on) doesn't utilize that capability (for 1D curves).
Feb 8, 2015 at 18:53 comment added Ruslan As for the colouring, I think more understandable would be to use GrayLevel[1-#]& instead of Hue.
Feb 8, 2015 at 18:48 comment added Ruslan Of course, I meant that the thickness would have a maximum like clipping does in your color suggestion.
Feb 8, 2015 at 17:50 comment added Jens @Ruslan That would take some modifications. But you can already display the field strength by using colors, without any modifications to the current code. Just use it with some additional options. E.g., for the Coulomb field, define it as a function f2[x_,y_,z] and then add this to the fieldLinePlot: ColorFunctionScaling -> False, ColorFunction -> Function[{x,y,z,u}, Quiet@Hue[Clip[ Norm[f2[x,y,z]],{0,20}]/20]] The factor 20 determines the cutoff for coloring near singularities. If the thickness were used for field strength, it would look very thick near the charges...
Feb 8, 2015 at 14:17 comment added Ruslan BTW, is there any simple way to change thickness of the tube depending on field strength?
Feb 8, 2015 at 14:15 history bounty ended Ruslan
Jan 26, 2012 at 18:34 history edited Jens CC BY-SA 3.0
Added LaTeX formatting in headings
Jan 26, 2012 at 18:20 history edited Szabolcs CC BY-SA 3.0
added 4 characters in body
Jan 26, 2012 at 18:01 history edited Szabolcs CC BY-SA 3.0
added 52 characters in body
Jan 26, 2012 at 17:36 history answered Jens CC BY-SA 3.0