Home

Introduction

Contents

Scripts

FeedBack

Date 08/09/2010
Script S1_2_10.m
Download Script S1_2_10.m
%==============================================
%Plane and spherical surfaces
%==============================================
%
%==============================================
%focal length of the system function of d
%see the problem 1.2.7
%==============================================
%the radius, in cm, of the concave mirror
R=-30;
%its focal length
f=R/2
%the refractive index in the air
n=1;
%the refractive index of the material M
np=1.55;
%a range of the distance d between 0 and -30, in cm
d=linspace(-0.01,-30,15);
%the object distance from the plane surface of M
z1=-100;
%the image due to the refracting surface M
z1p=z1*np/n
%that becomes virtual object for the mirror
%with a distance z2 from the mirror
z2=z1p+d
%the corresponding distance of the image
z2p=(f*z2)./(-f+z2)
%we put
z=z1
%and
zp=z2p
%to find the focal length of the system
fnew=(z*zp)./(z+zp)
%plot of the focal length of the system varying d
plot(d,fnew,'ro-'),grid on
title('focal length of the system function of d')
%
%==============================================
Top