Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question
Angle / Force / Trignometry question Angle / Force / Trignometry question
Angle / Force / Trignometry question
Go Back  Xtreme Visual Basic Talk > > > Angle / Force / Trignometry question


Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2008, 02:32 AM
FrameRateMax FrameRateMax is offline
Newcomer
 
Join Date: Feb 2008
Posts: 4
Default Angle / Force / Trignometry question


Hi everyone, I am inquiring on how to program a "force based angle" system for momentum.
Example, I apply a force of 5 to a ball at 10 degrees (if this was a right triangle, side C would be 5). Then I want to be able to apply a different force at a different angle, say Force 20 at 80 degrees, and then I want the ball's new trajectory to move with these forces combined. Any suggestions on turning an angle into X+Y speeds, and how to combine forces? Thanks!
Reply With Quote
  #2  
Old 04-28-2008, 03:28 AM
Rockoon's Avatar
Rockoon Rockoon is offline
Joseph Koss

* Guru *
 
Join Date: Aug 2003
Location: Unfashionable End
Posts: 3,615
Default

Use cos(theta) and sin(theta), where theta is your angle in radians, to get the x and y of a unit vector (length = 1) representing the direction of the angle.

This sort of thing is normally done entirely with vectors rather than angles, where a force is represented by a vector.

You will probably want to begin by defining your units of measure. Distance, Mass, and Time. I like the CGS system (centimeters, grams, seconds) but these days most people are using SI (meters, kilograms, seconds)
Reply With Quote
  #3  
Old 04-28-2008, 08:12 AM
darkforcesjedi's Avatar
darkforcesjediAngle / Force / Trignometry question darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

Many years ago I posted an example (in 2D) on here about gravitating bodies. It included a number of "planets" and a stationary gravity source "sun". At each time step it calculated the net force on each object due to all the gravitational sources and moved the planets accordingly.

You might try searching my previous posts for that example.

Edit: Found it: http://www.xtremevbtalk.com/showpost...0&postcount=18
__________________
To err is human; to debug, divine.

Last edited by darkforcesjedi; 04-28-2008 at 09:54 AM.
Reply With Quote
  #4  
Old 04-29-2008, 01:53 AM
FrameRateMax FrameRateMax is offline
Newcomer
 
Join Date: Feb 2008
Posts: 4
Default

Thanks! I'll check out the example when I get home.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question Angle / Force / Trignometry question
Angle / Force / Trignometry question
Angle / Force / Trignometry question
 
Angle / Force / Trignometry question
Angle / Force / Trignometry question
 
-->