Get all locations between two points

Discussion in 'Plugin Development' started by 97WaterPolo, Dec 28, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    97WaterPolo

    Hello!

    So I am trying to get a list of locations between two points, that would create as straight of a line as possible.

    How would I get all the locations between the two points with increments of .5. I can easily get the points if it was 2D, but I am at somewhat of a loss when it comes to 3D.

    Any help would be greatly appreciated. I know many have issues with spoon feeding, and I would appreciate it if someone does spoon feed me, to try and explain the concept as best as they can.
     
  2. Offline

    DemKazoo

    Not really understand what you mean (sorry). Lets say you have points A and C? and you want whats between them or something? So that would be B?
     
  3. Offline

    mythbusterma

    @97WaterPolo

    What is this List going to be used for? Most of the time when people ask for this particular List, it's a bad idea.
     
  4. Offline

    97WaterPolo

    @DemKazoo
    More like Points A and Z, and all the points between them, IE: BCDEFGH...

    @mythbusterma
    It would be a list of locations to display particles at, would there me another way to do it?
     
  5. Offline

    mythbusterma

    @97WaterPolo

    Well that's about the only usage case for this I would find appropriate, none off the top of my head.

    What I would do is determine the distance between the two points, creating a "length" value, then figuring out how many stepped values go into that, then dividing the orthogonal distances by the number of steps, giving you the step size of each orthogonal direction. Then, simply iterate from the base to the length, stepping values by the step values of the orthogonal step sizes you determined earlier.
     
    97WaterPolo likes this.
  6. Offline

    97WaterPolo

    @mythbusterma
    What would be the formula for determining the distance between two points as it is 3D.
     
  7. Offline

    mythbusterma

  8. Offline

    Rocoty

    @97WaterPolo I hope you realise that the amount of points between two points is virtually infinite? So...getting ALL the locations between two points is really vague, because it would be impossible in a practical sense. So please be as precise as you can when asking questions.
     
  9. Offline

    97WaterPolo

    @Rocoty
    Trying not to sound like a smart ass, but did you read the question? I did specify it in the question I asked.

     
  10. Offline

    Rocoty

    @97WaterPolo I'm sorry. I did read your post, but must have skipped that part on accident.

    Anyway, for fear of answering a question that may have already been answered, doing this in 3D would be basically the same as with 2D. Why don't you post what you have for 2D and we can help you convert it to 3D?
     
    97WaterPolo likes this.
  11. Offline

    WarmakerT

Thread Status:
Not open for further replies.

Share This Page