Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Homing Device
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hello




PostPosted: Tue May 06, 2003 12:06 pm   Post subject: Homing Device

We are trying to do a homing prof\jectile
but we have only creatd something that is weird it first goes diagonally to the x position of the target then the y value changes towards the target
we need to make one that will rite away go diagoanlly to the target and not make a wavy and curvy movement
any ideas
slope of line??..
maybe
Sponsor
Sponsor
Sponsor
sponsor
Homer_simpson




PostPosted: Tue May 06, 2003 1:28 pm   Post subject: (No subject)

if you want it to be wavy you could use sine or cosine in your formula
code:
y:=a*(sine(x+b))+c

or use parabola for curves
code:
y:=a*(x**2)+b


I dunno if that's what yer asking for =/

(a,b and c can have any values depending on the curves u want and value of x increases or decreases in order to create a wavy line)
Tony




PostPosted: Tue May 06, 2003 1:53 pm   Post subject: (No subject)

first you find the distance between between you and your target. Then the X difference and Y difference.

Divide the distance by missile speed, you get number of steps in while your missle will reach its target. Now divide each of the differences on each axis by that number of steps. Thats by how much your missile should move along each axis in turn.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: