Graph 2 Dimensional Function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hbloemha
    New Member
    • Jun 2007
    • 2

    #1

    Graph 2 Dimensional Function

    I'm trying to write a program that will iterate a 2 dimensional function (I think I have that part fine). The problem I'm having is to give as input all the values in a set range. To be more specific:
    I want the iteration to happen for every initial condition such that x = [-2.5, 2.5] and y = [-2.5, 2.5]. (So it iterates when (x, y) = (-2.5, -2.5), and again when (x, y) = (-2.5, -2.25), and again for (-2.25, -2.5), and so on for the entire range)

    Any advice?
  • prometheuzz
    Recognized Expert New Member
    • Apr 2007
    • 197

    #2
    Originally posted by hbloemha
    I'm trying to write a program that will iterate a 2 dimensional function (I think I have that part fine). The problem I'm having is to give as input all the values in a set range. To be more specific:
    I want the iteration to happen for every initial condition such that x = [-2.5, 2.5] and y = [-2.5, 2.5]. (So it iterates when (x, y) = (-2.5, -2.5), and again when (x, y) = (-2.5, -2.25), and again for (-2.25, -2.5), and so on for the entire range)

    Any advice?
    I have no idea what you're talking about.
    Could you give a concrete example?

    Comment

    • hbloemha
      New Member
      • Jun 2007
      • 2

      #3
      Originally posted by prometheuzz
      I have no idea what you're talking about.
      Could you give a concrete example?
      I'm trying to replicate a Henon Map for a chaotic system, just the basin, I did the attractor. The code for the attractor is:
      /*code starts*/
      for (int k = 1; k < 1000; k++)
      {
      xMap = A - x * x + B * y;
      yMap = x;
      x = xMap;
      y = yMap;
      }
      /*code ends*/

      For this x and y are both initially 0. The instructions for the basin (I'm following "Chaos: An Intro to Dynamical Systems" by Alligood, Sauer, and Yorke) say that I should take x = [-2.5, 2.5] and y = [-2.5, 2.5] as my initial conditions when I iterate.

      Comment

      Working...