Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How can I graph stream lines in 3d?

  1. Apr 28, 2008 #1
    1. The problem statement, all variables and given/known data
    Given a set of points in 3d space (x,y,z) each having a velocity vector (u,v,w), create a general algorithm for tracing out a stream line.
    The points are locked to a grid, so data points are evenly along an axis. (ie, increment along x only and it's always the same change in x to the next point, and the same holds for y and z) The points are monotonically increasing, so steady-state has already been achieved.
    You are allowed to pick your starting point.

    2. Relevant equations
    From wikipedia:
    Streamlines are a family of curves that are instantaneously tangent to the velocity vector of the flow. This means that if a point is picked then at that point the flow moves in a certain direction. Moving a small distance along this direction and then finding out where the flow now points would draw out a streamline.

    Also, wikipedia states dx/u = dy/v = dz/w.

    3. The attempt at a solution
    I have no idea. I would imagine that given point(x1, y1, z1), I could search through a list of other points (maybe only adjacent points?), and then see if (x2-x1)/u2 = (y2-y1)/v2 = (z2-z1)/w where (x2,y2,z2,u2,v2,w2) are the position and velocity components of the 2nd point. If the check passes, then connect the two points and continue the process for the next point (ignoring the current one) and continue until no points satisfy the algorithm.
    I don't know if that works though, and it seems like it would generate non-unique solutions anyway. After all, couldn't more than one adjacent point satisfy the condition?
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted