I think that the -1 is actually a subscript:
| ( V(i-1) - V(i) ) - ( V(i) - V(i+1) ) |
Look at the attached diagram to see what this means.
I also assume that the "||" mean you want the length of the vector.
Are you missing out on how to perform this vector math? This you can
pick up in a Calculus book. Or do you want to know how to do it in
Java3D? Because the functions are already there...
Vector3f[] v = (your vertices);
float doTheFunction(int i)
{
Vector3f A = new Vector3f();
A.sub( v[i-1], v[i] );
Vector3f B = new Vector3f();
B.sub( v[i], v[i+1] );
Vector3f C = new Vector3f();
C.sub( A, B );
return( C.length() );
}
Hope this helps...
-Lee
J. Lee Dixon
SAIC - Celebration, FL
407-566-1438
[EMAIL PROTECTED] AOL: LeeOrlando
> -----Original Message-----
> From: Robert Pies [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 06, 2001 7:30 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D]
>
>
> Hi Tien,
>
> I can't make sense out of your expression for at least 2 reasons:
>
> a) if Vi is a vector (xi,yi), the term 'Vi-1' doesn't make sense
> b) 'Vi-Vi' would be (0,0), so all the Vi's in your expression cancel
> out...
>
> Maybe the '-' in your expression is really a '*' denoting the
> (inner) vector-product?
>
> If you tell the mailinglist what you're trying to do, maybe some-
> one can make sense of it and help you.
>
> cheers,
>
> Robert.
>
>
>
> > Tien Tran Thuong wrote:
> >
> > Hello,
> >
> > Could anyone show me please how to calculate the expression below :
> >
> > | ( Vi-1 - Vi ) - ( Vi - Vi+1 ) |
> >
> > Where Vi = (xi,yi) is coordinate of the i-th vertex.
> >
> > Thank you in advance
>
> --
>
> ---------------------------------------------------
> Robert Pies
> Ludwigstr. 58
> 04315 Leipzig
> Germany
> +49-341-6888217 (phone&fax)
> [EMAIL PROTECTED]
>
>
> --
>
> ---------------------------------------------------
> Robert Pies
> Ludwigstr. 58
> 04315 Leipzig
> Germany
> +49-341-6888217 (phone&fax)
> [EMAIL PROTECTED]
>
> ==============================================================
> =============
> 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".
>
vectors.jpg