a bug: intersection of Line3D and plane

15 views
Skip to first unread message

zxo102

unread,
Dec 4, 2014, 9:08:32 PM12/4/14
to sy...@googlegroups.com
Hi there,

Using sympy0.7.6.win32, I run the following python script to try to find the intersection of a Line3D and a Plane. The coordinates for Point3D are from my intermediate result.  I test the script in python 2.7.8 (Case 1) and python 3.4.2 (Case 2) and got different results. 

#########################################

from sympy import *

l2 = Line3D(Point3D(50000004459633/5000000000000, -891926590718643/1000000000000000, 231800966893633/100000000000000), Point3D(50000004459633/50000000000000, -222981647679771/250000000000000, 231800966893633/100000000000000))

p2 = Plane(Point3D(402775636372767/100000000000000, -97224357654973/100000000000000, 216793600814789/100000000000000), (-9.00000087501922, -4.81170658872543e-13, 0.0))

print(p2.is_parallel(l2))
print(p2.intersection(l2)
###################################################


Case 1:
=========================================================

Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
False
[Point3D(4, -1, 2)]


Case 2:
==========================================================
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
False
[]

If it is a bug, where do I know it is fixed?

ouyang
Reply all
Reply to author
Forward
0 new messages