|
| 28 Mar 2012 08:41 AM |
Or something like that.
You cant really easily force a grid on a sphere to make it grid like (without making cells be different sizes and shapes), so wat do?
How i would do it: Grid is liek a fractal where u divide a rectangle to 4 smaller ones.
So with a sphere you take some triangles, and by subdividing them and offsetting you can create higher quality spheres (kind of like the roblox spheres are built i think)
Not sure, but i think you can do it by making a pyramid thingie out of 4 triangles, and then subdividing them to 4 smaller ones.
Thus, the position of something can be represented by 2 bits for each depth level. First it chooses which of the 4 base triangles its in, then from the 4 triangles that it was subdivided to and so on.
So all the cells are the same size, can be located using ints (without wasting bits or having different locating accuracies around the sphere) and it can be scaled and its symmetrical and stoof.
Eh?
EH????
k. |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Mar 2012 08:53 AM |
Does ITT mean "in this thread"?
I always wondered what it means and noticed that that would make sense... |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 08:55 AM |
| Or you could just use angles from the center+radius to find points/define a spherical grid. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 09:10 AM |
@Donny
but that makes it super,accurate at the poles and thus fails. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 12:55 PM |
hmm.
you could always just brute it and whenever someone complains they're getting 0.0001 FPS just tell them their hardware is crap |
|
|
| Report Abuse |
|
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 28 Mar 2012 03:17 PM |
If you're trying to approximate a sphere with a polyhedron, then a very simple way to do this is just use an icosohedron. If that's not detailed enough, then you can always iteratively add more complexity to it by a simple process like the following:
For each triangular face in your figure, take the midpoint of the face-- it will not lie on the surface of your sphere, so calculate where on the surface of the sphere it *should* lie and move it there. This will take your original face and break it into 3 new ones (since triangle ABC with midpoint D will give you new triangle faces ABD BCD and CAD).
You can start with a tetrahedra if you want, and keep expanding until you're approximating a sphere with the desired degree of accuracy. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 04:22 PM |
| It's not easy to map the surface of a sphere onto a plane, that's why we have so many different types of maps. |
|
|
| Report Abuse |
|
|
Varp
|
  |
| Joined: 18 Nov 2009 |
| Total Posts: 5333 |
|
|
| 28 Mar 2012 04:47 PM |
"For each triangular face in your figure, take the midpoint of the face"
That might not be so good if want a grid on the sphere though. What I'd do is to take an icosahedron (or other shape that you can put a grid on), divide it into a triangular grid, then normalize the positions of each point so that they lie equidistant from some point (i.e. lie on a sphere). |
|
|
| Report Abuse |
|
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 28 Mar 2012 05:16 PM |
| Perhaps I'm not sure what type of grid is desired exactly, but the points of an icosohedron will all lie on a sphere already (since it's regular). |
|
|
| Report Abuse |
|
|
Varp
|
  |
| Joined: 18 Nov 2009 |
| Total Posts: 5333 |
|
|
| 28 Mar 2012 05:34 PM |
"Perhaps I'm not sure what type of grid is desired exactly, but the points of an icosohedron will all lie on a sphere already (since it's regular)."
I mean that you would subdivide each face of the icosahedron to form a triangular grid of, for instance 4 triangles (like 1 iteration of a Sierpinski triangle or the triforce symbol) and then you move the points that weren't originally vertices of the icosahedron. It's analogous to taking a cube and dividng each face into N^2 smaller squares, then moving the intermediate points on the grid to the surface of a sphere. (Imagine there's a diagram here)
I don't know what the thread creator wants, but I think they might want some way to represent locations on a sphere in a somewhat evenly spaced grid, which would mean that dividing each face in the center wouldn't work, since the grid would be pretty irregular. |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 28 Mar 2012 06:31 PM |
We could just follow the definition of a sphere, which is an infinite amount of points the say distance away from the center.
:D |
|
|
| Report Abuse |
|
|
| |
|
Varp
|
  |
| Joined: 18 Nov 2009 |
| Total Posts: 5333 |
|
|
| 28 Mar 2012 06:43 PM |
"Why aren't maps of the world just 6 images, one for each side of a cube. That way, distortion would be minimized. Instead of peeling the surface of the earth off, and flattening it out, we could slice it up, and then peel of the sections, and barely do any flattening..."
Ever seen a Dymaxion map? They use the net of an icosahedron. They're pretty, and give some things accurately (area, shape), but aren't terribly practical. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2012 09:39 AM |
yeah you got to divide the triangles to 4 triangles, not 3, or else the new triangles wont be symmetric anymore. Had that problem once when i made a laggy terrain generator thing that made triangles for roblox >_>
Can you "tessellate" a pyramid like (one with 4 triangles) to make a sphere if you subdivide each triangle to 4 smaller ones and lift the centers of the edges? Or will it look weird? |
|
|
| Report Abuse |
|
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 29 Mar 2012 12:35 PM |
| I see what you're saying. I mean, with 3 triangles they will all still be symmetric, but if you divide it into 4 (triforce-style), then an equilateral triangle thus divided will be divided into 4 equilateral triangles, which will preserve the "evenness" of the mapping over the sphere. That'd be cool to watch in action. |
|
|
| Report Abuse |
|
|