- #1
- 2
- 0
I'm writing a function for Matlab and I'm trying to figure out how to apply a torque matrix in cartesian coordinates to an object in spherical coordinates.
The short story is this:
For interest's sake, a friend and I have written a function with creates a tree which random branch orientations. These branches, though later converted to Cartesian for plotting, originate as spherical vectors. What we are attempting to do is have a "wind" push the branches and cause them to deflect (but not stretch). To do so we need to define a delta_theta and delta_phi for our angles (we have it programmed such that phi is relative to the z-axis and theta to the x-axis, thought I should mention that because I know some conventions suggest the opposite). We figure to find the displacement (simplistically) our model ought to find the change in either angle based on the following static case:
SUM(Moments)= 0 =Torque-resisting moment=T-k*dAngle
therefore: dAngle=Torque/k
Where we take k as an equivilent spring constant for a cantilever.
Granted this model isn't perfect, but it ought to produce a reasonable estimate for the deflection.
So, we have created a force vector (x y z) to apply to the branch, but are uncertain as to how we can produce the the spherical torques about the two angles given these values.
Any ideas?
Thank a tonne in advance (metric of course).
The short story is this:
For interest's sake, a friend and I have written a function with creates a tree which random branch orientations. These branches, though later converted to Cartesian for plotting, originate as spherical vectors. What we are attempting to do is have a "wind" push the branches and cause them to deflect (but not stretch). To do so we need to define a delta_theta and delta_phi for our angles (we have it programmed such that phi is relative to the z-axis and theta to the x-axis, thought I should mention that because I know some conventions suggest the opposite). We figure to find the displacement (simplistically) our model ought to find the change in either angle based on the following static case:
SUM(Moments)= 0 =Torque-resisting moment=T-k*dAngle
therefore: dAngle=Torque/k
Where we take k as an equivilent spring constant for a cantilever.
Granted this model isn't perfect, but it ought to produce a reasonable estimate for the deflection.
So, we have created a force vector (x y z) to apply to the branch, but are uncertain as to how we can produce the the spherical torques about the two angles given these values.
Any ideas?
Thank a tonne in advance (metric of course).