• Remix
  • Share
  • New Entry

on 29 Oct 2021
  • 1
  • 30
  • 0
  • 0
  • 275
% Wobbly Text Effects
% Hack in a CR using '10'
S=['Wobbly Text Effects' 10 'With One Text Object' 10 'Using TeX Formatting'];
l=61; %numel(S)
% TeX string to change size of the following character
s=@(s)"\fontsize{"+s+"}";
% TeX string to change the color of the following character
c=@(c)"\color[rgb]{"+strjoin(""+c,",")+"}";
% Would normally like colonop, but had enough chars for linspace
r=linspace(0,5*pi,l);
% Colors from the color-order
q=lines(l);
% Init with string so we can use + to concat strings.
T="";
for i=1:l
% Append cos wave to font size, and add color from color list
% to every character in the string
T=T+s(abs(cos(r(i)))*40+12)+c(q(i,:))+S(i);
end
% Draw with one text object.
text(.5,.5,T,Vert='m',Horiz='c');
axis off
Remix Tree