04-06-2015 04:46 PM - edited 04-06-2015 04:47 PM
In this case he probably doesn't need to return to the start point, so the problem is simplified:
Also, the number of points is probably small, so the computation time should be quite quick for the shortest path.
04-07-2015 01:41 AM
Yes, the "Travelling salesman problem" is exactly what i search for. Thank you very much. Now i only need to study hard....!
04-07-2015 02:34 AM
04-08-2015 05:09 AM - edited 04-08-2015 05:14 AM
I don't think brute force will be applicable. With only 10 points in space i must check (10-1)!/2=181.440 different paths.
04-08-2015 05:27 AM
04-08-2015 05:31 AM
It was only an example, if the user begin to add points where to move the camera (my software must be programmable) i fear i can get stuck in the optimization routine.
GerdW ha scritto:
Hi FM,
with just 180k possible paths you can employ brute force…
04-08-2015 07:11 AM
Consider your requirements. Do you need absolutely the shortest path, or an "efficient tour" (i.e. "one of the shorter paths")? Do you have a fixed starting point, or is it arbitrary (in which case there may be different "shortest paths")? Can you visit a point more than once on a tour?
I suspect that if conditions are relaxed a little, adding a new point becomes computationally much simpler. For example, if the sequence p(i) (where i goes from 1 to N, number of points) is your current "good" path, take your new point, put it between successive p(i) and p(i+1), and see which of the N paths is shortest. Note that this will (almost certainly) degrade if you do it multiple times, but to add, say, 3 points to a tour of 10, I'd guess it wouldn't be too bad.
Bob Schor