pattern recognition

E

eddkay

hi i have an assignment about the topic above. thus finding out all the
possible lines aviable among a set of points given (x,y).
1. how do i write all the line without repeat them (each line is
written once)
 
V

Vladimir S. Oka

hi i have an assignment about the topic above. thus finding out all
the possible lines aviable among a set of points given (x,y).
1. how do i write all the line without repeat them (each line is
written once)

Your question really belongs to comp.programming, but...

Think about what uniquely defines a line: f(x) = A*x + B. So, you start
looking for lines defined by all your points, storing As and Bs as you
go along, but only if you didn't find the same pair earlier. Once
finished, you have a neat set of line coefficients.

Caveat: As and Bs are real numbers (in maths sense), but you're going to
be dealing with floating point numbers. The former are not always
exactly representable as the latter. You may need some "fuzziness"
factor (or a better idea than mine).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,500
Latest member
ArianneJsb

Latest Threads

Top