Математика |
Зарисовка модели |
Загрузить модель |
Исходник |
global a,n,n1,h,h1,h2,h3,h4 global h5,h6,h7,h8 property s,t,zmy,xmy,y1,y2,y3,y4,y5 property y6,y7,y8,y9 property zmy6,zmy7,zmy8,zmy9 property xmy6,xmy7,xmy8,xmy9 property n6,n7,n8,n9 on beginsprite me
myMember = sprite(me.spriteNum).member myMember.resetWorld()
-- Initial data a=0 h=0
n=0 h1=0 y1=0 y2=0 ------------------------------------- h4=0 h5=0 h6=0 h7=0 h8=0 ------------------------------------- y6=0 y7=0 y8=0 y9=0 ------------------------------------- xmy=0 xmy6=0 xmy7=0 xmy8=0 xmy9=0 end
on exitFrame me
if (a=1) then
U0=2 --[метр]/cек
Ugol=PI/4.0
if (y2<= 1.4500 ) then
member("Pinpoll").model("Sphere02").translate(0,0,-2*y2,#world)
h= h+1 y2=h*0.05 -- u=2h/t
put y2 end if --h=1
if (y1<=1.6500 ) then
member("Pinpoll").model("Sphere03").translate(0,0,-2*y1,#world)
h1=h1+1 y1=h1*0.05
--put y1 end if --h1=1
if (y6<= 1.55 ) then
member("Pinpoll").model("Sphere04").translate(0,0,-2*y6,#world)
h4= h4+1 y6=h4*0.05 -- u=2h/t
--put y2 end if --h=1
if (y7<= 1.50 ) then
member("Pinpoll").model("Sphere07").translate(0,0,-2*y7,#world)
h6= h6+1 y7=h6*0.05 -- u=2h/t
--put y2 end if --h=1
if (y8<= 1.55 ) then
member("Pinpoll").model("Sphere08").translate(0,0,-2*y8,#world)
h7= h7+1 y8=h7*0.05 -- u=2h/t
--put y2 end if --h=1
if (y9<= 1.55 ) then
member("Pinpoll").model("Sphere09").translate(0,0,-2*y9,#world)
h8= h8+1 y9=h8*0.05 -- u=2h/t
--put y2 end if --h=1
------------------------------------------------------------- ------------------------------------------------------------- if (y2>= 1.4500 ) then a1=-9.8/(2*U0*U0*(cos(Ugol)*cos(Ugol))) b1=((sin (Ugol))/cos(Ugol))
zmy6=a1*((xmy6+b1/(2*a1)))*((xmy6+b1/(2*a1)))-(b1*b1/(4*a1)) member("Pinpoll").model("Sphere02").translate(U0*cos(Ugol ) ,0,(xmy6)*(sin(Ugol))/cos(Ugol)+2*zmy6,#world)
h5=h5+1
xmy6 =h5*0.01
end if --h=1
if (y1>=1.6500 ) then a1=-9.8/(2*U0*U0*(cos(Ugol)*cos(Ugol))) b1=((sin (Ugol))/cos(Ugol))
zmy7=a1*((xmy7+b1/(2*a1)))*((xmy7+b1/(2*a1)))-(b1*b1/(4*a1)) member("Pinpoll").model("Sphere03").translate(U0*cos(Ugol ) ,0,(xmy7)*(sin(Ugol))/cos(Ugol)+2*zmy7,#world) h6=h6+1
xmy7 =h6*0.01
end if --h=1
if (y7 >= 1.50 ) then a1=-9.8/(2*U0*U0*(cos(Ugol)*cos(Ugol))) b1=((sin (Ugol))/cos(Ugol))
zmy8=a1*((xmy8+b1/(2*a1)))*((xmy8+b1/(2*a1)))-(b1*b1/(4*a1))
member("Pinpoll").model("Sphere07").translate(U0*cos(Ugol ) ,0,(xmy8)*(sin(Ugol))/cos(Ugol)+2*zmy8,#world) h7=h7+1
xmy8 =h7*0.01 end if --h=1
if (y8 >= 1.55 ) then
a1=-9.8/(2*U0*U0*(cos(Ugol)*cos(Ugol))) b1=((sin (Ugol))/cos(Ugol)) zmy9=a1*((xmy9+b1/(2*a1)))*((xmy9+b1/(2*a1)))-(b1*b1/(4*a1))
member("Pinpoll").model("Sphere08").translate(U0*cos(Ugol ) ,0,(xmy9)*(sin(Ugol))/cos(Ugol)+2*zmy9,#world) h8=h8+1
xmy9 =h8*0.01
end if --h=1
If (y9>=1.60 ) then
a1=-9.8/(2*U0*U0*(cos(Ugol)*cos(Ugol))) b1=((sin (Ugol))/cos(Ugol))
zmy=a1*((xmy+b1/(2*a1)))*((xmy+b1/(2*a1)))-(b1*b1/(4*a1)) ---------------------------------------------
member("Pinpoll").model("Sphere09").translate(U0*cos(Ugol ) ,0,(xmy)*(sin(Ugol))/cos(Ugol)+2*zmy,#world)
--put zmy
n=n+1 --xmy =x0+nh --nh -- xmy = n xmy =n*0.05 --------------------------------------- --------------------------------------- --xmy=xmy +1--шаг пути ------------------------------------------ ------------------------------------------
end if --xmy<=74
end if --a=1
go the frame
end
|