How to apply a transformation with makehgtform()?
7 views (last 30 days)
Show older comments
I would like to learn how to apply transformations with makehgtform(). This is toy example:
% Create a red octagon using the fill function.
t = (1/16:1/8:1)'*2*pi;
x = cos(t);
y = sin(t);
fill(x,y,'r');
Now instead of x=x/2 and y=y/2 and replot, I would like to apply makehgtform('scale',0.5), but how to use it? how to plot the new octagon?
0 Comments
Answers (1)
Mike Garrity
on 30 Sep 2015
I just put a post up on the MATLAB graphics blog that covers the two different ways you can use that matrix, and quite a lot of the theory behind the 4x4 representation.
6 Comments
See Also
Categories
Find more on Specifying Target for Graphics Output in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!