[vtkusers] length of a field line

tom fogal tfogal at apollo.sr.unh.edu
Fri Dec 17 13:32:58 EST 2004


Hi all, I'm trying to calculate the length of a field line through a
magnetic field.

I didn't find any way to pull the stream line's length out of
vtkStreamTracer. I think the way to do this would be to use
RungeKutta#::ComputeNextStep (which is what vkStreamTracer does
internally anyway, IIRC) and increment a tally variable every time it
succeeds, breaking out of the loop when it fails. There is an issue
though, that ComputeNextStep takes a 'maximum time' parameter, not a
'maximum length' parameter. I could use vtkStreamTracer's
SetMaximumPropagation with a length value, but I need it to move the
seed point so that repeated calls eventually end.

Has anyone done this before? Is there any way I could specify a length
for ComputeNextStep() instead of a time? Or cause vtkStreamTracer to
move the given seed point along the path it calculates, so that a
future trace will start at the end of the previous?

-tom



More information about the vtkusers mailing list