Changeset 684
- Timestamp:
- 09/03/17 15:57:13 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mds-and-trees/tree-genealogy.py
r683 r684 243 243 sublines = 50 244 244 # TODO could be faster: compute delta and only add delta each time (but currently we do not use it often) 245 normdiv = 2*sublines-1 245 246 for i in range(sublines): 246 from_pos_sub = (self.compute_value(from_pos[0], to_pos[0], 2*i/ (2*sublines-1), 1),247 self.compute_value(from_pos[1], to_pos[1], 2*i/ (2*sublines-1), 1))248 to_pos_sub = (self.compute_value(from_pos[0], to_pos[0], (2*i+1)/ (2*sublines-1), 1),249 self.compute_value(from_pos[1], to_pos[1], (2*i+1)/ (2*sublines-1), 1))247 from_pos_sub = (self.compute_value(from_pos[0], to_pos[0], 2*i/normdiv, 1), 248 self.compute_value(from_pos[1], to_pos[1], 2*i/normdiv, 1)) 249 to_pos_sub = (self.compute_value(from_pos[0], to_pos[0], (2*i+1)/normdiv, 1), 250 self.compute_value(from_pos[1], to_pos[1], (2*i+1)/normdiv, 1)) 250 251 self.add_line(file, from_pos_sub, to_pos_sub, style) 251 252
Note: See TracChangeset
for help on using the changeset viewer.