Path

I wanna move rectangle or any shape on a curve.Can any body guide me?There is a createpath on java 2D but just drawing curves and not mantaining the points.Thanks
[190 byte] By [hosseinj2mea] at [2007-10-2 21:17:26]
# 1

There are two easy ways to find the points on a curve:

1 — use the parametric equations to find x and y over the parameter range [0 <= t <= 1.0]. These equations are shown in the SEG_QUADTO and SEG_CUBICTO field details of the PathIterator api.

2 — use a PathIterator with a flatness appropriate for the curve/parent size (0.01 to 0.001 range ballpark) and iterate along the curve to retrieve the x, y coordinates.

[url=http://forum.java.sun.com/thread.jspa?threadID=724953]This example[/url] shows the basic techniques.

74philipa at 2007-7-14 0:25:57 > top of Java-index,Security,Cryptography...