Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. position_x = 40
  2. position_y = 200
  3. shift_position_x = position_x
  4.  
  5. for rod in self.rods:
  6.     shift_position_y = rod.cross_sectional_area / 2
  7.  
  8.     painter.drawRect(
  9.         shift_position_x,
  10.         position_y - shift_position_y,
  11.         rod.length,
  12.         rod.cross_sectional_area,
  13.         )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement