Roberto,
I don't see anything for automatic creation of arrows, but I do
know what the slopes are.
Using the naming conventions utilized by CubicCurve2D (which I
personally find to be a little strange), the curve at the (x1,y1) endpoint
is tangent to the vector from (x1,y1) to (ctrlx1,ctrly1). The curve at
the (x2,y2) endpoint is tangent to the vector from (ctrlx2,ctrly2) to
(x2,y2). You can get the angle of the vectors using the "Math.atan("
method. However, it is more likely that you will want to use an
AffineTransform object on a predefined arrowhead path.
FYI, If you want to know how to compute more advanced things like
the slope in the middle of a cubic curve, you might want to get a good
CAGD text like "Curves and Surfaces in CAGD" by G. Farin.
Hope this helps.
Sincerely,
Thorn Green
On Wed, 18 Aug 1999, Roberto Attias wrote:
> Hi,
> how can I create arrows with a CubicCurve2D, e.g adding a point to
> them? If it is not possible, how do I compute the angle of one
> extreme of the curve (so that I know how to orientate two segment
> for painting the point of the arrow)?
>
> Thanks,
> Roberto
>
> --
> Roberto Attias http://www.path.berkeley.edu/~attias
> California Path, UC Berkeley Email: [EMAIL PROTECTED]
> Richmond Field Station Bldg. 452 Office: (510) 231-5740
> 1357 S.46th St., Richmond CA 94804 FAX: (510) 231-9565
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-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 JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".