(I am Cc-ing this to Gilbert and Stefan too. Guys, please read the last 2 
messages in this thread.)

I do not think that the method is quite as simple. For starters, we have 
different coordinate systems - not just rectangular coordinates. But I 
suppose, that can be taken care of.

Let us suppose, we have a vector:

v = c.x * d.y * e.e_x + c.y * d.e_z + d.z * e.z * c.e_x

Now, this is a composition of base scalars and base vectors from 4 
different coordinate systems - which we are taking to be rectangular for 
the time being.

Now, let us say that we need to express this in a coordinate system k. 
Then, I should find the relations between base scalars of c, d, e, f with 
the resultant coordinate system k. Right? I am assuming so.

If the equation you provided holds good, then, we can have relations for 
base scalars, and, we can substitute for those in v. But, there are also 
the base vectors to consider. We need to substitute base vectors of various 
coordinate systems with those of k. This I think is doable using the DCM 
matrix. Also note that we need to work on each component, as you said, one 
at a time since the base vectors too are in many different coordinate 
systems.

Anyway, all I need is confirmation that the formula you gave is correct. 
Then, I can proceed from there, I think. Can you please give references?

On Wednesday, July 31, 2013 12:14:17 AM UTC+5:30, Sachin Joglekar wrote:
>
> You may want to use the method I used while hacking the old mechanics 
> module to do the kind of re-expression we want to achieve. say a vector v 
> from frame A to frame B
> First, we need to calculate the coordinate variables of frame A in terms 
> of those of B.
> We can do this using -
> [vector of A's vars] = [Pos-vector of B wrt A] + DCM(A, B) * [vector of 
> B's vars]
> In above equation, don't take the LHS as a 'vector field'. It's just a 
> column matrix with the respective symbols denoting coordinate variables of 
> A.
> Comparing the entries in LHS and RHS will help you contrust a dict mapping 
> A.x, A.y and A.z in terms of B.x, B.y, B.z
>
> Use the sympy subs method on v to remove A.x, A.y and A.z from its 
> expression. Suppose we now get v1
> Then just do
> [final vector] = DCM(A, B) * [v1]
>
> The above will give the required re-expressed vector.
>
> For the above method to work, you *just* need to separate the vector into 
> components based on the basis _vectors_, not scalars. Since we are going to 
> 'subs' them, their occurences don't matter. And according to me, thats what 
> separate should do- just think of basis vectors. Then use the above algo on 
> each component thus found out to get the final result. You can try this 
> with an example and confirm the validity.
>
> @stefan, @gilbert, am I correct?
>
>
> On Tue, Jul 30, 2013 at 11:46 PM, Prasoon Shukla 
> <prasoon...@gmail.com<javascript:>
> > wrote:
>
>> @All: This is a cry for help.
>>
>> I am completely stumped at the *express* method. The implementation that 
>> I had before had a flaw that I hadn't noticed until now (until Gilbert's PR 
>> on by branch). Anyway, let me try to describe the situation.
>>
>> Initially, I had an separate method that would take a vector and return 
>> it separated by coordinate systems in dictionary form. To my chagrin, this 
>> kind of separation cannot always work. Consider two coordinate systems, c0 
>> and c1, both rectangular. Let us have a vector, v.
>>
>> v = c0.x * c1.e_y
>> express
>> Obviously, this cannot be separated into vectors separated by coordinate 
>> systems. This is the case I wasn't considering when I wrote the express 
>> method last. And that's why, I need to rewrite a new express method.
>>
>> I have been thinking of how to implement this but I'm getting nowhere. I 
>> do have one way, that I think might work and am currently writing the code 
>> for it. But, I'm not at all too sure of it.
>>
>> I think that by now, all three of you have a fair idea of the code. 
>> Please suggest an algorithm to accomplish this.
>>
>> -- 
>> 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+un...@googlegroups.com <javascript:>.
>> To post to this group, send email to sy...@googlegroups.com <javascript:>
>> .
>> 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.


Reply via email to