Physics Geek Physics for the Physics Student

1Jun/110

The Witch of Agnesi

The Witch of Agnesi is the curve that is described by the following equation:

Equations for The Witch of Agnesi

The code to display the graph of these equations for a range of a in MatLab is :


% Exercise 1.8
% The Witch of Agnesi
%
% Jeff Thompson
%

clear;

steps = 2000; % Define the number of steps

range = 100 -(-100); % Define the abs of range

mesh = range/steps; % Define the mesh size

initialPosition = -100; % Define the starting position
hold all;
whitebg('white')
axis([-15 15 -15 15])
xlabel('x')
ylabel('y')
title('The Witch of Agnesi')

for a = 1:6
for i =1: steps+1
x(i)=initialPosition + (i-1)*mesh;
y(i)=(8*a^3)/(x(i)^2+4*a^2);
end
plot( x, y)
end

This produces the graph:

The Witch of Agnesi

31May/110

Three Leaved Rose

The Three Leaved Rose is the curve that is described by the following equation:

Equations for Three Leaved Rose

The code to display the graph of these equations where a=1 in MatLab is :


% Exercise 1.8
% Three-Leaved Rose
%
% Jeff Thompson
%

clear;

steps = 200; % Define the number of steps

range = 2*pi -(0); % Define the abs of range

mesh = range/steps; % Define the mesh size

initialPosition = 0; % Define the starting position
hold all;
whitebg('white')
axis([-5*pi 5*pi -5*pi 5*pi])
xlabel('theta')
ylabel('r')
title('Three-Leaved Rose')

a=10;
for i =1: steps+1
theta(i)=initialPosition + (i-1)*mesh;
r1(i)=a*sin(3*theta(i));
end
polar( theta, r1)

This produces the graph:

Three Leaved Rose

31May/110

Strophoid

The Strophoid is the curve that is described by the following equation:

Equations for the Strophoid

The code to display the graph of these equations where a=1 in MatLab is :


% Exercise 1.8
% Strophoid
%
% Jeff Thompson
%

clear;

steps = 200; % Define the number of steps

range = 2*pi -(0); % Define the abs of range

mesh = range/steps; % Define the mesh size

initialPosition = 0; % Define the starting position
hold all;
axis([-1 1 -1 1])
whitebg('white')
xlabel('theta')
ylabel('r')
title('The Strophoid')

a=1;
for i =1: steps+1
theta(i)=initialPosition + (i-1)*mesh;
r1(i)=a*cos(2*theta(i))*sec(theta(i));
end
polar( theta, r1)

This produces the graph:

The Strophoid

30May/110

The Arithmetic Spiral (Spiral of Archimedes)

The Arithmetic Spiralor Spiral of Archimedes is the curve that is described by the following equation:

Equations for Arithmetic Spiral (Spiral of Archimedes)

The code to display the graph of these equations where a=1 in MatLab is :


% Exercise 1.8
% Spiral of Archimedes
%
% Jeff Thompson
%

clear;

steps = 1200; % Define the number of steps

range = 6*pi -(0); % Define the abs of range

mesh = range/steps; % Define the mesh size

initialPosition = 0; % Define the starting position
hold all;
whitebg('white')
axis([-5*pi 5*pi -5*pi 5*pi])
xlabel('theta')
ylabel('r')
title('The Spiral of Archimedes')

a=1;
for i =1: steps+1
theta(i)=initialPosition + (i-1)*mesh;
r1(i)=a*theta(i);
end
polar( theta, r1)

This produces the graph:

Arithmetic Spiral (Spiral of Archimedes)

30May/110

The Parabolic Spiral (Fermat’s Spiral)

The Fermat's Spiralor Parabolic Spiral is the curve that is described by the following equation:

Fermat's Spiral

The code to display the graph of these equations where a=1 in MatLab is :


% Exercise 1.8
% Parabolic Spiral
%
% Jeff Thompson
%

clear;

steps = 1000; % Define the number of steps

range = 5*pi -(-5*pi); % Define the abs of range

mesh = range/steps; % Define the mesh size

initialPosition = -5*pi; % Define the starting position
hold all;
whitebg('white')
axis([-5*pi 5*pi -5*pi 5*pi])
xlabel('theta')
ylabel('r')
title('The Parabolic Spiral')

a=.01;
k=100;
for i =1: steps+1
theta(i)=initialPosition + (i-1)*mesh;
r1(i)=real(a+sqrt(4*a*k*theta(i)));
r2(i)=real(a-sqrt(4*a*k*theta(i)));
end
polar( theta, r1)
polar( theta, r2)

This produces the graph:

Fermat's Spiral