> The reason for the classes to be tightly coupled was to enable such
> computations
>  a = Point3D(1,2,3)
>  a.distance(Point(2,3)) This returns the distance between these two points.
> This is one of the possible four combinations(as in distance between 2 3D
> points, 2 2D points, 3D and 2D point)
>
> So i have a question
> 1) Should the above code work as in should it give the result (sqrt(11)) in
> the above case or should it raise an nonimplement error as they are 2
> different classes(3D and 2D)

My opinion was that it does not make sense to calculate anything
between 3D and 2D points, as they live in different spaces. However
there should be a way to promote 2D point to 3D like the following:

>>> plane = ... # some object representing a 2D plane in 3D space
>>> point = ... # some 2d point
>>> point3D = promote_to_3D(point, plane)
# taking `point`, assuming that it is on `plane` and
# returning the corresponding 3D point

There can be a default plane (x,y,z=0)

There should also be a way to project a 3d point on a plane or a line.

-- 
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/CAD8szLygrQUCGMPgWxpAJe50KSSB4RAq2di0jurkSYrRkaj6fA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to