3-Dimensional Grids on a Sphere - possible?

MadRat

Lifer
Oct 14, 1999
11,999
307
126
I've been looking at RTS (Real-Time Strategy) games and noticed that some of the future ones will use global grids done in X, Y, and Z dimensions. Some will use a 4th dimension of altitude.

I'm having a hard time conceptually seeing a sphere as a 3-D grid. Convential logic tells me they are either using triangles or hexes as the grid pattern. That would mean you can never travel a straight line across one of the axis, but rather have to make righthand or lefthand adjustments every other triangle. It just gets more confusing the more I think of it...

Can anyone shed some light on the subject?
 

Killbat

Diamond Member
Jan 9, 2000
6,641
1
0
Who says it has to be a true sphere? All they have to do is loop the X and Y dimensions around.
Ever play Tetrisphere? :)
 

MadRat

Lifer
Oct 14, 1999
11,999
307
126
If you want to do a sphere in 3-D with one of them as "altitude" then it would be possible using LONGITUDE and LATITUDE. The problem is you end up with strange shapes to represent the grid. Each unit of lateral dimension resembles a petal shaped strip rather than a uniform-sized unit of measure. By splitting the sphere into 3-D you can make uniform triangles or hexes. The 4th dimension of altitude measures how far out from either the crust or the core of the sphere.

Using a cylinder would create a nice uniform grid-based map but then the landmasses become greatly exaggerated the further from the equator you go. Losing perspective by going with simplicity is not an option for designers who want more realism. It is far easier to write logic systems for physics based on the cylinder than the 4-D perspective, but then again you lose too much in realism.
 

BSides

Member
Oct 22, 2001
43
0
0
You can also approximate a sphere using large triangles and tesselating them to get close to a real sphere. Also quaternions may be useful, (one less variable per vertex) freeing up more room for height and texture data.
 

harpy82

Senior member
Nov 21, 2001
891
0
0


<< I've been looking at RTS (Real-Time Strategy) games and noticed that some of the future ones will use global grids done in X, Y, and Z dimensions. Some will use a 4th dimension of altitude.

I'm having a hard time conceptually seeing a sphere as a 3-D grid. Convential logic tells me they are either using triangles or hexes as the grid pattern. That would mean you can never travel a straight line across one of the axis, but rather have to make righthand or lefthand adjustments every other triangle. It just gets more confusing the more I think of it...

Can anyone shed some light on the subject?
>>



u can't say that altitude is a 4th dimension.. everything in this world is 3D ONLI !!! until now... onli theories and math calculation had been done beyond the 3rd dimension.... up to 11th now.. i think.... but to represent it on PC or real world is still far from it.....

longitude... altitude... latitude... all X.. Y.. Z ... no 4th one here that i can see.. :)

 

RossGr

Diamond Member
Jan 11, 2000
3,383
1
0
A polar coordinate system hanldles shperical symetries very well, each location is space is specified by 2 angles(Theta, Phi ) and a distance (Rho),
 

Lorne

Senior member
Feb 5, 2001
873
1
76
You mention navigating right angles but what if you sector the squares/triangles/hexex as subsectors then sub those, you can navigate a more relative straight line, just a thought.

I tried to perceive that we are actully a 4th demention and maybe a volume or density of the volume is the last figure, Why, We always talk of universe as a vacume, Its not, But we use ower own pressure as a base for 0psi and its not consistant on this planet as you can change altitudes to make it very, There is no altitude in universe or should say that there is less of a change in that pressure in certain areas of and there is more of it at that so wouldnt that mean The pressure of the universe is the constan of 0psi and we are 6psi.

Does the density of the material within the volumetric area mean that it is not dimetionaly different.
eg a 1x1x1 cube of matter weighing in at 1 lbs is not dimentionaly different then the same size cube weighing in at 10lbs of matter.

