Hi! I dont know about spline equations. Try to see in classes source: com.sun.j3d.utils.behaviors.interpolators.KBCubicSplineSegment com.sun.j3d.utils.behaviors.interpolators.KBCubicSplineCurve com.sun.j3d.utils.behaviors.interpolators.CubicSplineSegment com.sun.j3d.utils.behaviors.interpolators.CubicSplineCurve
Point is that I had rather difficult Java3D application with various functionality: a lot of self-made behaviots and interpolators, scene loader, picker and others... I's rewritten RotPosScaleTCBSplinePathInterpolator and attendant classes (CubicSplineSegment and CubicSplineCurve) for my needs and not investigated in detail how this work mathematically thanks to most mathematics hide in CubicSplineSegment and CubicSplineCurve. I just needed use CubicSplineSegment and CubicSplineCurve to cubic interpolation through Alpha some my parameters (points of trajectory and xRot and yRot angles). I can get current spline point directly in my application (just from root TransformGroup). I was needed to smooth flying over some mount area. I adjust (whith mouse based behavior) necessary consecution of views and save those as keyframes. Then I manually apply needed Alpha and t, c, and b parameters. I know, that cubic spline can be made in 3D Studio Max and then exported in ASE format to use later, but I didn't worked with this in detail and don't know what kind of spline may can do and what spline parameters can be exported. I hope if you ask for help a man who work with 3D Studio Max he(she) will help you. Sorry for my english... Vladimir A. Vernikovski Programmer ------------------------------------------- JPROOF Technologies Ltd. ----- Original Message ----- From: "Nick Stark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 04, 2003 10:20 PM Subject: Re: [JAVA3D] 3D Cubic Splines > Alright, I found a method that gives the transform based on the alpha > value, so I've figured that part of it out. However, is there some access > in Java to get the spline equations (I need first and second derivatives at > various points on the splines)? > > If not, I assume they must be calculated manually...but after reading the > K-B Cubic Spline document, it appears that the equations will not work > correctly for the first and last spline segment. > > Any clarifications out there? Sorry to keep this going. > > Thanks, > Nick > > > > > > I've read the kochbart.pdf link that you've sent, and it was quite helpful > in understanding the math behind the interpolator. However, I see a method > in the KBSplinePathInterpolator class called computePathInterpolation, but > it is a protected method. It seems like it is something like this that I > would want to have access to in order to find many discrete points along > the spline path so that I could draw a polyline approximating the spline. > I'm still not able to see how to get at either the actual points lying > along the spline's path or how to get the equations of the spline in some > parametric form so that I can calculate these points myself. > > Thanks, > Nick > > > > > Yes, unfortunately we must one's own to find how this work. > Let's see API: > "RotPosScaleTCBSplinePathInterpolator behavior. This class defines a > behavior that varies the rotational, translational, and scale components of > its target TransformGroup by using the Kochanek-Bartels cubic spline > interpolation to interpolate among a series of key frames (using the value > generated by the specified Alpha object). The interpolated position, > orientation, and scale are used to generate a transform in the local > coordinate system of this interpolator." > All Java3D spline interpolators based on Kochanek-Bartels cubic spline > mathematics. > > I found this usefull information about Kochanek-Bartels cubic spline: > http://www.cubic.org/~submissive/sourcerer/hermite.htm > http://www.magic-software.com/Documentation/kochbart.pdf > > Probably are other sources... > To understand how this work read above links information then see inside > source of RotPosScaleTCBSplinePathInterpolator. Onse I rewrite > RotPosScaleTCBSplinePathInterpolator and attendant classes for my needs. > > > Vladimir A. Vernikovski > Programmer > ------------------------------------------- > JPROOF Technologies Ltd. > ----- Original Message ----- > From: "Nick Stark" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 04, 2003 6:59 PM > Subject: Re: [JAVA3D] 3D Cubic Splines > > > > Yeah, these were the spline classes I was referring to in my email. I > read > > through the API documentation, but there is very little explanation of > the > > variables in the KeyFrames. So it's quite difficult to understand how to > > construct one of these spline interpolators. If someone has some sample > > code using any of these objects, I'd love to take a look at it to get > some > > understanding of what's going on. > > > > Thanks again, > > Nick > > > > > > > > Hi! > > In Java3D is some interpolators for spline animation: > > KBRotPosScaleSplinePathInterpolator > > KBSplinePathInterpolator > > RotPosScaleTCBSplinePathInterpolator > > TCBSplinePathInterpolator > > > > Try to use. Read API documentation. Those realy work! > > > > Vladimir A. Vernikovski > > Programmer > > ------------------------------------------- > > JPROOF Technologies Ltd. > > ----- Original Message ----- > > From: "Nick Stark" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, June 04, 2003 6:42 PM > > Subject: [JAVA3D] 3D Cubic Splines > > =========================================================================== > 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".
