View previous topic :: View next topic |
Author |
Message |
flashdog
Joined: 10 Oct 2008 Posts: 15
|
Posted: Fri Oct 10, 2008 4:21 am Post subject: algorithms |
|
|
Hello,
the following two pictures are only for clarification. I have a pattern which is described with different points (x,y,z). I can calculate distance between the points (see Fig 1).
Figure 2 has a lot of point (x,y,z) in space and now I would like to find the patter (Fig 1) in figure 2. It should possible to rotate the patter (Fig 1).
I know all coordinates of points in both figures. Exist already a algorithm to find a patter (Fig 1) in figure 2?
Best regards |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Fri Oct 10, 2008 5:30 pm Post subject: |
|
|
Just a first thought.
Pick an arbitrary point in Fig.1, make that the "origin," then take the polar coordinates of all points relative to the "origin." You could then test for the pattern by 'pinning' the origin to one of the points in the test pool, finding whether another arbitrary point from the pattern is present at the proper distance, adjusting the polar coordinates according to the angle of the second match, and finally testing whether the remaining points of the pattern are present where they should be.
Not particularly efficient, of course. I'm also very tired, so I may have missed an obvious optimization. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|