Thread Subject: Virtual Reality Toolbox: rotation using matrix?

Subject: Virtual Reality Toolbox: rotation using matrix?

From: Alexander Erlich

Date: 1 May, 2009 14:25:49

Message: 1 of 6

Hello,

I'm very new to Virtual Reality Toolbox, and one of the many questions
I have is this. The demos, like the car in the mountains demo, show
that you can do rotations this way:

car.rotation = [0, 1, 0, -0.7];

Yet I would prefer to use my own own matrix for rotation, which I have
put together using Euler's angles. How can I apply it?

Also, where can I search for attributes or properties of the nodes?
vrnode didn't yield any of this information.

Alexander

Subject: Virtual Reality Toolbox: rotation using matrix?

From: Arkadiy Turevskiy

Date: 1 May, 2009 20:44:02

Message: 2 of 6

For conversion from rotation matrix to axes/angle, use the function "VRROTMAT2VEC".

For node attributes: create a node, then use fields(node):

car = vrnode(world, 'Automobile')
%% Viewing Fields of Nodes
% VRML fields of a given node can be queried using the FIELDS command.
% You will see that there are fields named 'translation' and 'rotation'
% in the node list. You can move the car around by changing the values of
% these fields.
fields(car)

see vrcar.m for a detailed demo.

Hope this helps.

Arkadiy Turevskiy
The MathWorks

Alexander Erlich <alexander.erlich@gmail.com> wrote in message <1d7fcf89-1d1a-448a-bd80-ccf27bff630f@x1g2000prh.googlegroups.com>...
> Hello,
>
> I'm very new to Virtual Reality Toolbox, and one of the many questions
> I have is this. The demos, like the car in the mountains demo, show
> that you can do rotations this way:
>
> car.rotation = [0, 1, 0, -0.7];
>
> Yet I would prefer to use my own own matrix for rotation, which I have
> put together using Euler's angles. How can I apply it?
>
> Also, where can I search for attributes or properties of the nodes?
> vrnode didn't yield any of this information.
>
> Alexander

Subject: Virtual Reality Toolbox: rotation using matrix?

From: Alexander

Date: 2 May, 2009 15:08:21

Message: 3 of 6

Thank you Arkadiy,

but my Matlab help does not know the command "vrrotmat2vec", although
I could easily find it on the Mathworks online help. Maybe I should
have said what kind of version I have. I am using

Matlab (R2007a), student version

Could it be that Virtual Reality Toolbox, my Simulink or something
else does not come as a full version in the student edition?

Alexander


On May 1, 10:44 pm, "Arkadiy Turevskiy"
<arkadiy.turevs...@mathworks.com> wrote:
> For conversion from rotation matrix to axes/angle, use the function "VRRO=
TMAT2VEC".
>
> For node attributes: create a node, then use fields(node):
>
> car = vrnode(world, 'Automobile')
> %% Viewing Fields of Nodes
> % VRML fields of a given node can be queried using the FIELDS command.
> % You will see that there are fields named 'translation' and 'rotation'
> % in the node list. You can move the car around by changing the values of
> % these fields.
> fields(car)
>
> see vrcar.m for a detailed demo.
>
> Hope this helps.
>
> Arkadiy Turevskiy
> The MathWorks
>
> AlexanderErlich<alexander.erl...@gmail.com> wrote in message <1d7fcf89-1d=
1a-448a-bd80-ccf27bff6...@x1g2000prh.googlegroups.com>...
> > Hello,
>
> > I'm very new to Virtual Reality Toolbox, and one of the many questions
> > I have is this. The demos, like the car in the mountains demo, show
> > that you can do rotations this way:
>
> > car.rotation = [0, 1, 0, -0.7];
>
> > Yet I would prefer to use my own own matrix for rotation, which I have
> > put together using Euler's angles. How can I apply it?
>
> > Also, where can I search for attributes or properties of the nodes?
> > vrnode didn't yield any of this information.
>
> >Alexander

Subject: Virtual Reality Toolbox: rotation using matrix?

From: Alexander

Date: 3 May, 2009 08:54:05

