Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2855 > unrolled thread

3D trajectory with rotation information

Started byJaydev Mehta <jaydevmmehta@gmail.com>
First post2015-04-01 12:57 -0700
Last post2015-04-02 12:20 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  3D trajectory with rotation information Jaydev Mehta <jaydevmmehta@gmail.com> - 2015-04-01 12:57 -0700
    Re: 3D trajectory with rotation information Karl <mail.kfr@gmx.net> - 2015-04-02 20:22 +0200
    Re: 3D trajectory with rotation information Ethan A Merritt <sfeam@users.sourceforge.net> - 2015-04-02 12:20 -0700

#2855 — 3D trajectory with rotation information

FromJaydev Mehta <jaydevmmehta@gmail.com>
Date2015-04-01 12:57 -0700
Subject3D trajectory with rotation information
Message-ID<e22def23-5e07-472a-b0fd-a3f400fdddd3@googlegroups.com>
I want to do this << www.youtube.com/watch?v=6ijArKE8vKU >>
I have data file with 6 columns (x,y,z,alpha,beta,gama).
I don't want to animate.
I want just final plot at the end which shows each point's position as well as rotation.
Please guide me.
Thank You.

[toc] | [next] | [standalone]


#2858

FromKarl <mail.kfr@gmx.net>
Date2015-04-02 20:22 +0200
Message-ID<mfk1cl$qel$1@news.rz.uni-karlsruhe.de>
In reply to#2855
Am 01.04.2015 um 21:57 schrieb Jaydev Mehta:
> I want to do this << www.youtube.com/watch?v=6ijArKE8vKU >>
> I have data file with 6 columns (x,y,z,alpha,beta,gama).
> I don't want to animate.
> I want just final plot at the end which shows each point's position as well as rotation.
> Please guide me.
> Thank You.
> 

I guess you want to use "splot ... with vectors", check "help vectors"
on the expected input format.

  Karl

[toc] | [prev] | [next] | [standalone]


#2860

FromEthan A Merritt <sfeam@users.sourceforge.net>
Date2015-04-02 12:20 -0700
Message-ID<mfk4ou$g51$1@dont-email.me>
In reply to#2855
Jaydev Mehta wrote:

> I want to do this << www.youtube.com/watch?v=6ijArKE8vKU >>
> I have data file with 6 columns (x,y,z,alpha,beta,gama).
> I don't want to animate.
> I want just final plot at the end which shows each point's position as
> well as rotation. Please guide me.

I'll just block it out, but you'll have to fill in all the
matrix multiplication functions.

Your final plot command will be like this
    set style data vector
    splot 'data' using 1:2:3:($1 + X1($4,$5,$6)):($2 + X2($4,$5,$6)):($3 + X3($4,$5,$6)) lc "blue", \
          'data' using 1:2:3:($1 + Y1($4,$5,$6)):($2 + Y2($4,$5,$6)):($3 + Y3($4,$5,$6)) lc "green", \
          'data' using 1:2:3:($1 + Z1($4,$5,$6)):($2 + Z2($4,$5,$6)):($3 + Z3($4,$5,$6)) lc "red"

That will make three passes through your data, plotting successively
the transformed X, Y, and Z axes.

The annoying part is having to define the functions 
X1(alpha,beta,gamma) and so on.

Let us define M_αβγ as the 3x3 rotation matrix described by
angles alpha, beta, gamma.  The vector X_αβγ is found by
multiplying the unit X vector [1,0,0] by the matrix M_αβγ.

   X_αβγ = [1,0,0] M_αβγ

This vector itself has three components X = [X1, X2, X3]
and these are the terms that appear in the plot command.
Similarly for rotation of the unit Y and Z vectors.

	Ethan

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web