%%% units in mm R01 = 70;% outer disc radius R02 = 35;% radius of inner clock ring R03 = 51;% radius of start ring R04 = 3.9; % magnet radius R05 = 2.25; % 3d part radius t1 = 3; % thickness of data rings t2 = 2.5; % distance between data rings [x1,y1]=circle(0,0,R01,1000); [x2,y2]=circle(0,8,R04,300); [x3,y3]=circle(0,-8,R04,300); [x4,y4]=circle(-5.75-2.25,0,R05,300); % [C, Cc] = abcGetBinary('why? ? ?'); % [C, Cc] = abcGetBinary('while you make pretty speeches, im being cut to shreds.'); % you feed me to the lions. a delicate balance. and this just feels like spinning plates.'); % [C, Cc] = abcGetBinary('while you make pretty speeches i?m being cut to shreds. you feed me to the lions. a delicate balance. this feels like spinning plates'); % [C, Cc] = abcGetBinary('what a beautiful dream. that could flash on the screen. in a blink of an eye and be gone from me. soft and sweet. let me hold it.'); % [C, Cc] = abcGetBinary('and that''s when I know it''s over. as soon as you start thinking about the beginning, it''s the end.'); % [C, Cc] = abcGetBinary('jono!'); % [C, Cc] = abcGetBinary('i am completely half afraid to think.'); % [C, Cc] = abcGetBinary('can?t believe how strange it is to be anything at all'); % [C, Cc] = abcGetBinary('can?t believe how strange it is to be anything at all'); % [C, Cc] = abcGetBinary('you may not look inside my mind anymore. now you may leave my arms of moss '); % [C, Cc] = abcGetBinary('you may not look inside my mind anymore. now you may leave my arms of moss '); [C, Cc] = abcGetBinary('don?t panic'); Nc = length(C); Nrow =41; theta =linspace(360,0,Nrow); thetaOffset = 0; buffer = 1.5; thetaO = theta-thetaOffset; close all; fig1=figure(1); fig1.Renderer='Painters'; t = tiledlayout(1,1,'Padding','none'); hold on; axis image off; plot(x1,y1,'-k'); plot(x2,y2,'-k'); plot(x3,y3,'-k'); plot(x4,y4,'-k'); thetaClockShift = 0.75; signClock = 1; %%% CREATE CLOCK RING for p=2:length(theta) [x,y] = tLine(R02,R02+t1,theta(p)+signClock*thetaClockShift); plot(x,y,'-k'); [x,y] = tLine(0,R01,theta(p)+signClock*thetaClockShift); plot(x,y,'--r'); if mod(p,2)==0 % p is even [x,y]=arcM(0,0,R02,theta(p)+thetaClockShift,theta(p+1)-thetaClockShift,100); plot(x,y,'-k'); [x,y]=arcM(0,0,R02+t1,theta(p)+thetaClockShift,theta(p+1)-thetaClockShift,100); plot(x,y,'-k'); end signClock = signClock*-1; end %%% CREATE START RING wB = 1; a1 =thetaO(wB)-buffer; a2 =thetaO(wB+1)+buffer; [x,y] = tLine(R03,R03+t1,a1); plot(x,y,'-k'); [x,y] = tLine(R03,R03+t1,a2); plot(x,y,'-k'); [x,y]=arcM(0,0,R03,a1,a2,100); plot(x,y,'-k'); [x,y]=arcM(0,0,R03+t1,a1,a2,100); plot(x,y,'-k'); %%% CREATE CODE % load('/Users/JonBumstead/Documents/PROJECTS/008expandedDisc/binary_halfwavelabs.mat'); % load('/Users/JonBumstead/Documents/PROJECTS/008expandedDisc/binary_hello.mat'); % C = OUTA; Rs = R03+t1+t2; wB = 1; clear Cm Cm(1,1) = 1; Cm(2:Nrow-1,1)=0; colCount =2 ; for p =1:Nc a1 =thetaO(wB)-buffer; a2 =thetaO(wB+1)+buffer; if C(p)==0 [x,y] = tLine(Rs,Rs+t1,a1); plot(x,y,'-k'); [x,y] = tLine(Rs,Rs+t1,a2); plot(x,y,'-k'); [x,y]=arcM(0,0,Rs,a1,a2,100); plot(x,y,'-k'); [x,y]=arcM(0,0,Rs+t1,a1,a2,100); plot(x,y,'-k'); end Cm(wB,colCount) = C(p); wB = wB+1; if wB==Nrow wB=1; Rs =Rs+t1+t2; colCount = colCount+1; end end remainCounts = Nrow-wB; if remainCounts>0 ind1 = Nrow-remainCounts; ind2 = Nrow-1; Cm(ind1:ind2,colCount)=1; end % t = tiledlayout(1,1,'Padding','none'); % % % t.Units = 'centimeters'; % % % t.OuterPosition = [0 0 20 20]; % nexttile; % exportgraphics(t,'/Users/JonBumstead/Documents/PROJECTS/008expandedDisc/discs/disc01_spinningPlates.eps') % saveas(gcf,'/Users/JonBumstead/Documents/PROJECTS/008expandedDisc/discs2/disc06adams.eps') %% SCRAP % % close all; % figure; hold on; axis image off; % plot(x1,y1,'-k'); % plot(x2,y2,'-k'); % plot(x3,y3,'-k'); % % for p=2:length(theta) % [x,y] = tLine(R02,R02+t1,theta(p)); % plot(x,y,'-k'); % % end %% Cs = '1'; for p=2:length(C) Cs = [Cs,num2str(C(p))]; end