<p>It's a classic map projection problem, and it's impossible to do rigorously. You can't project a sphere onto a grid like that. For imaging, we usually consider the <a href="https://mathworld.wolfram.com/GnomonicProjection.html" rel="nofollow noreferrer">gnomonic projection</a> to be &quot;undistorted&quot;. It approximates what you want when the region you are mapping is small.</p>

CC BY-SA 4.0
2024-11-29T06:56:56.850Z
here is the expected grid 
https://i.sstatic.net/eOOOW.jpg
snkatore
CC BY-SA 4.0
2024-11-29T12:04:11.787Z
@snkatore And what projection is that? There are many named projections. It doesn't have the property you ask for (it can't).
John Doty
CC BY-SA 4.0
2024-11-30T03:25:20.900Z
An example is added in the question. It is easier to  get the middle row points as it is along the Dec line.
snkatore
CC BY-SA 4.0
2024-11-29T01:43:18.860Z
2024-11-29T01:43:18.860Z
John Doty
<p>How to form a uniform square grid in the RA-Dec plane around the given target position. Target may be anywhere i.e. may be near the pol or may be near equator but the grid should be uniform.</p>
<p>inputs are :</p>
<pre><code>target position: Ra and Dec. (deg)
grid size: M X N ( M is rows, N is cols)
grid spacing: d (deg)
</code></pre>
<p>Examples1:
target: RA = 0 deg, Dec = 0 deg. grid size = 3x3, grid spacing = 1 deg.</p>
<p>the list of points are</p>
<ol>
<li>RA- 359, Dec- -1</li>
<li>RA- 359, Dec-  0</li>
<li>RA- 359, Dec-  1</li>
<li>RA- 0  , Dec- -1</li>
<li>RA- 0  , Dec-  0</li>
<li>RA- 0  , Dec-  1</li>
<li>RA- 1  , Dec- -1</li>
<li>RA- 1  , Dec-  0</li>
<li>RA- 1  , Dec-  1</li>
</ol>

CC BY-SA 4.0
2024-11-28T18:08:06.903Z
I’m voting to close this question because this doesn't appear to be about Astronomy
Starship
CC BY-SA 4.0
2024-11-28T19:34:32.787Z
Do you mean uniform in the sense of having a constant angular distance between them? That can't be done in a square array. So what do you mean?
ProfRob
CC BY-SA 4.0
2024-11-29T01:22:34.083Z
Yes, constant angular distance between the grid points.
snkatore
CC BY-SA 4.0
2024-11-29T07:36:20.200Z
Hello snkatore,  this is a "request" not a question.  As we are people, not AI, you should not expect us to do things for you, like write code.  We may be able to answer questions, but we aren't a programming service.  I've voted to close, as this is not a question, so can't be "answered".
James K
CC BY-SA 4.0
2024-11-29T17:36:52.973Z
I believe the OP is asking for "squares" in the spherical trigonometry sense, where each side is a fragment of a great circle.  And not a projection on to a 2D plane.  This is as simple as starting with two great circles perpendicular to each other, passing through the point in question, and rotating them by the needed spacing.  Then use spherical trig to find the intersections.
Greg Miller
CC BY-SA 4.0
2024-12-01T16:27:13.673Z
The requested "constant angular distance between grid points" is incompatible with the grid lines being segments of great circles.
notovny
<positional-astronomy>
generate uniform grid of points on Ra-Dec plane around the given target (Ra,Dec)
snkatore
# generate uniform grid of points on Ra-Dec plane around the given target (Ra,Dec)

(Asked by: username_0 on 2024-11-28)

How to form a uniform square grid in the RA-Dec plane around the given target position. Target may be anywhere i.e. may be near the pol or may be near equator but the grid should be uniform.
inputs are :
target position: Ra and Dec. (deg)
grid size: M X N ( M is rows, N is cols)
grid spacing: d (deg)

Examples1:
target: RA = 0 deg, Dec = 0 deg. grid size = 3x3, grid spacing = 1 deg.
the list of points are

RA- 359, Dec- -1
RA- 359, Dec-  0
RA- 359, Dec-  1
RA- 0  , Dec- -1
RA- 0  , Dec-  0
RA- 0  , Dec-  1
RA- 1  , Dec- -1
RA- 1  , Dec-  0
RA- 1  , Dec-  1

**Tags:** positional-astronomy
> **Comments:**
> **username_1**: I’m voting to close this question because this doesn't appear to be about Astronomy  
> **username_2**: Do you mean uniform in the sense of having a constant angular distance between them? That can't be done in a square array. So what do you mean?  
> **username_0**: Yes, constant angular distance between the grid points.  
> **username_3**: Hello snkatore,  this is a "request" not a question.  As we are people, not AI, you should not expect us to do things for you, like write code.  We may be able to answer questions, but we aren't a programming service.  I've voted to close, as this is not a question, so can't be "answered".  
> **username_4**: I believe the OP is asking for "squares" in the spherical trigonometry sense, where each side is a fragment of a great circle.  And not a projection on to a 2D plane.  This is as simple as starting with two great circles perpendicular to each other, passing through the point in question, and rotating them by the needed spacing.  Then use spherical trig to find the intersections.  
> **username_5**: The requested "constant angular distance between grid points" is incompatible with the grid lines being segments of great circles.  

---

## 1 answers

### Answer by username_6 on 2024-11-29. Score: 2

It's a classic map projection problem, and it's impossible to do rigorously. You can't project a sphere onto a grid like that. For imaging, we usually consider the [gnomonic projection](https://mathworld.wolfram.com/GnomonicProjection.html) to be "undistorted". It approximates what you want when the region you are mapping is small.

> **Comments:**
> **username_0**: here is the expected grid  https://i.sstatic.net/eOOOW.jpg  
> **username_6**: @snkatore And what projection is that? There are many named projections. It doesn't have the property you ask for (it can't).  
> **username_0**: An example is added in the question. It is easier to  get the middle row points as it is along the Dec line.  

---

