Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
How to create a custom shape?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How to create a custom shape? (Read 2252 times)
hak47
byte
Posts: 2
How to create a custom shape?
«
on:
September 03, 2010, 04:25:49 am »
Hi, i'm a newbie of JPCT and very interesting in this.
I want create an custom shape Object3D (Ex: ellipse) if i know x,y,z equation
Code:
[Select]
(x^2 / a^2)+(y^2 / b^2)+ (z^2 / c^2) = 1
Can i do that?
Thanks!!
«
Last Edit: September 03, 2010, 08:07:22 am by hak47
»
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: How to create a custom shape?
«
Reply #1 on:
September 03, 2010, 04:42:14 pm »
That formular describes all the points that lie on the ellipse. I'm not sure if this is really helpful when creating a polygon mesh. I would rather take the sin/cos-approach for this. However, you can create custom objects by using the addTriangle(...) methods in Object3D. How to obtain the triangles' coordinates is up to you.
Logged
hak47
byte
Posts: 2
Re: How to create a custom shape?
«
Reply #2 on:
September 03, 2010, 05:34:53 pm »
Thank you, i will try it.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
How to create a custom shape?