Hello. In your prototype, you have written :
b.arbitrary_point('z') = Point(-13*z +5, -11*z+5, -8z+5) c=Line(Point(2,3), Point(3,5)) # Here the default value of z is taken as 0 Why don't you work with a symbolic variable z ? You will also have to take care of point in segment for example. 2014-03-04 20:28 GMT+01:00 Akshay <akshaynukal...@gmail.com>: > @ondrej Thanks for the quick reply . > > As you pointed out I have been working on the prototype for past few days > and for the intersection of two lines it looks something like this: > a = Line(Point(1,2,3),Point(2,3,4)) > b = Line(Point(5,5,5),Point(-8,-6,-3)) > a.interection(b) = Point(-1.5, -0.5, 0.5) > > a.arbitrary_point() = Point(t+1,t+2,t+3) > b.arbitrary_point('z') = Point(-13*z +5, -11*z+5, -8z+5) > c=Line(Point(2,3), Point(3,5)) # Here the default value of z is taken as 0 > a.intersection(c) > Point(2,3,4) > > Apart from this I have been thinking about a class which does this > x,y,z = map(Symbol, 'xyz') > p1,p2,p3 = Point(x, y), Point(y, z), Point(2*x*y, y) > Point.is_collinear(p1, p2, p3) this returns false but it is better to > return this > Points are collinear if z - y - 2*y*z + 2*y**2 == 0 > This class should support the following methods at least: > is_similar is_parallel is_concyclic is_perpendicular encloses_point > is_tangent is_convex contains collinear > > > > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/9bea9c0e-a1f3-4863-bfca-0ff0ecbb22ab%40googlegroups.com<https://groups.google.com/d/msgid/sympy/9bea9c0e-a1f3-4863-bfca-0ff0ecbb22ab%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAAb4jGmPOtXYsmQBsaoNJ%3DMysZk1czPT40M4Hm%2B58eJJzeKUQw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.