Update instructions
This commit is contained in:
parent
0ac76265a0
commit
b11420daab
@ -184,21 +184,22 @@ def handle_wave_events():
|
||||
quit()
|
||||
|
||||
def show_data(screen):
|
||||
energy = 0.5*(sum(q*q for q in charge) + inductance*sum(i*i for i in current))
|
||||
energy = sum(temp)
|
||||
text = font.render('energy', True, (255, 255, 255))
|
||||
screen.blit(text, (20, viewsize))
|
||||
text = font.render(str(energy), True, (255, 255, 255))
|
||||
screen.blit(text, (120, viewsize))
|
||||
text = font.render('charge[0]', True, (255, 255, 255))
|
||||
text = font.render('temp[0]', True, (255, 255, 255))
|
||||
screen.blit(text, (20, 30 + viewsize))
|
||||
text = font.render(str(charge[0]), True, (255, 255, 255))
|
||||
text = font.render(str(temp[0]), True, (255, 255, 255))
|
||||
screen.blit(text, (120, 30 + viewsize))
|
||||
|
||||
if __name__ == '__main__':
|
||||
# set up background
|
||||
background = pygame.Surface(screen.get_size()).convert()
|
||||
background.fill((32, 32, 32))
|
||||
text = font.render('press [j] or [k] to pluck', True, (255, 255, 255))
|
||||
##text = font.render('press [j] or [k] to pluck', True, (255, 255, 255))
|
||||
text = font.render('press [j] to pluck', True, (255, 255, 255))
|
||||
background.blit(text, (340, viewsize))
|
||||
text = font.render('hold [space] to drain', True, (255, 255, 255))
|
||||
background.blit(text, (340, 30 + viewsize))
|
||||
|
Loading…
Reference in New Issue
Block a user