Page 1 of 2
A leap in dimensions
Posted: Tue Jun 26, 2007 2:58 pm
by Zacariaz
For a longer periode of time now i have been thinking about various ways of mapping point in an finite wrapped space.
Imagine the surface of a sphere, it can be mapped with only two coordinated (x, y), but in reality it exists in 3 dimesions, thus it can allso be mapped with 3 coordinates.
Allso i have been thinking about sets of coordinates:
x, y, z -> xy, xz, yz
Of course the radius (r) of the sphere will allso play an important part.
Now where i am having trouble with is figuring out the relations between the two ways of doing things, and further more extend the idea into 3/4 dimesions.
You have probably allready figured out that in the end it all has to do with a representation of curped space.
Any usefull input, links, etc. regarding this subject will be greatly appreciated.
Regards
Posted: Tue Jun 26, 2007 3:19 pm
by mathematician
The surface of a sphere is two dimensional, so you only need to co-ordinates to fix any point on its surface. On the other hand, the sphere itself is three dimensional, so you need three dimensions if you want to fix its position in space.
By definition a four dimensional sphere would be represented by the equation
x^2 + y^2 + z^2 + t^2 = r^2
and so you would need four co-ordinates, x,y,z,t to locate it in (4 dimensional) space.
As to how you project a curved surface onto a flat surface, you would need a cartographer to answer that. There is more than one way of doing it, but, in the nature of the case, none of them can give perfect results.
Posted: Wed Jun 27, 2007 2:42 am
by Combuster
My guess is that you need a function that maps an u and v to x,y,z coordinates. For any given surface that is incredibly hard to do. For most primitives there are however standard solutions that you can use. I.e. you can express a location on a sphere in longitude and latitude (which would obviously return you to the same point after 360 degrees)
for circle, sphere, hypersphere (2D, 3D, 4D):
x = r * sin(u)
y = r * cos(u)
x = r * sin(u)sin(v)
y = r * cos(u)sin(v)
z = r * cos(v)
x = r * sin(u)sin(v)sin(w)
y = r * cos(u)sin(v)sin(w)
z = r * cos(v)sin(w)
t = r * cos(w)
etc
Posted: Wed Jun 27, 2007 11:51 am
by mathematician
The easiest way is to imagine a sheet of paper wrapped round the sphere in the form of a cylinder, and then to project the curved surface onto that. That will lead to some rather obvious distortions, but all attempts to hammer a spherical surface flat will lead to distortions of size shape or both.
Posted: Wed Jun 27, 2007 3:02 pm
by Zacariaz
i am still trying to come up with a way of explaining what my actual problen, what i wanna do, is.
Eventually i will figure it out, and then youll be the first to know
Posted: Wed Jun 27, 2007 4:15 pm
by Kevin McGuire
You want to represent the surface curve using coordinates?
It is general ramblings. I rather read something interesting like this.
Posted: Wed Jun 27, 2007 4:34 pm
by Zacariaz
Kevin McGuire wrote:You want to represent the surface curve using coordinates?
It is general ramblings. I rather read something interesting like this.
well, in a sence yes, just the surface for a hpersphere instead, e.g. a 3d wrapped space.
I have trouble figuring out precicesly how to represent such a thing and to make it more complicates it has to be scaleable and no to heavy duty.
Posted: Wed Jun 27, 2007 4:42 pm
by jnc100
Zacariaz wrote:Imagine the surface of a sphere, it can be mapped with only two coordinated (x, y), but in reality it exists in 3 dimesions, thus it can allso be mapped with 3 coordinates.
You could, in theory, define a point on the surface of a sphere by any number of coordinates, its just that 2 or 3 are the ones which make most sense. For example, you could define it as the sum of various multiples of 10 different vectors, and call that a coordinate system. I guess you wish to use the 3-d Cartesian system which defines 3 mutually perpendicular vectors as its base, but you could just as easily use any others. In fact, you could define a 1 dimensional system to describe a point on the surface of the sphere, where your coordinate (or I guess it should be ordinate?) is the distance along a line which travels through all possible points on the surface, but that isn't very practical.
In spherical coordinates you can define a sphere by p (rho)=1 and not bother with sines and cosines. You can then further add a zenith and azimuth value to define one particular point on the surface.
Now where i am having trouble with is figuring out the relations between the two ways of doing things, and further more extend the idea into 3/4 dimesions.
The conversion is as Combuster said, i.e.
x = p * sin(zenith) * cos(azimuth)
y = p * sin(zenith) * sin(azimuth)
z = p * cos(zenith)
Each coordinate system has its own benefits, for example polar coordinates are useful for determining lengths of curves whereas cartesian coordinates are better suited to finding out areas.
Zacariaz wrote:i am still trying to come up with a way of explaining what my actual problen, what i wanna do, is.
Eventually i will figure it out, and then youll be the first to know
Good idea
mathematician is probably the better one to explain all this though, its been over 6 years since I studied this...
Regards,
John.
Posted: Wed Jun 27, 2007 6:15 pm
by Kevin McGuire
I do not know what I am talking about.. exactly either.
I think you might be getting into something like projection, for instance the relationship between coordinate systems: x, xy, xyz, xyzt, and xyztr which are one through five dimensional is the projection of one system into another such that:
x <-- xy <-- xyz <-- xyzt <-- xyztr
Once you make a projection such as taking a picture in your house right now it should be very similar to a hash. You lose information. The actual environment is three dimensional, but once you snap the shot it is projected into two dimensions. You could reverse the process and produce a high dimension coordinate from a lower one, but this is problematic since you can have multiple representations in the higher dimensions of the same thing in the lower dimension very similar to a hash algorithm.
x = x * (1/y);
-----
x = x * (1/z);
y = y * (1/z);
-----
x = x * (1/t)
y = y * (1/t)
z = z * (1/t)
-----
x = x * (1/r)
y = y * (1/r)
z = z * (1/r)
t = t * (1/r)
Code: Select all
// build hypersphere
i = 0;
for(float u = 0.0; u < _M_PI*2; u += step)
for(float v = 0.0; v < _M_PI*2; v += step)
for(float w = 0.0; w < _M_PI*2; w += step)
{
p[i].x = sin(u)*sin(v)*sin(w)*sin(q);
p[i].y = cos(u)*sin(v)*sin(w)*sin(q);
p[i].z = cos(v)*sin(w)*sin(q);
p[i].t = cos(w)*sin(q);
++i;
}
total = i;
// project hypersphere into three dimensional space.
for(i = 0; i < total; ++i)
{
p[i].x = p[i].x * (1.0 / p[i].t);
p[i].y = p[i].y * (1.0 / p[i].t);
p[i].z = p[i].z * (1.0 / p[i].t);
}
You scale a vector by a scalar which would be, and looks extremely similar to our projection from a higher dimension to a lower one.
p.x = p.x * s
p.y = p.y * s
p.z = p.z * s
p.t = p.t * s
I hope this rings some bells, pulls some chains, turns some gears in some way that could help you figure it out further.
Posted: Thu Jun 28, 2007 3:41 pm
by Kevin McGuire
Zacariaz, did you ever get anything figured out and what was it if so?
Posted: Fri Jun 29, 2007 11:43 am
by Zacariaz
im working on the case, dont worry, i will reply eventuelly
For now, thank you very much for your help
Posted: Mon Jul 02, 2007 5:20 pm
by Kevin McGuire
I found this which has a very interesting explanation of the creation of
n'th dimension geometric objects.
http://local.wasp.uwa.edu.au/~pbourke/g ... yperspace/
Posted: Tue Jul 03, 2007 2:43 am
by Zacariaz
Thanks for the link, it was interesting allthough it did not solve my current problem.
Now, i think i am now able to explain part of my problem which basicly is about how many coords to be used.
To make things simpler lets step back a dimension from the sphere to a circle.
I can discribe a point on the circle "surface/line" using only one coordinate x, however it is not a fixed point, it relys on the radius of the circle. if i increase/decrease the radius, it will have an effect on point x, that is a problem, but allso there is an upside to it as the distance between two point will allways be easy to determine.
Now if i use two coordinates x, y to discribe a point, it will allways be fixed, no matter the radius, however determining at distance between two points will be more complicated.
The goal is to avoid complicated math if possible, so i guess i would like to have kind of a mixture of the two ways discribe, like x, r or x, y, r but i have yet to come up with a methode i like.
I think this makes sence, but please tell me if that isnt the case.
NB. it is supose work not in 1/2 dimensional space but in 3/4.
Regards
Posted: Tue Jul 03, 2007 3:45 am
by Combuster
The radius of a circle can not change; it wouldn't be the same circle anymore. So given the same circle and the same angle you will always get the same point. Hence a representation like (r,t) is meant to describe a point on some circle. (r,x) will not work since in most cases it will describe two points: (x,y) and (x,-y) - the radius is the same for both. (x,y,r) is an overspecification - it contains more information than strictly necessary and due to rounding errors it may therefore not be valid at all.
Also, since you are modelling curved space, (x,y) is not a useful representation of that space. In fact, your space has no notion of x,y at all since it's not an euclidean space.
Wikipedia has some more on it. (read the fiction section on what happens when you mix geometries
)
Posted: Tue Jul 03, 2007 5:35 am
by mathematician
There are two co-ordinate systems in common use - cartesian (x,y) and polar (r,t). You have to settle for one or the other. It isn't that difficult to calculate the distance between two points using cartesian co-ordinates, especially if you have got a computer to do the work for you:
s = sqrt( (x1-x2)^2 + (y1-y2)^2 )
(the Euclidian metric as it is called)