| Bytes | Lang | Time | Link |
|---|---|---|---|
| nan | 240804T132447Z | iegik | |
| 173 | Common Lisp | 130123T110055Z | Strigoid |
| 1286 | Brainfuck | 130123T062321Z | captncra |
| 311 | C# | 120529T152819Z | Cristian |
| nan | 120529T173805Z | user unk | |
| 074 | APL | 120529T140525Z | marinus |
| nan | Ruby 1.9 | 110209T184231Z | Ventero |
| 176 | C | 110326T173656Z | Patrickv |
| nan | Delphi | 110325T155405Z | Patrickv |
| 103 | Perl 5.10 | 110206T005543Z | ninjalj |
| 157 | Windows PowerShell | 110209T143313Z | Joey |
| 120 | Perl | 110206T051610Z | anonymou |
| 141 | Python | 110204T084407Z | gnibbler |
JavaScript (from image url or data-url)
Following script accept url or data-url (svg has own problems with viewBox) and gradient of 20 symbols, which represents 10 pixels by 2 chars in each.
And returns an array of rows (including \n) with representation of provided image in ASCII art. I though, that will be right way to use it with Baili characters (My gradient: ⠂⠂⠁⢀⢁⢁⢌⢌⢕⢕⢗⢗⢟⢟⢷⢷⢿⢿) and put in alt attribute of same image.
async function imageToColorfulASCII(imageUrl, chars) {
const img = new Image();
img.crossOrigin = "Anonymous"; // To avoid CORS issues
img.src = imageUrl;
await img.decode();
const width = img.width;
const height = img.height;
console.log({ width, height });
const offscreenCanvas = new OffscreenCanvas(width, height);
const ctx = offscreenCanvas.getContext("2d");
ctx.drawImage(img, 0, 0, width, height);
const imageData = ctx.getImageData(0, 0, width, height).data;
const darknesses = [];
const colors = [];
for (let y = 0; y < height; y++) {
for (let x = 0; x < width; x++) {
const index = (y * width + x) * 4;
const r = imageData[index];
const g = imageData[index + 1];
const b = imageData[index + 2];
const a = imageData[index + 3];
// Skip transparent pixels
if (a === 0) continue;
// Calculate the darkness value (0..20)
const brightness = (r + g + b) / 3;
const darkness = Math.floor((1 - brightness / 255) * 9);
const safeCheck = (char) => (char === " " ? "\xA0" : char);
darknesses.push(
safeCheck(chars[darkness * 2]) + safeCheck(chars[darkness * 2 + 1])
);
colors.push(
`#${r.toString(16).padStart(2, "0")}${g
.toString(16)
.padStart(2, "0")}${b.toString(16).padStart(2, "0")}`
);
}
darknesses[darknesses.length - 1] += "\n";
}
// Log the results in the console
console.log(
darknesses.map((d) => `%c${d}`).join(""),
...colors.map((color) => `background-color: ${color};font-family:monospace;`)
);
return darknesses.join("");
}
Here is an example:
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂ ⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢁⢁⢁⢁ ⠂⠂⢌⢌⢕⢕⠁⢀⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢕⢕⢌⢌⠂⠂⢕⢕⢕⢕⢌⢌⢕⢕⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢕⢕⢌⢌⠂⠂⢷⢷⢁⢁ ⠂⠂⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢕⢕⢌⢌ ⢁⢁⢿⢿⢕⢕⠁⢀⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢕⢕⢌⢌ ⠂⠂⠁⢀⢗⢗⢿⢿⢁⢁
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢕⢕⢌⢌⠂⠂⠁⢀⠂⠂⠂⠂⢕⢕⢕⢕
⠂⠂⠂⠂⠂⠂⠂⠂⢁⢁⢿⢿⢌⢌⢿⢿⢁⢁⠂⠂⢿⢿⢕⢕⢌⢌⢿⢿⢁⢁
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⢁⢁⢕⢕⢁⢁⠂⠂⠂⠂⠁⢀⢌⢌⢕⢕⢁⢁⠂⠂⠂⠂
⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂
Common Lisp, 173 characters
(let*((c(read))(v(read))(g(read-line))(l(length g)))(dotimes(y 25)(dotimes(x 70)(princ(elt g(min(floor(*(sqrt(+(expt(/(- c x)2)2)(expt(- v y)2)))l)35)(1- l)))))(princ #\
)))
The only real trick I use here is using
#\[actual newline]
as a newline character literal
Brainfuck - 1286
This is one of my favorite creations yet. Includes a working (for some definitions of working) square root function.
>,>,<<<<<<<+>,[<+[<+>-],]<-[>>[>]>>>+<<<<[<]<-]>>[<+<+<+>>>-]<<<[>>>+<
<<-]>[>]>>>>>>>+++++[<+++++>-]<[>>+++++++[<++++++++++>-]<[>>+++++++[<+
+++++++++>-]<<[>->+<<-]>>[<<+>>-]<<<<<[>>>>->+<<<<<-]>>>>>[<<<<<+>>>>>
-]<[>+>+<<-]>[<+>-]>>+++++++[<<++++++++++>>-]>[-]>[-]+>[-]<<<<[>+>+<<-
]>[<+>-]<<[>>+<<-]+>>>[>-]>[<<<<->>[-]>>->]<+<<[>-[>-]>[<<<<->>[-]+>>-
>]<+<<-]>[-]>[-]<<<[-]<[-<+[+>+<]>+[<+>-]]++<[->-[>+>>]>[+[-<+>]>+>>]<
<<<<]>[-]>[-]>[<<<+>>>-]<+++++[<+++++>-]<<<<[>>>->+<<<<-]>>>>[<<<<+>>>
>-]<<<<<[>>>>->+<<<<<-]>>>>>[<<<<<+>>>>>-]<[>+>+<<-]>[<+>-]>>+++++[<<+
++++>>-]>[-]>[-]+>[-]<<<<[>+>+<<-]>[<+>-]<<[>>+<<-]+>>>[>-]>[<<<<->>[-
]>>->]<+<<[>-[>-]>[<<<<->>[-]+>>->]<+<<-]>[-]>[-]<<<[-]<[-<+[+>+<]>+[<
+>-]]<<[>>+>+<<<-]>>[>>>+<<<-]>>>[<<[<+>>+<-]>[<+>-]>-]<<[-]<[<<+>>-]<
[>+>+<<-]>[>>>+<<<-]>>>[<<[<+>>+<-]>[<+>-]>-]<<[-]<[<<+>>-]<<>+>>+<<<[
[>>+>>+<<<<-]>>>>[<<<<+>>>>-]>[-]>[-]+>[-]<<<<[>+>+<<-]>>[<<+>>-]<<<[>
>>+<<<-]>>>[>-]>[<<<<+>>[-]>>->]<+<<[>-[>-]>[<<<<+>>[-]+>>->]<+<<-]>[-
]>[-]<<+<<[>>-<[-]<-<<[-]>>]>>[-<<<[>+>+<<-]+>[<+>>+<-]>+>]<<<<]>[<+>-
]<-<<<<<[<+>->>>>>>+<<<<<<]<[>+<-]>>>>>>[>>>+<<<-]>>>[<<[<+>>+<-]>[<+>
-]>-]<+++++++<[-]>[<+++++>-]<<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>[-]>[
<<<<<<<<<<<+>>>>>>>>>>>-]<<<<<<<<<<<[-<[>>+<<-]>[<+>-]<]<.>>>[[<<+>>-]
>]>>>>>-]++++++++++.[-]<-]
Output is a bit off due to rounding errors, but still recognizable. Floating point is beyond my current skill level. Unfortunately this will only work with 16 bit cells, which means it is going to be dog slow.
Output 1:
&$$$$$$$$XXXXXXXXxxxxxxxxxx========++++++++++++++++++++++;;;++++++++++
$$$$$$$$$XXXXXXxxxxxxxxxx========++++++++++++++;;;;;;;;;;;;;;;;;;;;;;;
$$$$$$$XXXXXXXXxxxxxxxx========++++++++++++;;;;;;;;;;;;;;;;;;;;;;;;;;;
$$$$$$$XXXXXXxxxxxxxxxx======++++++++++++;;;;;;;;;;;;;;;;:::;;;;;;;;;;
$$$$$XXXXXXXXxxxxxxxx========++++++++++;;;;;;;;;;:::::::::::::::::::;;
$$$$$XXXXXXxxxxxxxxxx======++++++++++;;;;;;;;:::::::::::::::::::::::::
$$$$$XXXXXXxxxxxxxx======++++++++++;;;;;;;;:::::::::::::::::::::::::::
$$$XXXXXXxxxxxxxxxx======++++++++;;;;;;;;::::::::::::::::...::::::::::
$$$XXXXXXxxxxxxxx========++++++++;;;;;;::::::::::::...............::::
$$$XXXXXXxxxxxxxx======++++++++;;;;;;;;::::::::::...................::
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::::.......... ..........
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::........ ......
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::...... ....
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::...... ....
$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::...... ..
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::...... ....
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::...... ....
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::........ ......
$$$XXXXXXxxxxxxxx======++++++++;;;;;;::::::::::.......... ..........
$$$XXXXXXxxxxxxxx======++++++++;;;;;;;;::::::::::...................::
$$$XXXXXXxxxxxxxx========++++++++;;;;;;::::::::::::...............::::
$$$XXXXXXxxxxxxxxxx======++++++++;;;;;;;;::::::::::::::::...::::::::::
$$$$$XXXXXXxxxxxxxx======++++++++++;;;;;;;;:::::::::::::::::::::::::::
$$$$$XXXXXXxxxxxxxxxx======++++++++++;;;;;;;;:::::::::::::::::::::::::
$$$$$XXXXXXXXxxxxxxxx========++++++++++;;;;;;;;;;:::::::::::::::::::;;
Output 2:
XXXXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXX
XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXXXX............XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XX................XXXXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
..................XXXXXXXXXX............XXXXXXXXXX..........XXXXXXXXXX
................XXXXXXXXXXXX..........XXXXXXXXXXXX..........XXXXXXXXXX
..............XXXXXXXXXXXX............XXXXXXXXXX..........XXXXXXXXXXXX
..........XXXXXXXXXXXXXXXX..........XXXXXXXXXXXX..........XXXXXXXXXXXX
..XXXXXXXXXXXXXXXXXXXXXX............XXXXXXXXXX............XXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX............XXXXXXXXXXXX..........XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX..............XXXXXXXXXX............XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX................XXXXXXXXXXXX............XXXXXXXXXXXXXX
XXXXXXXXXXXX..................XXXXXXXXXXXX............XXXXXXXXXXXXXXXX
XX..........................XXXXXXXXXXXXXX..........XXXXXXXXXXXXXXXXXX
..........................XXXXXXXXXXXXXX............XXXXXXXXXXXXXXXXXX
......................XXXXXXXXXXXXXXXX............XXXXXXXXXXXXXXXXXXXX
..................XXXXXXXXXXXXXXXXXX..............XXXXXXXXXXXXXXXXXXXX
..............XXXXXXXXXXXXXXXXXXXX..............XXXXXXXXXXXXXXXXXXXXXX
..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............XXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXX................XXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXX..................XXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
C# 311
Thought I'd make a long program to make the others feel better:
using System;class P{static void Main(){Func<string>r=Console.ReadLine;int x=int.Parse(r()),y=int.Parse(r());var c=r();for(int j=0;j<25;j++){for(int i=0;i<70;i++){var l=c.Length;Console.Write(c[(int)Math.Min(l*Math.Sqrt(Math.Pow(Math.Abs(x-i)/2.0,2)+Math.Pow(Math.Abs(y-j),2))/35,l-1)]);}Console.Write("\n");}}}
Input is taken from the console, one line at a time (two lines for the coordinates and one for the gradient chars).
Thanks to Joey for the tips.
Sample 1: http://ideone.com/X0jIZ
Sample 2: http://ideone.com/RvICt
scala 223 (204 without App-Wrapper)
object C extends App{
import math._
def r=readInt
val p=r
val q=r
val m=readLine
(1 to 70)map(x=>(0 to 25)map(y=>{
printf("%c[%d;%dH%s",27,y,x,m(({
val a=abs(p-x)
val b=abs(q-y)
sqrt(a*a+2*b*b)
}*(m.size-1)/74).toInt))}
))}
Having cols and rows (70, 25) set dynamically would allow for screenfilling gradients.
APL (74)
{L←⍴⊃C Y X⎕IO←⍞⎕⎕0⋄⎕←{C[⊃⌊L⌊35÷⍨L×.5*⍨+/2*⍨1 2÷⍨⍵-Y X]}¨⍳⍵}25 70
The reason it's wrapped in a function is that the modification to ⎕IO doesn't apply to the rest of the system.
Explanation:
L←⍴⊃C Y X⎕IO←⍞⎕⎕0: Set⎕IOto0(making arrays 0-based instead of 1-based), set X to⎕(first line read), set Y to⎕(second line read), set C to⍞(third line read, with no formatting), and set L to the length (⍴) ofC.25 70: the dimensions of the matrix.¨⍳⍵: for each element in the matrix where each element is its own coordinates...⍵-Y X: difference between the current point and the center point1 2÷⍨: divide the X coordinate by 2 (because a char is half as wide as it is tall).5*⍨+/2*⍨: take the square root of the sum of the squares35÷⍨: divide by 35⌊L⌊: take the minimum of the amount of characters and the current value and round it down,/: The values are still wrapped in a list (of only one element), and this will create spacing in the output, so 'free' the values from their lists.C[...]: use the value we found as an index into the character list⎕←: we now have a matrix where each element (x,y) is the character for (x,y), so output the matrix.
Ruby 1.9, 116 114 108 101 characters
x,y,z=*$<;25.times{|r|70.times{|c|$><<z[[(c-x.to_i+2.i*(r-y.to_i)).abs/70.0*k=z=~/$/,k-1].min]};puts}
C, 176
Here a translation of my Delphi solution to C, saving 24 characters :
X,Y,l,i,j,t;char G[99];main(){scanf("%d\n%d\n",&X,&Y);gets(G);l=strlen(G);for(j=-Y;j<25-Y;j++)for(i=-X-1;i<70-X;)t=floor(l*sqrt(i*i++/4+j*j)/35),putchar(!i+X?10:G[t<l?t:l-1]);}
You can test this code here : http://www.ideone.com/oTvHt
Delphi, 200 (and 185)
Since I like ascii-art here a Delphi version of this code golf:
uses Math;var G:string;X,Y,l,i,j:Int16;begin ReadLn(X,Y);ReadLn(G);l:=Length(G);for j:=-y to 24-y do for i:=-x to 70-x do if i=70-x then WriteLn else Write(g[Min(l,1+Trunc(l*sqrt(i*i/4+j*j)/35))])end.
Not very impressive character-wise, as I had to use the Math unit to link in the Min() function. Also, ReadLn() somehow doesn't read integers and strings in one call, so that's quite expensive too. The newline needs a lot of characters too. Also, Delphi needs quite a lot of whitespace around it's keywords. Not very proud of this one.
Anyway, the output of sample 4 gives me :
!+#-,|><87654210ZYWVUTRQPONLKJIHFEDCBzyxwutsrqonmlkjhgfedcbbbcdefghjkl
!+#-,|><87654210ZYWVUTRQPONLKJIHFEDCAzyxwutsrqonmljihgfdcba abcdfghijl
!+#-,|><87654210ZYWVUTRQPONLKJIHFEDCBzyxwutsrqonmlkjhgfedcbbbcdefghjkl
!+#-,|><97654310ZYXVUTSQPONMKJIHGEDCBAyxwvutrqponmkjihgffeedeeffghijkm
$+#-.|><98654320ZYXWUTSRQONMLKIHGFEDBAzyxwutsrqponmlkjihhggggghhijklmn
$!#-.,|<987643210YXWVUSRQPONLKJIHGEDCBAzywvutsrqponmllkjjjiiijjjkllmno
$!+#.,|><87654210ZYXVUTSRQONMLKJHGFEDCBAzywvutsrrqponnmmlllllllmmnnopq
%!+#-.|><987543210YXWVUTRQPONMLJIHGFEDCBAzyxwvutsrrqppooonnnnnoooppqrr
%$!+-.,|><87654310ZYXWVTSRQPONMLJIHGFEDCBAzyxxwvuttssrrqqqqqqqqqrrsstt
&%!+#-.,><987643210ZYXVUTSRQPONMLKJIHGFEDCBAzyyxwvvuutttssssssstttuuvv
&%$!+#.,|><986543210ZYWVUTSRQPONMLKJIHGFEDDCBAzzyyxwwwvvvuuuuuvvvwwwxy
/&%$!#-.,|><976543210ZYXVUTSRQPONMLKKJIHGFEEDCBBAAzzyyyxxxxxxxxxyyyzzA
(/&%!+#-.,|><876543210ZYXWVUTSRQPONMLKJJIHGGFEEDCCBBBAAAzzzzzzzAAABBBC
)(/%$!+#-.,|><876543210ZYXWVUTSRQPPONMLKKJIIHGGFFEEDDDCCCCCCCCCCCDDDEE
=)(&%$!+#-.,|><986543210ZYYXWVUTSRQPPONMMLKKJIIHHGGGFFFEEEEEEEEEFFFGGG
?=)(&%$!+#-.,|><9876543210ZYXWVVUTSRRQPOONMMLLKJJJIIIHHHHHHHHHHHHHIIIJ
*?=)(/%$!+#-.,|><98765432210ZYXWWVUTSSRQQPOONNMMLLLKKKJJJJJJJJJJJKKKLL
'*?=)(/&%$!+#-.,|><98765432110ZYXXWVUUTSSRRQPPOOONNNMMMMMLLLLLMMMMMNNN
_'*?=)(/&%$!+#-.,|><988765432210ZYYXWWVUUTTSSRRQQQPPPOOOOOOOOOOOOOPPPQ
:_'*?=)(/&%$!+##-.,|><9877654332100ZYYXXWVVUUTTTSSSRRRRQQQQQQQQQRRRRSS
;;:_'*?=)(/&%$!+#-.,,|><98876554322100ZZYYXXWWVVVUUUTTTTTTTTTTTTTTTUUU
;;;:_'*?=)(/&&%$!+#-.,,|><9987665443321100ZZYYYXXXWWWWVVVVVVVVVVVWWWWX
;;;;;:_'*?=)(/&%$$!+#-..,|>><9887665544322211000ZZZYYYYYYYYYYYYYYYYYZZ
;;;;;;:_'*??=)(/&%%$!+##-.,,|><<99877665544333222111100000000000001111
;;;;;;;;:_'*?==)(/&&%$!++#--.,,|>><<9887766655544433333322222223333334
If you would accept indented output, this version is a bit shorter by changing the newline into an indent that leads to a 80-character wrap (simulating a newline on standard 80x25 consoles) :
uses Math;var G:string;X,Y,l,i,j:Int16;begin ReadLn(X,Y);ReadLn(G);l:=Length(G);for j:=-y to 24-y do for i:=-x to 70-x do Write(g[Min(l,1+Trunc(l*sqrt(i*i/4+j*j)/35))]:11*Ord(i=-x))end.
(this saves 15 characters, for a total of 185 characters). It's output for "0 0 X.X.X.X" is :
XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXXXX............XXXXXXXXXX..........XXXXXXXXXX..........XXXXXXXXXX
XXXXXX.............XXXXXXXXXX...........XXXXXXXXXX..........XXXXXXXXXX
..................XXXXXXXXXXX..........XXXXXXXXXX...........XXXXXXXXXX
................XXXXXXXXXXXX...........XXXXXXXXXX..........XXXXXXXXXXX
...............XXXXXXXXXXXX...........XXXXXXXXXX...........XXXXXXXXXXX
............XXXXXXXXXXXXXX...........XXXXXXXXXXX..........XXXXXXXXXXXX
.........XXXXXXXXXXXXXXX............XXXXXXXXXXX...........XXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX............XXXXXXXXXXX...........XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXX.............XXXXXXXXXXX...........XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX..............XXXXXXXXXXXX...........XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX................XXXXXXXXXXXX............XXXXXXXXXXXXXXX
XXXXXXXXXXX..................XXXXXXXXXXXXX............XXXXXXXXXXXXXXXX
...........................XXXXXXXXXXXXX............XXXXXXXXXXXXXXXXXX
........................XXXXXXXXXXXXXXX............XXXXXXXXXXXXXXXXXXX
......................XXXXXXXXXXXXXXX.............XXXXXXXXXXXXXXXXXXXX
..................XXXXXXXXXXXXXXXXX.............XXXXXXXXXXXXXXXXXXXXXX
.............XXXXXXXXXXXXXXXXXXXX..............XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............XXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXX...............XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXX.................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXX......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(Can you see the indent?! ;-) )
Perl 5.10, 103 chars
$x=<>;$y=<>;@C=<>=~/./g;for$j(-$y..24-$y){print+(map$C[@C/35*sqrt$_**2/4+$j**2]//$C[-1],-$x..69-$x),$/}
Windows PowerShell, 157
Nothing noteworthy. Beaten to death already:
$x,$y,$c=@($input)
$l=$c.Length
$c+=(""+$c[-1])*90
0..24|%{$r=$_
-join(0..69|%{$c[[math]::truncate([math]::sqrt(($x-$_)*($x-$_)+4*($y-$r)*($y-$r))*$l/70)]})}
Perl, 120 chars
$x,$y=<>,<>;@C=split'',<>;for$j(0..24){print+(map$C[($c=$#C/35*sqrt(($x/2-$_/2)**2+($y-$j)**2))<$#C?$c:$#C-1],0..69),$/}
Python - 141 chars
x=input();y=input();z=raw_input();w=len(z)
for i in range(-y,25-y):print"".join(z[min(w-1,int((i*i*4+j*j)**.5*w/70))]for j in range(-x,70-x))