Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411522 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 12:06:02 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)Tutorialsdelete me
Pages: 1 [2]
Print
Author Topic: delete me  (Read 8909 times)
Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #20 on: September 07, 2011, 09:09:41 AM »


I feel like that guy right now.
Logged

Zaphos
Guest
« Reply #21 on: September 07, 2011, 03:03:15 PM »

I am feeling hopeful and confused at the same time here Shocked It seems that there are pitfalls, but there is light at the end. Given an accuracy requirement of "good enough", how can it be done?
There are a bunch of ways ... given arbitrary prediction function c(t), the simplest/dumbest method is probably to just brute force test a bunch of values of t and see if "||(c(t)-p)||^2 = (s*t)^2" is close to true for any of them.  The next method after that is probably the bisection method Jasmine mentioned, which is a binary search for the intersection:
http://en.wikipedia.org/wiki/Bisection_method

To do bisection first just rearrange the test equation like so:
||(c(t)-p)||^2 - (s*t)^2 = 0
And call that left hand side f(t)

Now just search for some t_i where f(t_i)>0 and some t_f where f(t_f)<0.  If you find those, do a binary search between the two times to find when f(t) ~= 0

If you fail to find any time t_f where f(t_f) < 0, assume there's no intersection.

To do binary search, just iteratively compute the midpoint t_m=.5*(t_f+t_i), and then if f(t_m) < 0 it replaces t_f, else it replaces t_i.
Logged
QuaziGNRLnose
Level 1
*


View Profile
« Reply #22 on: September 11, 2011, 08:55:55 PM »


I feel like that guy right now.

trudat
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic