Post by honkytonk on Oct 4, 2022 16:24:22 GMT
Hello,
Who could put me this damn formula in this interface
I think "z" is --->"y"
"v0" is the initial velocity.
"z0" is the height from which the projectile is fired.
"alpha" is--->: "theta" (optional).
The problem: I don't know what to do with (t).
For mass, normally; it is in the initial speed (e=1/2 m*v^2), so you don't have to worry about it???
Thank you for.
The formula (clic on for zoom):
Who could put me this damn formula in this interface
I think "z" is --->"y"
"v0" is the initial velocity.
"z0" is the height from which the projectile is fired.
"alpha" is--->: "theta" (optional).
The problem: I don't know what to do with (t).
For mass, normally; it is in the initial speed (e=1/2 m*v^2), so you don't have to worry about it???
Thank you for.
NOMAINWIN
mapw=650: maph= 400
WindowWidth=mapw+15: WindowHeight=maph+40
UpperLeftX = 10: UpperLeftY = 20
TEXTBOX #w.v0, 70, 20, 60, 25
TEXTBOX #w.theta, 215, 20, 60, 25
' TEXTBOX #w.m, 70, 55, 80, 25
TEXTBOX #w.d, 205, 55, 120, 25
BUTTON #w.go, "Go!", [go], UL, 485, 20, 40, 25
GRAPHICBOX #w.g, 5, 5, mapw, maph
OPEN "Help" FOR window_nf AS #w
#w, "TRAPCLOSE [closeHelp]"
#w.g, "down;fill darkgreen;color white;backcolor darkgreen;size 2"
#w.g, "font courrier 12 bold"
#w.v0, "!font courrier 12 bold": #w.v0, "???" '<---Put your valor here
#w.theta, "!font courrier 12 bold": #w.theta, "???" '<---Put your valor here
'#w.m, "!font courrier 12 bold": #w.m, "0.1"
#w.d, "!font courrier 12 bold"
#w.g, "place 10 30": #w.g, "\v0 --->": #w.g, "place 130 30": #w.g, "\Theta --->"
' #w.g, "place 10 70": #w.g, "\m --->":
#w.g, "place 160 70": #w.g, "\d --->"
#w.g, "place 295 30": #w.g, "\<--- Change and Go --->"
#w.g, "flush"
' m = 0.1 '1 'fixed mass of stone in kg. 0.1
' A = 0.002 'csa of stone in m^2.
' g = 9.81 'acc'n of gravity m^s2.
' D = 1.2 'density of air.
' Cd = 0.75 'allows for the shape.
' v = 0.005 '60 'release velocity in m/s.
' theta = 30 'release angle in degrees,
' theta =theta /180 *3.14159265 ' ... changed to radians.
' y = 0 'initial vertical height.
' vy = v *cos( theta) 'initial vertical vel'y.
' x = 0 'initial horizontal position.
' vx = v *sin( theta) 'initial horizontal vel'y.
' t = 0 'initial time. s
' dt = 0.001 'time interval between updates.
' wait
[go]
#w.v0, "!contents? v0$": v0=val(v0$)
#w.theta, "!contents? theta$": theta=val(theta$)
theta=theta /180 *3.14159265
' #w.m, "!contents? m$": m=val(m$)
t=0: y=0: x=0
[fire]
scan
'Put the magic formula here
'And what it takes to make it work the damned (t)
'A million thanks
wait
[closeHelp]
CLOSE #w
END
The formula (clic on for zoom):