I have a set of points which define a route and I must draw them so a vehicle's moving direction is denoted. The points may be from a curve and I need to draw some arrows. I want to draw arrows on the route to define which arrow vehicle goes. I have a mapviewr java applet and the last I must do is this work, I want to define arrows on every 10 points on the route.
A thing like this: alt text http://img517.yfrog.com/img517/7690/schermafbeelding2010032.png
Asked
Active
Viewed 1,220 times
0

Dennis Williamson
- 346,391
- 90
- 374
- 439

sirvan
- 321
- 1
- 8
- 21
-
did the image come with the homework assignment? – catchmeifyoutry May 17 '10 at 13:25
-
So the text is from a homework assignment. Please tag it as homework. – catchmeifyoutry May 17 '10 at 13:56
-
i am working on an AVL project and it is not a homwork, thanks for your attention – sirvan May 18 '10 at 13:23
3 Answers
0
I would suggest you to take a look at Java2D shapes :they allow you to define any kind of ... well ... shape and draw them on a given path. You can take a look at this tutorial or at Sun tutorial.

Riduidel
- 22,052
- 14
- 85
- 185
0
In addition to what Riduidel said you should also try to get the angle that results from the intersection of the line with OX. Using that angle you could calculate a transformation matrix to draw the arraws neatly aligned to the line.

Sanctus2099
- 1,669
- 5
- 22
- 40
0
Pete Kirkham posted a full working example a few months ago in How to draw a directed arrow in Java?

Community
- 1
- 1

Vicente Reig
- 877
- 9
- 14