Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    3d interpolation help please?

    Beginners
    2
    4
    151
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PickleCatStars
      PickleCatStars F last edited by PickleCatStars

      Okay, so I have a 2d array, with the 2 dimensions representing X width and Z depth. The values stored represent the Y heights. Like this:

       [0,1],
       [4,2]
      ]
      

      So if I have a thing at position [0][0], the height is 0, and if I have a thing at position[0][1], the height is 2.
      I want to be able to interpolate the values so that I can find out what the height would be if my thing was at a hypothetical position [0.5][0.3] (for example). I hope you understand what I mean.

      There’s a lerp() function here, which interpolates between two numbers, which my brain has absolutely no trouble understanding, but I can’t wrap my head around this ’2 dimensions, 4 points’ thing for some reason...

      Can anybody help?

      1 Reply Last reply Reply Quote 0
      • DomDom
        DomDom F last edited by DomDom

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • PickleCatStars
          PickleCatStars F last edited by

          Thanks. I was getting confused because you can go left to right first or up and down first. But whatever direction you pick first, you only do the second one once...

          It’s getting there.

          1 Reply Last reply Reply Quote 0
          • DomDom
            DomDom F last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • First post
              Last post