You can subclass a printer and have it do what you want. You can see here:

https://github.com/sympy/sympy/blob/master/sympy/physics/vector/printing.py#L145

where we subclass the latex printer and get the \dot{} notation for
derivatives, for example. There is also an example here:

http://docs.sympy.org/dev/modules/printing.html

of subclassing to do custom derivative printing. Maybe exactly what you
want.

The LagrangesMethod in sympy.physics.mechanics works with the classes
available in that package (RigidBody, ReferemceFrame, etc). The other one
is more basic math. So if you want to write all the math yourself then
maybe the later is preferable, but if you want to use the objects in
sympy.physics.mechanics to build up a rigid body system and find the
equations of motion, the use the former.


Jason
moorepants.info
+01 530-601-9791


On Wed, Aug 13, 2014 at 10:13 PM, Rathmann <rathmann...@gmail.com> wrote:

> Hello,
>
> I have been watching the lectures of Susskind's "Theoretical Minimum"
> course, and using Sympy with IPython notebook to take notes, and work
> through some of the examples.
>
> Sympy is serious overkill for this purpose, but overall it has been
> working well.
>
> A couple of questions:
>
>    - What is the best way to deal with dynamics variables and the dot
>    convention for printing? (In physics, the first time derivative of x is
>    often written as \dot{x} instead of dx/dt.)  Is there an easy way to
>    get IPython notebook to print dynamics variables using the dot convention,
>    and still give the nice LaTeX-rendered equations?  If I use vprint (from
>    physics.vector), I get the variables  with primes, but just a text
>    rendering of the equations.
>    - I notice sympy.physics.mechanics.LagrangesMethod and
>    sympy.calculus.euler.euler_equations both implement Lagrangian mechanics.
>    Is one of these more "official"  than the other?  Both seem to work for the
>    very simple examples I have tried.
>
> Thanks
>
> --
> 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/fe1737e3-3b19-40e5-8983-5d64bfad8e2f%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/fe1737e3-3b19-40e5-8983-5d64bfad8e2f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to