Big thoughts now, What is the dimention of the greatbarrior, You know that area that the suppose universe is filling into.
It is by thought to be absolute nothing.
Does that mean there is no matter or volumetric dimetions. could this be dem 1 as an existance of something but what and is ower 4d flowing into it.
One more step. Would that mean every real dimetional difference is +4 so what we have thought of as the 4th dim is actully 8d.

A mind is a terible thing and must be stopped.
 

MadRat

Lifer
Oct 14, 1999
11,999
307
126
The problem with using X,Y coordinates in a sphere is that it is hard to code for the vectors of the movement. You would theoretically move faster in diagnal movements across the longitudunal and latitudal axii. EDIT: Besides movement, think of how your database would appear for each "grid" on the surface. The polar regions would be immensely dense while the equator would be too thin per unit on the grid.

You have to consider the curve of the sphere when plotting course, speed, and (in the case of air travel) pitch/yaw. A 3-dimensional block does not relate well to the curves of a sphere! This is why it takes 3-dimensions for the surface of the sphere and another dimension for the altitude.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81


<< You have to consider the curve of the sphere when plotting course, speed, and (in the case of air travel) pitch/yaw. A 3-dimensional block does not relate well to the curves of a sphere! This is why it takes 3-dimensions for the surface of the sphere and another dimension for the altitude. >>



moving diagonally in rectangular coordinates is also faster... moving from (0,0) to (1,1) is a distance of ~1.4.
 

RossGr

Diamond Member
Jan 11, 2000
3,383
1
0
You are not doing anything new or different, study current methods of navigation and spherical trig. You could easily cook up a equal area grid. That is each element would be the same area where ever it may be on the surface of the sphere. The subtended angle of the cells sides would have to depend on the angular coordinates.
 

MadRat

Lifer
Oct 14, 1999
11,999
307
126
Ross-

Thats the trouble, the method to do this is not common sensical. There will be three different variables to determine location on the sphere, using coordinates. Every "unit" of location on the sphere will be exactly the same size and shape. I remember hearing something about how it will be simple to turn triangular units into a square grid for a zoomed in perspective around the location. Care to explain how you think its done?
 

RossGr

Diamond Member
Jan 11, 2000
3,383
1
0
latidude and longitude specify any position on earth with 2 coordinates, elevation is a third. I am not sure what shape best tesselates a shpere. I still say, equal area cells, which have delta lat and delta long that depends on latidude would be workable, it would mean some computations.

Now do you also want a mapping that converts your sperical coordinates to a plane? This all can be done, I specifically remember in complex analysis, dealing with a projection form the surface of the sphere to a plane, you can preserve angles or lines if memory serves me.

Of course all of this could be done in cartesean coordinates, again, with computation.

Hmm... my past life it slowly returning to me, why not approximate the surface of the sphere with planar triangles, the more you use the better the approximation. Now you have a natural method of moving from the sphere to a plane, simpley take as many trianbles as you want and smoosh them! some error will be introduced here, but if you restrict the number of triangles it will be predictable.
 

MadRat

Lifer
Oct 14, 1999
11,999
307
126
I'm guessing that they'd have to use overlapping hexagons or triangles for each coordinate. The triangles could be smooshed down to a square by pairing them up, which would distort them somewhat. For a localized area it wouldn't be so bad, but on a larger grid it would greatly distort the picture.

This pretty well all depends on if equal-sized triangles can form a single sphere. I'd think so if a geodesic dome is a half sphere made up of triangles. If you do use triangles to approximate a sphere then why would simple X,Y coordinates be better than using X,Y,Z coordinates?
 

RossGr

Diamond Member
Jan 11, 2000
3,383
1
0
Computationally, you could maintain world and local coordinated systems. The world system would track which triangle a unit/s are on then the local would track where on the triangle the unit is. locally the Z (elevation) could track terrrain or air uints. You would at best need only 2 world coordinates, could even map the finite number of triangles needed into a interger for use in a database.