Finding the index number on a stretched cartesian grid

In summary, if a set of discrete points are equally spaced and indexed from 1 to n on a cartesian grid, the index can be obtained by dividing the point's position by the constant spacing. However, if the grid is stretched, it is not clear how to find the index analytically. It is possible that by knowing the grid analytically, the index can still be found analytically regardless of the stretching.
  • #1
jonasboy
1
0
Imagine I have a set of discrete points equally spaced out and indexed from 1 to n (a 1D grid). On a cartesian grid if the spacing, dx, is constant the index can be obtained simply by:

i = floor(x/dx)

That was pretty simple, now if the cartesian grid is stretched (i.e. dx is not constant), it is not clear to me how to go about finding the index analytically. I am guessing that since we know the grid analytically we should be able to find the index analytically regardless if the grid is stretched or not. Any thoughts?

Thanks in advance.
 
Mathematics news on Phys.org
  • #2
Not entirely certain of the question but...
Suppose the grid points are given by xi = f(i), some suitably nice function f. Wouldn't the grid point next below x be floor(f-1(x))?
 

1. How do I find the index number on a stretched cartesian grid?

To find the index number on a stretched cartesian grid, you will need to first determine the spacing between each grid point. Then, you can count the number of grid points between your desired point and the origin. The resulting number will be the index number for that point.

2. What is a stretched cartesian grid?

A stretched cartesian grid is a type of coordinate system used in mathematics and science. It is a grid made up of evenly spaced horizontal and vertical lines, but the spacing between the lines is not uniform. This type of grid is often used to represent data that is not evenly distributed.

3. Why is it important to find the index number on a stretched cartesian grid?

Finding the index number on a stretched cartesian grid is important because it allows you to accurately locate and analyze data points on the grid. It also helps to determine the relationships between different data points and can aid in making predictions based on the data.

4. Can the index number on a stretched cartesian grid be negative?

Yes, the index number on a stretched cartesian grid can be negative. This occurs when the desired point is located in the negative region of the grid, meaning it is below or to the left of the origin point.

5. Are there any shortcuts or formulas for finding the index number on a stretched cartesian grid?

Yes, there are some formulas that can be used to find the index number on a stretched cartesian grid. One example is the formula for calculating the index number on a linearly spaced grid, which can be adapted for a stretched grid by taking into account the varying spacing between grid points.

Similar threads

  • General Math
Replies
1
Views
1K
  • General Math
Replies
16
Views
2K
Replies
6
Views
1K
Replies
2
Views
1K
Replies
1
Views
937
  • Atomic and Condensed Matter
Replies
0
Views
813
Replies
9
Views
1K
Replies
4
Views
414
  • Topology and Analysis
Replies
6
Views
1K
  • Special and General Relativity
2
Replies
50
Views
5K
Back
Top