arclength-parametrization of streamlines
alext at win.tue.nl
alext at win.tue.nl
Tue Apr 25 05:09:45 EDT 2000
Hi Thomas,
In reply to your question about parametrization of streamline-tracing by
other parameters than travelled distance:
I had a similar problem, i.e. I wanted to trace streamlines whose length
was controlled by other parameters than the maximum distance/travelled time
provided by vtkStreamLine. Two solutions emerged:
1) (easy but not fully general): compute a derived vector field from your
original one, trace streamlines in this field, and use the maximum
travelled time stopping criterion. In your case, you could normalize
your original vectorfield such that all vectors have the same length.
Then you can use the maximum travelled time as travelled distance,
since the velocity of the traced 'particles' is the same everywhere.
This method is however limited to the derivation of a new vector field
from the original one and using the maximul travelled time as stopping
criterion.
2) (more difficult but more general): subclass the baseclass of
vtkStreamLine, that is vtkStreamer, and override the
Execute() method. This method is the core of the streamline
tracing process. If you override it, you can set into the new version
of the method any stopping criterion you want, based on any data.
I used this method, for example, to create a new version of
vtkStreamLine which traces streamlines based on a user-given
boolean expression involving AND/OR/comparison operators on
the vtkScalars and vtkVectors data of the input-data. This means
I can trace streamlines based on more complex criteria than just
the comparison of the maximum travelled time. However, for this you
have to know a bit of VTK's subclassing policy to derive a new class
form vtkStreamer....
Hope this helps,
Alex
------------------------------------------------------------------
Alexandru C. Telea | Technische Universiteit Eindhoven
|
E-mail : alext at win.tue.nl | Dept. of Mathematics and
| Computing Science
Office : HG 8.30 | Postbus 513
Tel. : +31 40 247 4328 | 5600 MB Eindhoven
Secretary: +31 40 247 4416 | The Netherlands
Fax : +31 40 244 2489 |
URL : http://www.win.tue.nl/math/an/alext
-------------------------------------------------------------------
>
> Dear users,
>
> has anyone come arcoss a way to create stream lines that all have the
> same length?
>
> So far, I only figured out that all the streamlines created as
> vtkStreamLine(s) are parametrized by the distance a particle travels
> during a given time.
>
> Instead, what I'd need is a possibility to set the arclength of each
> line.
>
> Any help appreciated!
>
> Thomas Brandner
> --------------------------------------------------------------------
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at public.kitware.com>. For help, send message body containing
> "info vtkusers" to the same address.
> --------------------------------------------------------------------
>
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list