Thanks Luke,
Jason moorepants.info +01 530-601-9791 On Fri, Jun 14, 2013 at 3:17 PM, Dale Lukas Peterson <[email protected]>wrote: > Looking good! > > A few things: > > > On Fri, Jun 14, 2013 at 8:13 PM, Jason Moore <[email protected]> wrote: > > Tarun and I have started to hash out what the visualization API may look > > like and what functionality it will have. > > > > Looking good! > > A few things: > > the four_by_four() method takes no argument(s)? It seems it should > take a reference frame and a point in the case of a RigidBody, and a > point in the case of Particle. These would define the reference frame > and or point that the returned transformation is with respect to. > Also, I think a better name would be .homogenous_transform_matrix() or > maybe just .transform_matrix(). Pretty much every 3d API uses this > terminology, including OpenGL. See [0] or the link you have to WebGL > basics for more details. The documentation of these matrices is often > poorly described if you are used to reading dynamics textbooks, I can > help with deciphering if needed. > Yes it will need arguments. The details are not in the design yet. The name of the method was just from my ignorance. We'll look to the *GL's for better terminology. > > What will the return type of this method be? I think it should either > be a 4x4 sympy Matrix, a nested list with 4 elements, each being a > length 4 list, or maybe even a flat list of length 16. Most 3D API's > represent this matrix as a length 16, column major array, so if you > return that, it might map directly to what is needed by your 3D API. > I know OpenGL uses length 16, column major arrays, and I bet 3.js has > a way to set the transformation matrix directly with a list/array of > this type. > I was thinking a sympy matrix, as that is what most of mechanics already returns for things like this. We'll let the three.js input api guide us. > > What about the notion of a camera? Often we define an inertial frame > compute the dynamics in, but that generally isn't the most useful > place to visualize things from. Maybe this is built into the API you > are going to use? Or will users need to pick the location and > orientation of their camera in the same script that derives the > equations of motion so that all the transformations can be obtained > with respect to the camera rather than the inertial frame? Just > something to think about. > Yes, this needs to be in there too. Thanks for the reminder. > > Here is an example of how I form the 4x4 transformation matrices [1] > from within sympy (I do it as numpy arrays of shape (16,)), as well as > how I define my camera orientation [2] and location [3], in case that > is useful. > Thanks! > > Keep up the good work! > > Luke > > [0] -- > http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/#Transformation_matrices > [1] -- > https://github.com/hazelnusse/bicycle.model/blob/master/derivation/derivation.py#L40 > [2] -- > https://github.com/hazelnusse/bicycle.model/blob/master/derivation/derivation.py#L229 > [3] -- > https://github.com/hazelnusse/bicycle.model/blob/master/derivation/derivation.py#L342 > > > > The results are starting to formulate here: > https://pydy.org/visualization > > > > There is also a basic proof-of-concept here: > > https://github.com/PythonDynamics/pydy_examples/pull/9 > > > > Please take a look and give us some feedback. We need to hear more about > > what others may want it to do. We also need some help sorting out how > things > > will be structured for python to server up browser based visualizations > and > > what the javascript/python interaction will be. > > > > Jason > > moorepants.info > > +01 530-601-9791 > > > > -- > > 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 [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/sympy. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > -- > "People call me a perfectionist, but I'm not. I'm a rightist. I do > something until it's right, and then I move on to the next thing." > -- James Cameron > > -- > You received this message because you are subscribed to the Google Groups > "PyDy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/pydy. > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
