Ok. So I guess same will apply when we want to express some VectAdd in one frame. And there is going to be a BaseScalarField class right? To enable expression of scalar fields in particular frames?
On Fri, Jun 14, 2013 at 5:38 PM, Prasoon Shukla <prasoon92.i...@gmail.com>wrote: > > On Friday, June 14, 2013 3:39:20 PM UTC+5:30, Sachin Joglekar wrote: >> >> Also, Gilbert and I had a small question. How do you plan to implement >> expression of Vectors in different frames? Also, the relationships between >> the frames? Could you give an API and the basic idea of how those methods >> will work? >> The main concern the mechanics group has, is the modeling of >> relationships among frames themselves, and those with vectors. Clearing up >> this part would make things much clearer. >> > > Again, I really do not see what is so confusing. I'll try to be clear this > time. > > Each vector has an attribute, `ref_frame`, which specifies the frame in > which the vector has been defined in. > > As for relationship between the frames are concerned, we would have > methods defined inside the RefFrame class that would output the transform > matrices when required explicitly. Or, when required implicitly, the > matrices would just be used up internally. > > For example, let us have a simple example. We have two frames A and B. > Both in rectangular coordinates. B is rotated about the common x axis of > both the frames by theta. > > Now, let us say the user just wants to know the conversion matrix. He can > just do something like: > B.convert_mat(A) > And we would output transformation matrix. This stuff is just like > mechanics. > > Let us add a bit more detail. Say the B frame is in spherical coordinates. > Then, the transform matrix will also include the transform matrix from > spherical to rectangular coordinates in the matrix product. > > Now, let us see how it would be used internally by the VectAdd and VectMul > classes. Let us say we have a vector in some reference frame. Then, if we > want to express that vector in another frame, we would do: > > vector.convert_to(ref_frame=frame) > > which returns a new vector. > > I hope that clarifies the issue of how things would work. More questions? > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sympy" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sympy/t-Je0beTIIU/unsubscribe. > To unsubscribe from this group and all its topics, 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. > 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. For more options, visit https://groups.google.com/groups/opt_out.