Help():= proc(): print(`Caesar(p,k1)`): end: with(plots): # I learned some useful things for this code here (still original): https://www.math.stonybrook.edu/~scott/papers/Book331/Simple_Ciphers.html # modified Caesar cipher code #Caesar(p,k1): Implements the Caesar Code (all caps) # Inputs a string, outputs a string, encoded by Caesar cipher shift k1 from 0 to 26 Caesar:=proc(p,k1) local a,T,i1: a:=`ABCDEFGHIJKLMNOPQRSTUVWXYZ `: # I had to include the space character in my alphabet or it wouldn't work. T:= table([seq( substring(a,i1) = substring(a,(i1+k1-1 mod 27)+1),i1=1..length(a))]): cat(seq(T[substring(p,i1)] ,i1=1..length(p))): end: # makes a heart with the indicated string message encoded in all caps. prints a plot and returns string. # makeHeartE(s) # example: makeHeartE(`I LOVE CODING THEORY`); s:= `I LOVE CODING THEORY`: q:=Caesar(s,22): # function p1 is from wolfram mathworld p1:=plot([16*(sin(t))^3,13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t),t=0..2*Pi],axes=none,color=pink,size=[350,350],filled=true): p2:=textplot([0,0,q],axes=none,'color' = "White", font=[Helvetica,bold, 14]): display(p1,p2); r:=Caesar(q,5): # function p1 is from wolfram mathworld p1:=plot([16*(sin(t))^3,13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t),t=0..2*Pi],axes=none,color=red,size=[350,350],filled=true): p2:=textplot([0,0,r],axes=none,'color' = "White",font=[Helvetica,bold, 14]): display(p1,p2);