Esfera

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Esfera as PDF for free.

More details

  • Words: 132
  • Pages: 1
from visual import * scene.width = 800 #alto de la simulacion scene.height = 600 #ancho scene.autoscale = 0 #autoescala, se recomienda inhabilitar h = input("Da la altura: ") scene.center = (0,0,0) #donde centramos, en el vector (0,0,0), la unidad es el metro scene.range = (100,100,100) #cuanto mide cada eje bola = sphere(pos=(0,h,0),radius=2,color=color.red) #se invoca una esfera, con posicion y radio suelo = box(pos=(0,-1,0),size=(10,2,10),color=color.blue) #se invoca un bloque gravedad = 9.81 #declaro la gravedad tiempo = 0 #declaro tiempo diferenciat = .01 ebola = label(pos=(0,h,0),text='esto es un asteroide',box=0, opacity=0) etierra = label(pos=(0,-1,0),text='esto es la tierra',box=0, opacity=0) acabado = False while not acabado: rate(100) tiempo += diferenciat hbola = h-((.5*gravedad)*tiempo**2) bola.pos = vector(0,hbola,0) ebola.pos = vector(0,hbola,0) if hbola - 2 <= 0: acabado = True print "segundos que toma en caer: " + str(tiempo)

Related Documents

Esfera
June 2020 11
Esfera
November 2019 16
Ubps-esfera Biologica
June 2020 4