Message: 4 of 6

I really don't want to insist, but could it be that one of my
toolboxes is not complete as I have a student version?

How can this be dealt with mathematically? Can vrrotmat2vec be easily
written by oneself?

On May 2, 5:08 pm, Alexander <alexander.erl...@gmail.com> wrote:
> Thank you Arkadiy,
>
> but my Matlab help does not know the command "vrrotmat2vec", although
> I could easily find it on the Mathworks online help. Maybe I should
> have said what kind of version I have. I am using
>
> Matlab (R2007a), student version
>
> Could it be that Virtual Reality Toolbox, my Simulink or something
> else does not come as a full version in the student edition?
>
> Alexander
>
> On May 1, 10:44 pm, "Arkadiy Turevskiy"
>
> <arkadiy.turevs...@mathworks.com> wrote:
> > For conversion from rotation matrix to axes/angle, use the function "VR=
ROTMAT2VEC".
>
> > For node attributes: create a node, then use fields(node):
>
> > car = vrnode(world, 'Automobile')
> > %% Viewing Fields of Nodes
> > % VRML fields of a given node can be queried using the FIELDS command.
> > % You will see that there are fields named 'translation' and 'rotation'
> > % in the node list. You can move the car around by changing the values =
of
> > % these fields.
> > fields(car)
>
> > see vrcar.m for a detailed demo.
>
> > Hope this helps.
>
> > Arkadiy Turevskiy
> > The MathWorks
>
> > AlexanderErlich<alexander.erl...@gmail.com> wrote in message <1d7fcf89-=
1d1a-448a-bd80-ccf27bff6...@x1g2000prh.googlegroups.com>...
> > > Hello,
>
> > > I'm very new to Virtual Reality Toolbox, and one of the many question=
s
> > > I have is this. The demos, like the car in the mountains demo, show
> > > that you can do rotations this way:
>
> > > car.rotation = [0, 1, 0, -0.7];
>
> > > Yet I would prefer to use my own own matrix for rotation, which I hav=
e
> > > put together using Euler's angles. How can I apply it?
>
> > > Also, where can I search for attributes or properties of the nodes?
> > > vrnode didn't yield any of this information.
>
> > >Alexander

Subject: Virtual Reality Toolbox: rotation using matrix?

From: Bruno Luong

Date: 3 May, 2009 09:14:01

Message: 5 of 6

Alexander <alexander.erlich@gmail.com> wrote in message <d498c6c6-6197-48f2-8608-f1f4b09ae451@e23g2000vbe.googlegroups.com>...

>
> How can this be dealt with mathematically? Can vrrotmat2vec be easily
> written by oneself?
>

Easily yes, but there are few subtle points you need to pay attention.

See this old thread where many algorithm are compared:

http://www.mathworks.com/matlabcentral/newsreader/view_thread/160945

Bruno

Subject: Virtual Reality Toolbox: rotation using matrix?

From: Steven Lord

Date: 4 May, 2009 03:01:01

Message: 6 of 6


"Alexander" <alexander.erlich@gmail.com> wrote in message
news:0fa708e1-22b9-474a-9ccb-1a0338bdf8ff@g20g2000vba.googlegroups.com...
Thank you Arkadiy,

but my Matlab help does not know the command "vrrotmat2vec", although
I could easily find it on the Mathworks online help. Maybe I should
have said what kind of version I have. I am using

Matlab (R2007a), student version

Could it be that Virtual Reality Toolbox, my Simulink or something
else does not come as a full version in the student edition?



The VRROTMAT2VEC function was introduced in the release R2007b release of
this toolbox, as indicated by the Release Notes for that release:

http://www.mathworks.com/access/helpdesk/help/toolbox/sl3d/rn/bq7qlwp-1.html

It will not be present in the release R2007a release of this toolbox.

--
Steve Lord
slord@mathworks.com

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
virtual reality... Arkadiy Turevskiy 1 May, 2009 16:49:03
simulink 3d ani... Arkadiy Turevskiy 1 May, 2009 16:49:03
rssFeed for this Thread

Contact us at files@mathworks.com