
-----------------------------------
JSBN
Sat May 31, 2003 5:07 pm

Trajectory
-----------------------------------
This program creats trajectories. you input the Velocity and anlge, and it gives u max height and distance. I will post the source after i hand in my ISU, as it is employed in it. It also draws an arc, showing you it's path.

OK HERES THE CODE:

%Variable Explanation:
%x = Velocity
%y = angle
%power = (Velocity = Vo)
%angle = angle
%v1 = Vxo
%v2 = Vyo
%t = time
%t2 = time / 2
%d = distance
%h = height

%Actual Program:

var x,y,velocity,angle,v1,v2,t,t2,d,h: real
put "Velocity:"
get velocity
x:=velocity
put "Angle:"
get angle
y:= angle
v1 :=x* cosd(y)
v2 :=x* sind(y)
t := (2* v2)/(9.8)
d:=v1 * t
t2:= v2 /9.8
h := v2*t2 - (0.5*(9.8 * (t2**2)))
put "Final distance: ",d
put "Max Height: ",h
Draw.Arc((d) div 2,0,(d) div 2,round(h),0,180,black)


-----------------------------------
JSBN
Sun Jun 01, 2003 11:41 am


-----------------------------------
So what do you guys think?
(w00t 200th post! 8) )

-----------------------------------
Martin
Sun Jun 01, 2003 11:56 am


-----------------------------------
Eek, you're catching up to me ;)

-----------------------------------
Martin
Sun Jun 01, 2003 11:56 am


-----------------------------------
Looks pretty cool by the way. Making anything with this?

-----------------------------------
JSBN
Sun Jun 01, 2003 1:04 pm


-----------------------------------
I will post the source after i hand in my ISU, as it is employed in it. 

-----------------------------------
Asok
Sun Jun 01, 2003 2:59 pm


-----------------------------------
you should all download JSBN's ISP when he posts it to see this subprogram in action... it's a well... u'll see. :roll:

-----------------------------------
skatelhs
Sun Jun 01, 2003 4:25 pm


-----------------------------------
its really good, but can i suggest putting in something like "max height: 2222 METERS or CENTIMETERS" or some kind of classification.  same thing when asking for angle, and tragectory.otherwise really good!

-----------------------------------
PaddyLong
Sun Jun 01, 2003 8:06 pm


-----------------------------------
why woudl you do that skatelhs?  it's not like it's asking for the input velocity in meters/second or whatever 


I am assuming he is just using earth's gravity of 9.8m/s^2 in his calculations ... but really that value could be anything...

-----------------------------------
JSBN
Sun Jun 01, 2003 9:39 pm


-----------------------------------
yes, earth's gravity is employed. it's 9.8m/s^2

-----------------------------------
JSBN
Fri Jul 04, 2003 11:09 am


-----------------------------------
BUMP

-----------------------------------
krishon
Fri Jul 04, 2003 11:14 am


-----------------------------------
bump????

-----------------------------------
JSBN
Fri Jul 04, 2003 11:18 am


-----------------------------------
Bump.... It "bumps" the topic back to the top of the forum If i had just editied my first post, this topic, as far as i know, would still be a few pages back. So..... Yea....

-----------------------------------
krishon
Fri Jul 04, 2003 5:14 pm


-----------------------------------
ohhh...k sry

-----------------------------------
JSBN
Sun Jul 06, 2003 12:13 pm


-----------------------------------
d'o worry about it
