List Info

Thread: Bezier / Vector Shape




Bezier / Vector Shape
user name
2006-11-29 22:17:26
Danny Kodicek wrote:
> you need for your situation. The only simple solution
is to approximate the
> curve with line segments, then traverse your line
segments at the speed you
> want to use.

Min,

My own approach is to solve the curves using small steps to
create a 
list of point perhaps 5-10 times as dense as the number of
movement 
steps I need. So, if I was going to make cars move around a
track and I 
expected to need 100 different positions along a curve
segment of the 
the track (as an example), I might generate a total of 1000
points along 
that segment. Then I'd sum the distance between all of the
points to get 
the length of the curve, as Danny suggests. Once you've done
that for 
all of the curves making up your track path, you can decide
how to 
subdivide them. Say you get to the curve segment mentioned
above where 
you want 100 possible positions along the curve. Instead of
taking every 
tenth point, where the distance varies depending on the
curvature, you 
look for points at a specific (cumulative) distance from the
last point, 
which might be the fourth point or the fifteenth.


-- 
-------------------------------------------------
        Darrel Plant, dplantmoshplant.com
      www.moshplant.com | www.darrelplant.com
               503.490.1388 (cell)
"Those who do not learn from history are stupid."

_______________________________________________
dirGames-L mailing list  -  dirGames-Lnuttybar.drama.uga.edu
http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames
-l
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )