
-----------------------------------
kunal445
Wed Dec 21, 2011 6:50 pm

trebuchet simulator in turing
-----------------------------------
ok so i am trying to make a trebuchet simulator with Turing . i have attached a copy of what i have done so far however i need help of getting the graphic and for it to loop.

there are 3 error in it 
1. it wont let me put g as a constant 
2. it wont let me close brackets
3. it wont let me use sine and cosine function

plz help

-----------------------------------
chipanpriest
Wed Dec 21, 2011 7:08 pm

Re: trebuchet simulator in turing
-----------------------------------
okay first of all, your variable have to be real numbers if you are dividing and using sine or cosine

eg. var Mc,g,h,PE,e,KE,v,Mp,o,Vx,Vy,t,d : real

as opposed to what you have which is:var Mc,g,h,PE,e,KE,v,Mp,o,Vx,Vy,t,d : int

secondly, when you are using sine or cosine the syntax would be:Vx := v* cos (o)
Vy := v* sin (o)

instead of what you have which is:Vx := v*cos o
Vy := v*sin o


also, when you have:KE:= e*PE
thats not going to work because neither e nor PE have a value to them so the function wont happen

-----------------------------------
kunal445
Wed Dec 21, 2011 7:22 pm

Re: trebuchet simulator in turing
-----------------------------------
so when multiplying things in turing u have to keep space after *? btw e is 0.5J

-----------------------------------
chipanpriest
Wed Dec 21, 2011 7:50 pm

RE:trebuchet simulator in turing
-----------------------------------
you dont need a space but you need the () around the angle which in your case, is "o"

-----------------------------------
kunal445
Wed Dec 21, 2011 9:17 pm

Re: trebuchet simulator in turing
-----------------------------------
would Turing automatically turn my degrees into radians or is there a code for that?

-----------------------------------
Dreadnought
Wed Dec 21, 2011 9:25 pm

Re: trebuchet simulator in turing
-----------------------------------
You could use sind, cosd, and all the other trig functions that use degrees. Or you could write your own function to convert (its not very hard).

-----------------------------------
kunal445
Wed Dec 21, 2011 9:28 pm

Re: trebuchet simulator in turing
-----------------------------------
and also this makes a parabolic graph and i wish to include that as well in this could you plz help?
