|
-
Oct 13th, 2000, 05:17 PM
#1
Thread Starter
Lively Member
i'm looking for the best way to move a ball on a
angle with velocity
I think i could use y = mx + b or somthing
eg.
angle = 90:velocity = 1
this will send the ball up slowly.
(i don't want to say ware the ball will go just the angle)
[Edited by BIacksun on 10-13-2000 at 06:46 PM]
-
Oct 13th, 2000, 05:53 PM
#2
transcendental analytic
Code:
vy=sin(angle)*Velocity
Vx=cos(angle)*Velocity
well you move the ball like with a velocity vector, add the velocity component x and y to the ball coordinates.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 13th, 2000, 05:58 PM
#3
Frenzied Member
No that's a equation for a linear thing!
you should use something like y =x*x
or you could use a 'ballistic' equation.
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 13th, 2000, 06:07 PM
#4
transcendental analytic
Misantrop, ballistical equations are quite too complicated for this case
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 13th, 2000, 06:08 PM
#5
Thread Starter
Lively Member
this is starting to work
Velocity = 1
ang = 90 * 3.14159
Do
X = Shape2(1).Left
y = Shape2(1).Top
X = X + Sin(ang)
y = y + Cos(ang)
Shape2(1).Left = X
Shape2(1).Top = y
For n = 1 To 1000
DoEvents
Next n
a = a + 1
Loop Until a = 1000
-
Oct 13th, 2000, 06:27 PM
#6
transcendental analytic
wait a minute, you have to convert pi/180 degrees to get radians:
Code:
ang = 90 * 3.14159 /180
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|