View Single Post
  #2  
Old 08-19-2011, 06:22 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can create a for loop to iterate through the positions in your m_pos list. Each position is itself a list of X,Y values. For example, the following checks to see if a position is in the top right quadrant:
Code:
m_pos1=[0.3,0.3]
m_pos2=[0.8,0.2]
m_pos3=[0.8,0.8]
m_pos = [m_pos1,m_pos2,m_pos3]

for pos in m_pos:
	if pos[0] > 0.5 and pos[1] > 0.5:
		print pos,'is in the top right quadrant'
Reply With Quote