Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9163059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:21:16+00:00 2026-06-17T14:21:16+00:00

I am trying to write a Mathematica script that can interpolate a discrete vector

  • 0

I am trying to write a Mathematica script that can interpolate a discrete vector field to a continuous vector field. I then want to extract the integral curves (field lines) from the continuous vector field.

I know that Mathematica’s ListStreamPlot function can visually present integral curves; however, I need the actual points that comprise them.

I have considered writing a brute-force method to the following effect: It seems that the integral curve could be determined recursively. If a point were picked in the list, then the “next” point in the integral curve would be that with the closest slope. (Each “point” is actually a vector, and thus each has its own slope.) There are only 4 candidates for the “next” point — up, down, left, or right of the current point. The “next” point would then become the new starting point, and the process would recurse until the edge of the grid is reached.

However, I wonder if there is a simpler method using Mathematica’s higher-level functions. (I also don’t know if my method is even conceptually correct.)

I would really appreciate any thoughts or suggestions on this task.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:21:17+00:00Added an answer on June 17, 2026 at 2:21 pm

    FYI: http://mathematica.stackexchange.com

    Make up some data:

    data = Table[{-1 - x^2 + y, 1 + x - y^2}, {x, -3, 3, 0.2}, {y, -3, 3, 0.2}];
    

    Build a ListStreamPlot

    plot = ListStreamPlot[data, 
              StreamStyle -> "Line", Frame -> False, PlotRangePadding -> 0]
    

    enter image description here

    In Mathematica everything is an expression – so even this plot is basically visualized code of graphics primitives. You can extract those primitives – including lines you need – by various ways. For example – just picking parts of expression you cam find all points comprising this plot:

    points = plot[[1, 2, 1]];
    

    If you need to see the whole expression evaluate plot//InputForm. Now you could also do pattern matching to see inside expression. lets find all indexes comprising all your lines:

    indexes = Cases[plot, Line[index_] -> index, Infinity];
    

    Now you have everything to analyse, draw and stylize your lines. For example – design an app that highlights a specific line in the original plot:

    Animate[Show[
      plot,
      Graphics[{Red, Opacity[.5], , Thickness[.02], 
        Line[points[[indexes[[k]]]]]}]]
     , {{k, 1, "lines"}, 1, Length[indexes], 1}, FrameMargins -> 0]
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to write an upload script that only accepts PNG images on upload.
I'm trying write a simple perl script that reads some fields from a password
The following is part of a larger Script-fu script that I am trying write.
I am trying write a shell script that does the following: Checks the remote
I'm trying write a script in awk that (among other things) replaces all instances
I'm trying to run a Mathematica program (that I didn't write) locally. I have
I'm trying write a Ruby script that checks if user credentials are valid using
I'm trying write a script that detects whether a div is visible or not
I am trying write a script where when a user clicks on a link,
I m trying write code that after reset set up rrpmax as 3000. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.