How can I use hgtransform to contruct a body with multiple elements?

Hello,
I have created a hgtransform graphic object (with 3 elements) as defined by documentation:
ax = axes('XLim',[-1.5 1.5],'YLim',[-1.5 1.5],'ZLim',[-1.5 1.5]); [x y z] = cylinder([.2 0]); h(1) = surface(x,y,z,'FaceColor','red'); => let's wheel N1 h(2) = surface(x,y,-z,'FaceColor','green'); => let's wheel N2 h(3) = surface(z,x,y,'FaceColor','blue'); => let's bicycle structure
t = hgtransform('Parent',ax); set(h,'Parent',t);
Let's say that it represents a bicycle (2 wheels and one structure).
Rotation of the complete object can be done by: Rz = makehgtform('zrotate',r); set(t,'Matrix',Rz)
Is there a simple way to define a way such that: - a rotation (or translation) can be applied to 3 elements (complete bicycle), - a rotation can be applied to only one element (one wheel of the bicycle).
Thanks in advance, Petrus
Matlab version: R2007a.

Answers (0)

Categories

Asked:

on 5 Jun 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!