Java-Gaming.org Hi !
 Featured games (90) games approved by the League of Dukes Games in Showcase (788) Games in Android Showcase (234) games submitted by our members Games in WIP (862) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
Pages: [1]
 ignore  |  Print
 3D polygon triangulation algorithm  (Read 6226 times) 0 Members and 1 Guest are viewing this topic.
RobinB

JGO Ninja

Medals: 45
Projects: 1
Exp: 3 years

Spacegame in progress

 « Posted 2013-04-22 20:56:45 »

Hello,

For an simple experiment im trying to generate random 3D meshes.
Now im having multiple points in 3d space that needs to be connected with triangles.
Does anyone have some known algorith names or any point toward the correct direction?
The only stuff i can find is about 2d polygons.

Robin
gouessej
 « Reply #1 - Posted 2013-04-22 23:13:57 »

What do you mean by "3D polygon"? A polygon is in a plane, isn't it?

Julien Gouesse | Personal blog | Website | Jogamp
HeroesGraveDev

JGO Kernel

Medals: 382
Projects: 11
Exp: 4 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

 « Reply #2 - Posted 2013-04-22 23:20:59 »

I think 3D polygon is supposed to mean a 2D polygon in 3D space.

Otherwise we would be talking about polyhedra, and that wouldn't make sense.

Anyway, the solution to the problem: Add a z-coordinate.

Agro
 « Reply #3 - Posted 2013-04-22 23:22:56 »

Well, there is a problem. It depends on if you want it to be concave or convex, and if you randomly generate completely random points, it won't work. You'll have to make sure that chosen points don't already intersect the polygon.

Same for polyhedrons, so it doesn't really matter in 2D or 3D, just the overlaying problem of it being a shape at all.

HeroesGraveDev

JGO Kernel

Medals: 382
Projects: 11
Exp: 4 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

 « Reply #4 - Posted 2013-04-22 23:24:39 »

Same for polyhedrons, so it doesn't really matter in 2D or 3D, just the overlaying problem of it being a shape at all.

What the heck is a 2D polyhedron?

Agro
 « Reply #5 - Posted 2013-04-22 23:25:07 »

Sorry, I meant it doesn't matter if its a 2D polygon or a 3D polyhedron.

HeroesGraveDev

JGO Kernel

Medals: 382
Projects: 11
Exp: 4 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

 « Reply #6 - Posted 2013-04-22 23:26:42 »

Sorry, I meant it doesn't matter if its a 2D polygon or a 3D polyhedron.

Okay.

You'll have to make sure that chosen points don't already intersect the polygon.

But the 2D tutorials will surely show how to avoid that?

Agro
 « Reply #7 - Posted 2013-04-22 23:27:09 »

Well, then, it really isn't a problem anymore then

RobinB

JGO Ninja

Medals: 45
Projects: 1
Exp: 3 years

Spacegame in progress

 « Reply #8 - Posted 2013-04-23 07:52:04 »

I guess i did not explain myself very well.
My apologies, i may have used the wrong terms.

I want to achive this:

But then in 3d space (around a point cloud).
There is very little info about it, so i dont rally know how to call it.
RobinB

JGO Ninja

Medals: 45
Projects: 1
Exp: 3 years

Spacegame in progress

 « Reply #9 - Posted 2013-04-23 10:52:49 »

With some googling with more energy i found something what seems like what i would need: