Hi all,
I'm drawing a trajectory through 3D space, and would like adjust the color with its current velocity. Is this possible with MathGL?
Thank you in advance!
Yes, just use Tens() function in parametric form (i.e. as gr->Tens(x,y,z,v);) or see this sample -- http://mathgl.sourceforge.net/mathgl_en/mathgl_en_90.html#Tens- sample . Don't forgot to set C-range to the range of yours velocities (for example, by gr->CRange(v);).
Also you can use Traj() function to show direction of another vector field along trajectory - see http://mathgl.sourceforge.net/mathgl_en/mathgl_en_93.html#Traj- sample
Thanks Alexey, great!! (MathGL is an awesome piece of work!)
Log in to post a comment.
Hi all,
I'm drawing a trajectory through 3D space, and would like adjust the color
with its current velocity. Is this possible with MathGL?
Thank you in advance!
Yes, just use Tens() function in parametric form (i.e. as gr->Tens(x,y,z,v);)
or see this sample --
http://mathgl.sourceforge.net/mathgl_en/mathgl_en_90.html#Tens-
sample . Don't forgot to set C-range to the range of yours velocities (for
example, by gr->CRange(v);).
Also you can use Traj() function to show direction of another vector field
along trajectory - see
http://mathgl.sourceforge.net/mathgl_en/mathgl_en_93.html#Traj-
sample
Thanks Alexey, great!! (MathGL is an awesome piece of work!)