i managed to code it down, and just as you said, IT WORKS! but sometimes it will give me negative values which obviously dont work. Also sometimes it gives me quite normal values which dont work???
i dont seem to be allowed to attach .exes nor .rar files?
well here is a download link for a .rar containing a test app that i made. HERE
leftclick to place the shooter, press space to "drive" the target forward, press enter to shoot and press space to return from shooting.
the value in the topleft corner is the value of t after 25 iterations of the Newton rahson method. i tried others but 25 seemed to be fine and very accurate for this quick test. ( 4 wasnt accurate enough)
oh and the litle white dot is where you should aim ( with the mouse)
its DarkBasic code. might be quite unclear as it is so stacked.
rx#,ry# = coordinates of the center of the targets "circle" x2#,y2# = coordinates of the shooter h# = turnrate of target r# = radius v# = velocity x1#,y1# = coordinates of target g# = radiuss initial angle t0# = the value of t#
any ideas of how to avoid negative and wrong values? i would rather it gave a blank than giving wrongs ...
Wow thanks for a fast reply!
yes that is what i did in the case without turning, but i cant seem to find a way to get this done numerically. My problem is, that the only way i manage to describe the motion of the target is with a function containin Sin and Cos both with an unkown inside... i dont know how to extract those