Hello. Im hoping someone here will be able to help me out. Iv been searching for a while now for a way to find the point of intersection between two drawn lines in vb.net and havn't found anything. The lines that are drawn will intersect at different points everytime they are generated and also they may be drawn at any angle. What im ultimately trying to achieve is a trim of the intersecting lines so they join at the point of intersection. Im quite new to vb.net so please forgive me if there is a simple answer to my question but any help is greatly appreciated.

08-28-2007, 01:46 AM

Phil Weber

Try this VB translation of this algorithm (found by searching for "geometry calculate lines intersection"):

Thanks a million .This is very helpful and very very much apreciated.I can't thank you enough.

09-02-2007, 12:44 AM

noobsaibot

ok.So that worked but now iv come to intersecting a line with a circle.Iv found some examples of how to find the intersecting points but i can't follow the math.Iv also found some that are written as functions in vb.net code and return an integer where as i need it to return a point(x,y).So can anyone help me with making a function that could do this or even help me to understand the math behind finding the point.Thanks in advance for any help.

09-16-2007, 06:05 AM

noobsaibot

Iv also just realised this function only works to an integer level.Even after modifying it to take singles and pointf's it still returns integers.So does anyone have a way to intersect 2 lines and return a point to the accuracy of atleast one decimal place?.Thanks in advance