 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Paul Nicholls Guest
|
Posted: Thu Apr 05, 2007 7:40 am Post subject: find adjacent triangle coords to a regular icosahedron trian |
|
|
Hi all,
I already have code that can create an array of triangles for a N subdivided
regular icosahedron; N=0 -> 20 faces, N=1 -> 80 faces, etc.
I am now wondering if given this information:
icosahedron face = (p0, p1, p2) where p0-p2 are 3d
counterclockwise coordinates of the triangle face looking from the outside
of the icosahedron
icosahedron origin = ox,oy,oz
one face edge = p0->p1, p1->p2, or p2->p0
how can I find the missing third point for the adjacent equalateral triangle
using the chosen face edge?
I already have two of the points using the two edge points that I have
chosen...
I think it has something to do with the dihedral angle but I am not sure how
to compute the missing face coord using this.
thanks in advance,
Cheers,
Paul.
"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paul_nicholls (AT) hotmail (DOT) NOSPAM.com
Remove ".NOSPAM" to reply. |
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Sun Apr 08, 2007 8:39 pm Post subject: Re: find adjacent triangle coords to a regular icosahedron t |
|
|
Hi Paul,
You obviously have a list of face triangles, and their vertices P0 P1 and
P2. So in order to find a neighbour triangle, you just have to search the
list of triangles for another triangle having Pi and Pj.
If you store the neighbour pointers in the triangle, you only have to do
this once. Having a current, always up-to-date list of these neighbour
pointers also helps out later, when you want to do e.g. searches over the
surface. It only costs you 3x pointer size per triangle to store these
neighbour pointers. This shouldn't be a big thing unless you work with
millions of triangles.
If I misunderstood, please let me know.
Nils
"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> schreef in bericht
news:46146197$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi all,
I already have code that can create an array of triangles for a N
subdivided regular icosahedron; N=0 -> 20 faces, N=1 -> 80 faces, etc.
I am now wondering if given this information:
icosahedron face = (p0, p1, p2) where p0-p2 are 3d
counterclockwise coordinates of the triangle face looking from the outside
of the icosahedron
icosahedron origin = ox,oy,oz
one face edge = p0->p1, p1->p2, or p2->p0
how can I find the missing third point for the adjacent equalateral
triangle using the chosen face edge?
I already have two of the points using the two edge points that I have
chosen...
I think it has something to do with the dihedral angle but I am not sure
how to compute the missing face coord using this.
thanks in advance,
Cheers,
Paul.
"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paul_nicholls (AT) hotmail (DOT) NOSPAM.com
Remove ".NOSPAM" to reply.
|
|
|
| Back to top |
|
 |
Paul Nicholls Guest
|
Posted: Wed Apr 11, 2007 8:11 am Post subject: Re: find adjacent triangle coords to a regular icosahedron t |
|
|
Nils Haeck wrote:
| Quote: | Hi Paul,
You obviously have a list of face triangles, and their vertices P0 P1 and
P2. So in order to find a neighbour triangle, you just have to search the
list of triangles for another triangle having Pi and Pj.
If you store the neighbour pointers in the triangle, you only have to do
this once. Having a current, always up-to-date list of these neighbour
pointers also helps out later, when you want to do e.g. searches over the
surface. It only costs you 3x pointer size per triangle to store these
neighbour pointers. This shouldn't be a big thing unless you work with
millions of triangles.
If I misunderstood, please let me know.
Nils
"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> schreef in bericht
news:46146197$1 (AT) newsgroups (DOT) borland.com...
Hi all,
I already have code that can create an array of triangles for a N
subdivided regular icosahedron; N=0 -> 20 faces, N=1 -> 80 faces, etc.
I am now wondering if given this information:
icosahedron face = (p0, p1, p2) where p0-p2 are 3d
counterclockwise coordinates of the triangle face looking from the outside
of the icosahedron
icosahedron origin = ox,oy,oz
one face edge = p0->p1, p1->p2, or p2->p0
how can I find the missing third point for the adjacent equalateral
triangle using the chosen face edge?
I already have two of the points using the two edge points that I have
chosen...
I think it has something to do with the dihedral angle but I am not sure
how to compute the missing face coord using this.
thanks in advance,
Cheers,
Paul.
"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paul_nicholls (AT) hotmail (DOT) NOSPAM.com
Remove ".NOSPAM" to reply.
|
Hi Nils
That is fine if I want to keep the list of triangles and search in them
for the neighbouring triangles joined to the specified triangle.
I instead want to see if I can calculate any neighbouring triangle to a
single specified triangle on the surface of a regular icosahedron just
as if I had looked in the equivalent list of linked neighbouring triangles.
This will reduce memory requirements if I am looking at a very high
subdivision level of the icosahedron - I am going to try some fractal
planet coding and I plan on using the nearest triangle to the view point
as the 'seed' and create a list of triangles around this one that fit in
the view frustum.
I am trying to avoid holding a large list of triangles, many that I
probably won't need to render at all depending on the zoom.
So given:
1. a 'seed' equalatral triangle on the surface of the icosahedron
2. the radius of the icosahedron
3. one of the 3 edges of the seed triangle
I want to calculate the neighbour triangle's missing vertex
any ideas?
My first idea was this:
A
/ \
/ \
/ \
/ \
B/----m----\C
|
|
|
|
|
|
|
|
O
A,B,C are the counter clockwise triangle vertices on the surface of the
icosahedron
m is the midpoint on the chosen edge I want to find the neighbouring
triangle to, in this case edge B-C
o is the origin of the icosahedron
I was thinking that perhaps I could just mirror point A around the axis
O-m 180 degrees...
do you think this sounds feasible?
cheers,
Paul. |
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Mon Apr 16, 2007 12:42 am Post subject: Re: find adjacent triangle coords to a regular icosahedron t |
|
|
Since B and C are both on the sphere, you can mirror A in the plane through
points 0-B-C. What you do is find the projection of A on OBC, as well as the
height above, then construct a point A' from the projection and the height,
but now in direction below.
I'm not sure why you could just use a limited number of triangles on a
sphere to start with, then subdivide the triangles that you're interested in
to have in more detail.
Subdivision is easy; find the sphere through the points ABC, and use it's
midpoint to construct 3 new triangles. Perhaps you don't want to do this
because the resulting triangles are too sharp?
Nils |
|
| Back to top |
|
 |
Paul Nicholls Guest
|
Posted: Mon Apr 16, 2007 4:30 pm Post subject: Re: find adjacent triangle coords to a regular icosahedron t |
|
|
Nils Haeck wrote:
| Quote: | Since B and C are both on the sphere, you can mirror A in the plane
through
points 0-B-C. What you do is find the projection of A on OBC, as well
as the
height above, then construct a point A' from the projection and the
height,
but now in direction below.
I'm not sure why you could just use a limited number of triangles on a
sphere to start with, then subdivide the triangles that you're
interested in
to have in more detail.
Subdivision is easy; find the sphere through the points ABC, and use
it's
midpoint to construct 3 new triangles. Perhaps you don't want to do this
because the resulting triangles are too sharp?
Nils
|
Hi Nils,
I have tried to calculate the new triangle adjacent to the given
triangle, but this only seems to work with no subdivisions of the
original icosahedron, not when 1 or more subdivisions are in effect...
I am going to have to try what you suggested and start with a smaller
subset of triangles that I will then subdivide further.
cheers,
Paul. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|