kingBook

导航

物理

1 N=1 kg·m/s²

F=ma

 

G=mg

G:重力,单位为牛顿(N);m:质量,单位为(kg);g:重力与质量的比值约是9.8N/kg。

 

 F=GMm/r2

∵F=ma=mg

∴mg=GMm/r2

∴g=GM/r2

g==GM/r2

g:重力加速度(m/s2);G:重力 G=F=mg;

 

 

 

 

v2=2gh

∵h=1/2gt2,v=gt,t=v/g,

∴h=1/2g(v/g)2

∴h=1/2gv2/g2

∴v2=h/(1/2g)g2

∴v2=h2g2/g

∴v2=2gh

 

自由落体模拟:

import flash.events.Event;
import flash.geom.Point;
import flash.display.MovieClip;

var _mc:MovieClip=getChildAt(0) as MovieClip;

var _ptm_ratio:Number=30;
var _dt:Number=0.02;
var _gravity:Point=new Point(0,9.8);
var _v:Point=new Point(0,-0.2);
var _pos:Point=new Point(400/_ptm_ratio,300/_ptm_ratio);


this.addEventListener(Event.ENTER_FRAME,update);
function update(e:Event):void{
    _v.offset(_gravity.x*_dt*_dt, _gravity.y*_dt*_dt);
    _pos.offset(_v.x,_v.y);
    
    trace(_pos);
    _mc.x=_pos.x*_ptm_ratio;_mc.y=_pos.y*_ptm_ratio;
}

---

posted on 2017-11-24 09:32  kingBook  阅读(232)  评论(0编辑  收藏  举报