Posted: Fri Feb 20, 2004 11:51 pm Post subject: physics and applying it to programming
im trying to learn how to apply physics (grade 10) to programming, but its really hard, and im not very good at that kind of stuff. if anyone wants to post something that could be helpful, and easy to understand, it would be really good for me and some other people who may not know what to do. ive heard catalyst can explain this stuff good....
Posted: Sat Feb 21, 2004 12:34 am Post subject: (No subject)
I dont think thats the way it works... you dont just learn a concept and stick that into your program. Its rether you're writing a program and you're required to use a specific approach.
Oftentimes in games you would be required to model physically correct situations, and thats where knowledge comes in.
So how about you tell us what you want to know, and we'll fill you in
Posted: Sat Feb 21, 2004 9:30 am Post subject: (No subject)
well i was bothering shorthair about this, and i was trying to get realistic acceleration and speed. this is what i got:
this has nothing to do with the formula a=v/t (i think) which i was trying to apply, but this is all i could work out:
setscreen ("graphics:700, 100")
var a : int := maxy div 2
var b, c : int := 1
drawline (20, 0, 20, maxy, black)
drawline (maxx - 20, 0, maxx - 20, maxy, black)
drawoval (a, maxy div 2, 5, 5, brightred)
a := a + b
b := b + 1
c := b
exit when a > maxx - 20
Posted: Sat Feb 21, 2004 10:24 am Post subject: (No subject)
Why do you have c in there? It isn't doing anything
I know where you're coming from Jonos. I wanna learn physics too But you can't expect to learn all the physics you need from compsci. I think we're just gunna have to wait until gr 11
But in the time being, just copy code from other ppls programs thoughtful's pool owns
Posted: Sat Feb 21, 2004 10:30 pm Post subject: (No subject)
finally!!! someone who knows what it feels like. the c was there for something else i was trying but didn't work. i just forgot to remove it. yeah, maybe i should just wait, or try making simple things.
does the acceleration thing look okay though?
Posted: Sat Feb 21, 2004 11:30 pm Post subject: (No subject)
i know its good (thoughtful's thing), but i need to know about the cos and sin and tan and all that, so maybe i should just wait, or read the math text (we aren't there yet)
Posted: Sun Feb 22, 2004 1:40 am Post subject: (No subject)
i recomend teaching yourself trig from math 10 first, then forces from physics 11
the cool thing is that not only will it help you in programming, but you'll also do great when it comes to actually 'learning' those units in school
Posted: Thu Feb 26, 2004 10:45 am Post subject: (No subject)
I once made a VB program that graphed projectile motion. All you had to input was the initial velocity upward.
It can be graphed as a quadratic function like this:
Y = V1(X) - 9.8 (X^2)
Where Y is the height, X is the time in seconds, and V1 is the initial velocity. Since the acceleration due to gravity is 9.8 m/s^2 the maximum Y value will be the maximum height of the projectile, and the second X value will be when the object hits the ground.
Posted: Thu Feb 26, 2004 6:08 pm Post subject: (No subject)
tony -> Forces in Gr 11? Is that different from the motion unit that my class did in gr 10 science?
we did a bunch of stuff with vectors, Scale Diagrams and (crappy having Math sem 2 and science sem 1) kinematic equations.
Posted: Thu Feb 26, 2004 6:35 pm Post subject: (No subject)
If you plan to do a lot of math or physics work when it comes to programming, it may be worth it check out a functional programming language like Haskell, Lisp, OCaml, or even Dylan.
Posted: Thu Feb 26, 2004 8:32 pm Post subject: (No subject)
Cervantes -> gr11 physics takes a deeper look at the workings of the kinematics... like various forces involved and such... I dont really remember anything from grade 10... such a long way back