#### Archived

This topic is now archived and is closed to further replies.

# Basic math help needed...

This topic is 5638 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m making a game for my final project in programming, and I need a little help with curved lines. I''m making 3 Card Monty (http://www.isy.vcu.edu/~cstewart/info350/FinalProject.html) and need a way to move two of the cards around at the same time. I know how to actually do the code of animating the cards, but I don''t know how to come up with the equation to do it with an arc. Can anybody help me here?

##### Share on other sites
One way to do it would be by using projectil-like parametric equations. In other words, set an x velocity, and update that until it gets to the destination. Also set a y velocity, but also a y acceleration, updating the velocity with the acceleration (negative if you want an arc that goes up and returns down, positive if you want an arc that goes down then returns up). Note that whatever sign the y acceleration has, the initial y velocity should have the opposite sign.

Check out an introductor physics book for more detail on this simple method of doing things.

##### Share on other sites
I get the idea of what you are saying. I''m just not sure how to implement it. Do you know of any examples or anything?

##### Share on other sites
center of arc = (x,y)
rotation = t (for theta)

position of point on arc with given rotation = (cos(t)*r+x,sin(t)*r+y)

1. 1
2. 2
3. 3
Rutin
19
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633657
• Total Posts
3013197
×