FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

algorithms

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
flashdog



Joined: 10 Oct 2008
Posts: 15

PostPosted: Fri Oct 10, 2008 4:21 am    Post subject: algorithms Reply with quote

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
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Fri Oct 10, 2008 5:30 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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