%COMP 236 Programming Assignment 1
%Adrian Ilie, Feb. 2002

imWidth=300;%pixels
imHeight=200;
filmWidth=36;%mm
filmHeight=24;
k=imWidth/filmWidth;%pixels per mm
mpi=25.4;%mm per inch
cb=load('ws');%cereal box in inches
cb=cb-([4 6 1.5]'*ones(1,20))';%make center of box the origin
cbp=cb*mpi*k;%cereal box in pixels
f=15*k;%15 mm in pixels
imSize=[imHeight,imWidth];

figure;

bx = uicontrol(gcf, ...
   'Tag', 'xcoord', ...
   'Style', 'slider', ...
   'Position', [20 30 150 10], ...
   'Min', -5000, 'Max', 5000, 'Value', 00,...
   'Callback', 'callback(cbp,imSize,f)');

by = uicontrol(gcf, ...
   'Tag', 'ycoord', ...
   'Style', 'slider', ...
   'Position', [20 20 150 10], ...
   'Min', -5000, 'Max', 5000, 'Value', 0,...
   'Callback', 'callback(cbp,imSize,f)');

bz = uicontrol(gcf, ...
   'Tag', 'zcoord', ...
   'Style', 'slider', ...
   'Position', [20 10 150 10], ...
   'Min', -5000, 'Max', 5000, 'Value', 4000,...
   'Callback', 'callback(cbp,imSize,f)');

xa = uicontrol(gcf, ...
   'Tag', 'xangle', ...
   'Style', 'slider', ...
   'Position', [200 30 150 10], ...
   'Min', -180, 'Max', 180, 'Value', 0,...
   'Callback', 'callback(cbp,imSize,f)');

ya = uicontrol(gcf, ...
   'Tag', 'yangle', ...
   'Style', 'slider', ...
   'Position', [200 20 150 10], ...
   'Min', -180, 'Max', 180, 'Value', 0,...
   'Callback', 'callback(cbp,imSize,f)');

za = uicontrol(gcf, ...
   'Tag', 'zangle', ...
   'Style', 'slider', ...
   'Position', [200 10 150 10], ...
   'Min', -180, 'Max', 180, 'Value', 0,...
   'Callback', 'callback(cbp,imSize,f)');

