Hello all, I am trying to use Sympy to model a multi-body dynamic system. I am trying to create the required points and coordinate systems to model the system in 3d. I am running into trouble creating symbolic points in 3 dimensions. I can create the points as shown below, but whenever I attempt to perform a math operation on the points, such as deriving the midpoint or distance, I receive an error saying that "Point" is an unsupported type, or that the "Point" has no x-attribute.
What is the correct method for declaring a 3 dimensional point symbolically, so that you can reference each component of it and perform operations to it? After declaring the point, I need to use the .set_pos function or an equivalent function to declare the position of the points. from __future__ import print_function, division from sympy import symbols, simplify, Segment from sympy.geometry import Point3D from sympy.vector import * from sympy.physics.mechanics import dynamicsymbols, ReferenceFrame, Point from sympy.physics.vector import init_vprinting init_vprinting(use_latex='mathjax', pretty_print=False) # Declare reference frames inertial_frame = ReferenceFrame('inertial_frame') Chassis_frame = ReferenceFrame('Chassis_frame') LUCA_frame = ReferenceFrame('LUCA_frame') # Define the rotation angle symbols thRoll, thPitch, thYaw = dynamicsymbols('thRoll, thPitch, thYaw') thLUCAy = symbols('thLUCAy') ; thLUCAz = symbols('thLUCAz') thLUCAx, thLLCAx, thRUCAx, thRLCAx = dynamicsymbols('thLUCAx, thLLCAx, thRUCAx, thRLCAx') # Define Position Components ChassisDeltax = symbols('ChassisDeltax') ChassisDeltay = symbols('ChassisDeltay') ChassisDeltaz = symbols('ChassisDeltaz') CGposx = symbols('CGposx') CGposy = symbols('CGposy') CGposz = symbols('CGposz') LUCAMPx = symbols('LUCAMPx') LUCAMPy = symbols('LUCAMPy') LUCAMPz = symbols('LUCAMPz') # Set Positions ChassisC.set_pos(GlobalCoord0,(ChassisDeltax * inertial_frame.x + ChassisDeltay * inertial_frame.y + ChassisDeltaz * inertial_frame.z)) CGpos.set_pos(ChassisC,(CGposx * Chassis_frame.x + CGposy * Chassis_frame.y + CGposz * Chassis_frame.z)) LUCAMP.set_pos(ChassisC,(LUCAMPx * Chassis_frame.x + LUCAMPy * Chassis_frame.y + LUCAMPz * Chassis_frame.z)) # Center of Mass Locations CoM_Chassis = Point('CoM_Chassis') CoM_Chassis.set_pos(CGpos,0) CoM_LUCA = Point('CoM_LUCA') CoM_LUCA.set_pos(LUCAMP, ((LUCA_xOff / 2) * LUCA_frame.x + (LUCA_L / 2) * LUCA_frame.y + 0 * LUCA_frame.z)) -- 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 https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/fbea45f1-c15d-455a-901b-b5cb5d0ae199%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.