## Wednesday, November 16, 2011

### Should I be driving automatic cars?

I've long been a fan of manual cars. I understand that automatics are easier to drive, especially in heavy traffic, but overall, I'd prefer to have a manual. Part of the reason for this is that I've had experience with horrible automatic gearboxes in the past that changed gears at stupid times, such as when going up hills, and part of the reason is that I like driving and I enjoy driving manuals. A friend, who has only got an automatic licence, recently pointed out that this doesn't really fit with my project and my studies. After all, my project has been all about automation. Is it strange for me to pursue a career path in automation, yet dislike automatics?

## Thursday, November 10, 2011

### Polar Bear

This is cool (found here):

function polarbear

% plots a polar bear in Matlab

function ec(h,k,a,b,ang)

% (h,k) is the center of the ellipse or circle

xp=a*cos(ang);

yp=b*sin(ang);

plot(h+xp,k+yp,'LineWidth',3,'Color','blue');hold on

end

% First plot curves that use theta between 0 and 2pi

ang=0:0.01:2*pi;

ec(5,0,2,2,ang),ec(-5,0,2,2,ang) % plot the feet

ec(2,0,1,1,ang),ec(-2,0,1,1,ang) % plot the hands

ec(0,9,4,3,ang) % plot the head

ec(1,10,0.25,0.25,ang),ec(-1,10,0.25,0.25,ang) % plot the eyes

ec(0,8,1,0.5,ang) % plot the nose

% Plot remaining curves for specific theta

ang=0:0.01:pi/2+3*pi/180; ec(5,0,2,5,ang) % plot the right legs

ang=pi/2-3*pi/180:0.01:pi; ec(-5,0,2,5,ang) % plot the left legs

ang1=pi:0.01:240*pi/180; ang2=-60*pi/180:0.01:0; ec(0,4,3,3.60,ang1),ec(0,4,3,3.60,ang2) % plot the arms

ang1=-24*pi/180:0.01:45*pi/180; ang2=pi-45*pi/180:0.01:pi+24*pi/180; ang3=254*pi/180:0.01:286*pi/180; ec(0,4,5,5,ang1),ec(0,4,5,5,ang2),ec(0,4,5,5,ang3) % plot the body

ang=0:0.01:155*pi/180; ec(2,11,1,2,ang) % plot the right inside ear

ang=26*pi/180:0.01:pi; ec(-2,11,1,2,ang) % plot the left inside ear

ang=-5*pi/180:0.01:156*pi/180; ec(2,11,1.25,2.25,ang) % plot the right outside ear

ang=25*pi/180:0.01:185*pi/180; ec(-2,11,1.25,2.25,ang) % plot the left outside ear

ang=pi/4:0.01:pi/2; ec(1,10,1,1,ang) % plot the right eyebrow

ang=pi/2:0.01:135*pi/180; ec(-1,10,1,1,ang) % plot the left eyebrow

ang=119*pi/180:0.01:2*pi+61*pi/180; ec(0,7,2,1,ang) % plot the mouth

ang=200*pi/180:0.01:320*pi/180; ec(0.75,8,0.75,1.5,ang) % plot the right smile

ang=220*pi/180:0.01:340*pi/180; ec(-0.75,8,0.75,1.5,ang) % plot the left smile

end

function polarbear

% plots a polar bear in Matlab

function ec(h,k,a,b,ang)

% (h,k) is the center of the ellipse or circle

xp=a*cos(ang);

yp=b*sin(ang);

plot(h+xp,k+yp,'LineWidth',3,'Color','blue');hold on

end

% First plot curves that use theta between 0 and 2pi

ang=0:0.01:2*pi;

ec(5,0,2,2,ang),ec(-5,0,2,2,ang) % plot the feet

ec(2,0,1,1,ang),ec(-2,0,1,1,ang) % plot the hands

ec(0,9,4,3,ang) % plot the head

ec(1,10,0.25,0.25,ang),ec(-1,10,0.25,0.25,ang) % plot the eyes

ec(0,8,1,0.5,ang) % plot the nose

% Plot remaining curves for specific theta

ang=0:0.01:pi/2+3*pi/180; ec(5,0,2,5,ang) % plot the right legs

ang=pi/2-3*pi/180:0.01:pi; ec(-5,0,2,5,ang) % plot the left legs

ang1=pi:0.01:240*pi/180; ang2=-60*pi/180:0.01:0; ec(0,4,3,3.60,ang1),ec(0,4,3,3.60,ang2) % plot the arms

ang1=-24*pi/180:0.01:45*pi/180; ang2=pi-45*pi/180:0.01:pi+24*pi/180; ang3=254*pi/180:0.01:286*pi/180; ec(0,4,5,5,ang1),ec(0,4,5,5,ang2),ec(0,4,5,5,ang3) % plot the body

ang=0:0.01:155*pi/180; ec(2,11,1,2,ang) % plot the right inside ear

ang=26*pi/180:0.01:pi; ec(-2,11,1,2,ang) % plot the left inside ear

ang=-5*pi/180:0.01:156*pi/180; ec(2,11,1.25,2.25,ang) % plot the right outside ear

ang=25*pi/180:0.01:185*pi/180; ec(-2,11,1.25,2.25,ang) % plot the left outside ear

ang=pi/4:0.01:pi/2; ec(1,10,1,1,ang) % plot the right eyebrow

ang=pi/2:0.01:135*pi/180; ec(-1,10,1,1,ang) % plot the left eyebrow

ang=119*pi/180:0.01:2*pi+61*pi/180; ec(0,7,2,1,ang) % plot the mouth

ang=200*pi/180:0.01:320*pi/180; ec(0.75,8,0.75,1.5,ang) % plot the right smile

ang=220*pi/180:0.01:340*pi/180; ec(-0.75,8,0.75,1.5,ang) % plot the left smile

end

### Bookmarking

I'm currently sat on a bus, on my way home, and I've just witnessed a woman fold over the corner of the page in the book she was reading. I wanted to tell her to refrain from such ghastly book defacing, but I restrained myself, and instead I'm just ranting on my blog. Books deserve better treatment.

Subscribe to:
Posts (Atom)