Re: StreamPlot or streamlines in 3D?
- To: mathgroup at smc.vnet.net
- Subject: [mg117505] Re: StreamPlot or streamlines in 3D?
- From: István Zachar <zac at freemail.hu>
- Date: Mon, 21 Mar 2011 06:14:30 -0500 (EST)
- References: <im2072$11e$1@smc.vnet.net>
Thanks for the reply Heike, but it does not solve my problem. Consider this: startPts = RandomReal[{0, 1}, {20, 3}]; arrows = Arrow[{#, {1, 1, 1}}] & /@ startPts; Graphics3D[{arrows}] Note that since every trajectory points to the same fixpoint, there is a clump of arrowheads. Also note, that there may be NO internal points in a trajectory, to allow segmented arrows, like in your example. Thus what I need are two things: 1. An algorithm that SEGMENTS unsegmented lines to create midpoints (this I guess is the easier one); 2. An algorithm that calculates the POSITIONS where these midpoints should lie to yield an esthetic result where no two arrows (streamlines) terminate at the exact same point. All the rest is finetuning and styling, but that is not important here. And as I've already said it, both the two algorithms exist, though are not accessible being the internal routines of StreamPlot. Can StreamPlot be reverse engineered? Or is there a developer's package dealing with streamlines, that preceded the built-in StreamPlot function? I fail to see why the whole paradigm was not transferred to 3D already by Wolfram. Is there an inherent snag preventing the extension? Even if it cannot be extended to 3D it would be nice to use the streamlines in a more customizable way in 2D (i.e. to know the above algorithms). Istv=E1n On Mar 19, 11:23 am, Heike Gramberg <heike.gramb... at gmail.com> wrote: > It's only a start, but maybe you could mimic streams by using the graphic= s > directive Arrowheads[] to plot several arrow heads along your trajectorie= s. > For example, by doing something like > > pts = Table[{Cos[t], Sin[t], t/10}, {t, 0, 10 Pi, Pi/50}]; > Graphics3D[{Arrowheads[Table[{0.03, i}, {i, 0, 1, 1/60}]], Orange, > Thick, Arrow[pts]}] > > which sort of looks like a streamline in StreamPlot. You can also use Arr= owHeads[] to change the appearance of the heads, by supplying a graphics ob= ject to each of the arrowhead specifications in the table, e.g. > > pts = Table[{Cos[t], Sin[t], t/10}, {t, 0, 10 Pi, Pi/50}]; > Graphics3D[{Arrowheads[ > Table[{0.03, i, > Graphics3D[{Hue[i], Cone[{{0, 0, 0}, {1, 0, 0}}, 0.3]}]}, {i, = 0, > 1, 1/60}]], Gray, Thick, Arrow[pts]}] > > Heike. > > On 17 Mar 2011, at 11:35, Istv=E1n Zachar wrote: > > > Dear Group, > > > I'm plotting some trajectories in 3D, and I would like to present > > results as StremPlot does in 2D. Is there an established method how to > > generate StreamPlot-like streams and arrows, or I have to work my way > > from scratch, and extend it to 3D? It would be nice to have some ready- > > made algorithms on stream segmentation, placement, interpolation and > > styling. A Stream[...] object seems to be a natural extension to > > Point, Line and Arrow primitives... > > Note, that I do NOT generate a vectorfield in 3D, but a set of points > > for each trajectory, which I want to present as arrows, though not as > > general arrows, as those simply point to the fixed points of the ODE > > system, which are displayed as a point in the corner sorrunded with a > > multitude of arrowheads - pretty crowded. See the picture below (three > > views of the solutions of a 4D ODE on a 3D simplex). > > >http://img708.imageshack.us/i/simplex3d.png/ > > > Any help/idea is appreciated > > > Istvan