Hi Paula,

we have made a class which takes the control ponits and generates the points
on the resulting Bezier Curve. The smoothness of the curve depends on the
number of division you pass. The result value will be points on the curve at
every "U"(fraction varies from 1 - U from first point on the curve to the
last point on the curve), you can join these points by a line array and
create the geometry.

nitin


> -----Original Message-----
> From: Yazel, David J. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 9:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Where are BezierSolver or any spline classes?
>
>
> I will post that tomorrow, but what it does is pick the two
> control pointed
> needed for the curveTo() method.  Based on the configuration
> of the solver
> it can generate control points which could render 4 points
> into a circle or
> a square.  In other words it is a useful utility class, but
> probably not
> what you are looking for.
>
> Dave Yazel
>
> -----Original Message-----
> From: Paula Sanchez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 11:42 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Where are BezierSolver or any spline classes?
>
>
> Hi Scott,
>
> Thanks for your answer.
>
> You are right, the crease angle just adjust the normals to smooths a
> little the look of the object when lit.
>
> Yes, I have been looking for Splines, B-Splines, NURBS and
> Bezier in J3D
> and I have not been able to find.  I was wondering if they were
> implemented.
>
> I just found some behaviors that can animate objects in splines
> trajectories.  So I hoped that there was some kind of already
> made spline
> method implemented in J3D for objects.
>
> I checked the code that David Yazel sent and I see a
> BezierSolver class.
> Where can I find that class?  Is that in com.xith... package?
>  Where can I
> get that package?
>
> Thanks a lot,
>
> Paula Sanchez
> [EMAIL PROTECTED]
>
> The fear of God is the beginning of knowledge.  St. Ivo
>
> On Wed, 24 Apr 2002, Scott wrote:
>
> > Date: Wed, 24 Apr 2002 19:44:33 -0500
> > From: Scott <[EMAIL PROTECTED]>
> > Reply-To: Discussion list for Java 3D API
> <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] Help smoothing polygon's edges
> >
> > Smoothing the normals won't eliminate jaggies and sharp
> edges, it will
> only
> > smooth out your lighting.
> >
> > You might want to look at creating some splines or bezier
> curves, and
> throw
> > a few more polygons into the mix.
> >
> > But to answer your question directly, a quick and dirty
> method of normal
> > smoothing (when you have face normals but not vertex normals) is:
> >
> > (your elevation grid from a Plan view)
> > P1    P2
> >
> > P3
> >
> > Normal of Point1 is:
> >
> > n.x=(P1.y-P2.y)/2.0;
> > n.y=1.0;
> > n.z=(P1.y-P3.y)/2.0;
> > n.normalize();
> >
> >
> > That has drawbacks (the furthest right row of vertex's have
> to be handled
> > differently), and overall it's not that accurate, but can
> certainly smooth
> > out your mesh.  If anyone has better methods, I'd love to hear them
> >
> > Scott
> >
> > ----- Original Message -----
> > From: "Paula Sanchez" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 24, 2002 6:27 PM
> > Subject: [JAVA3D] Help smoothing polygon's edges
> >
> >
> > > Hello Everyone,
> > >
> > > I am trying to create a surface with variations in
> elevation and layers
> of
> > > soil.  I would like to eliminate the sharp edges of the
> elevations and
> > > make them appear smoother.  Does anybody have any
> suggestions on how to
> do
> > > this in Java 3D.
> > >
> > > I have tried the crease angle, but I have not had any
> luck with it.  If
> > > you could send me a small sample of code, I will greatly
> appreciate it.
> > >
> > > Code changing the crease angle:
> > > NormalGenerator method setCreaseAngle((float) Math.toRadians(100)
> > >
> > > Something desireable could be what it is in the webpage:
> > > http://grunwald.ifas.ufl.edu/Projects/VR/VRML_files/vrml.html
> > >
> > > Thanks a lot,
> > >
> > > Paula.
> > > [EMAIL PROTECTED]
> > >
> > > Paula Sanchez
> > > [EMAIL PROTECTED]
> > >
> > > The fear of God is the beginning of knowledge.  St. Ivo
> > >
> > >
> >
> ==============================================================
> =============
> > > 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".
> >
> >
> ==============================================================
> =============
> > 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".
> >
>
> ==============================================================
> =============
> 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".
>
> ==============================================================
> =============
> 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".
>

Attachment: BezierCurve.java
Description: Binary data

Reply via email to