Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (529)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  3D polygon triangulation algorithm  (Read 1331 times)
0 Members and 1 Guest are viewing this topic.
Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Posted 2013-04-22 22: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.

Thanks in advance.
Robin
Offline gouessej
« Reply #1 - Posted 2013-04-23 01:13:57 »

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

Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


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


« Reply #2 - Posted 2013-04-23 01: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.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Agro
« Reply #3 - Posted 2013-04-23 01: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.

Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


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


« Reply #4 - Posted 2013-04-23 01: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?

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

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

Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


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


« Reply #6 - Posted 2013-04-23 01: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?

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

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

Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #8 - Posted 2013-04-23 09: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.
Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


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

With some googling with more energy i found something what seems like what i would need:
http://www.cse.unsw.edu.au/~lambert/java/3d/giftwrap.html
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (31 views)
2014-07-18 06:55:21

Zero Volt (27 views)
2014-07-17 23:47:54

danieldean (23 views)
2014-07-17 23:41:23

MustardPeter (24 views)
2014-07-16 23:30:00

Cero (39 views)
2014-07-16 00:42:17

Riven (41 views)
2014-07-14 18:02:53

OpenGLShaders (28 views)
2014-07-14 16:23:47

Riven (28 views)
2014-07-14 11:51:35

quew8 (25 views)
2014-07-13 13:57:52

SHC (62 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!