From: Martin <ma...@he...> - 2010-02-06 13:18:14
|
Hi Michael, as you probably know i am trying to implement moving objects (cars...) within geotools! A vehicle(moving object) has a current position and whenever I tell it to move to a destination position some geometric calculation steps have to be done (Disregarding the animation now!). One possible, and the easiest implementation for the vehicle is just to jump to the destination position! But this isn`t what I need. I need the vehicle to jump in smaller steps from the current ! So my idea: I calculate the connection vector(v1) between the 2 points! I normalize v1 and multiple it with a given factor = v2! With the currentposition point combined with v2 I can easily calculate the next movement(step) point. This is all about calculation with vectors ! And of course many ways lead to rom but I think this would be the easiest "way" Hoping it is now clear what I am trying to implement! Best regards; Martin |