Hi Firas,
By triangulating the polygon, you seem to be trying to "close" the top and
bottom faces of the extruded solid, which you probably don't want to
do (on the other hand, that would be a nice feature in addition to
extrusion, I guess). Even if you do close the faces, the core problem of
extrusion would be to connect the vertices on the sides, rather than the
faces.
To me, extrusion seems like the (simpler) task of:
1. Making another copy of the same (arbitrary) polygon at a different
"height" to which you want to extrude.
2. Connect every pair of consecutive points (P(i), P(i+1)) on the first
polygon with the corresponding pair of points on the second (Q(i),
Q(i+1)), to form a quadrilateral face on the extruded surface. The order
of vertices on the face would be, say, (P(i), P(i+1), Q(i+1), Q(i)). You
could also make two triangles instead of one quadrilateral.
Hope that helped, and that I understood your problem correctly.
Regards,
Manu.
On Wed, 31 Jan 2001, firas wrote:
> Hello,
> I am new to Java3D and I have the following problem :
> I need to visualize 3D shapes which are extruded from 2d ones. Which
> means that the base is a 2d surface and the volume
> is only the extrusion for a certain height (or thckness) of this
> surface. My problem is that my 2d shape could be an arbitrary polygon.
> I saw that geometry in the core classes is limited to triangles or quads
> and that GeometryInfo which could be used to
> to specify arbitrary polygons by triangulating them. I tried this but
> not really satisfied
> I thought about doing some thing like "recatngulating" the 2d shape and
> after that build my volumes ? but this could not be
> very simple ..?
> Hope that I am clear please forgive if I did not read the docs very well
> ?
>
> Thanks for any help.
> Firas
>
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".