Slightly off-topic and probably useless for an answer, but after seeing this question I couldn't resist but write a LaTeX document that produces the following picture:

See the code below. I have only a limited understanding of physics (got a bit rusty on refraction indices), but I hope that it actually computes the refraction angles correctly. The exact values of the refraction indices were chosen just for the dramatic effect. :)
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
% Define rainbow colors
\def\colors{{"red", "orange", "yellow", "green", "blue", "purple"}}
\definecolor{red}{RGB}{202,14,46}
\definecolor{orange}{RGB}{231,137,24}
\definecolor{yellow}{RGB}{253,253,37}
\definecolor{green}{RGB}{129,195,43}
\definecolor{blue}{RGB}{110,201,223}
\definecolor{purple}{RGB}{102,78,133}
\newlength\rayWidth
\rayWidth=1pt
\def\refractionIndexRed{1.3}
\def\refractionIndexPurple{1.60}
\coordinate (O1) at (-3, -3); % Bottom left corner of picture
\coordinate (O2) at ( 3, 3); % Top right corner of picture
\coordinate (A) at (-4, -0.2); % Start point of incoming ray
\coordinate (B) at ( 4, 2.2); % End point of incoming ray if prism weren't there
\coordinate (BL) at (-1, 0); % Bottom left corner of the prism
\coordinate (BR) at (1, 0); % Bottom right corner of the prism
\coordinate (T) at (0, {sqrt(3)}); % Top corner of the prism
\coordinate (C) at (0, {sqrt(3)/2}); % Center of the prism
% Clip and draw black background
\clip (O1) rectangle (O2);
\fill[black] (O1) rectangle (O2);
% Define top and bottom coordinates of ray
\coordinate (A1) at ($(A)+(0,0.5\rayWidth)$);
\coordinate (A2) at ($(A)+(0,-0.5\rayWidth)$);
\coordinate (B1) at ($(B)+(0,0.5\rayWidth)$);
\coordinate (B2) at ($(B)+(0,-0.5\rayWidth)$);
% Draw prism
\foreach \z in {0, 0.5, ..., 10} {
\pgfmathsetmacro\d{0.5*\z}
\pgfmathsetmacro\s{10*\z}
\fill[rounded corners=\d pt, black!\s] ($(T)!\d pt!(C)$) -- ($(BR)!\d pt!(C)$) -- ($(BL)!\d pt!(C)$) -- cycle;
}
% Draw incoming ray
\path[name path=left side] (T) -- (BL);
\path[name path=right side] (T) -- (BR);
\path[name path=mid line] (T) -- ($(BR)!.5!(BL)$);
\path[name path=ray top] (A1) -- (B1);
\path[name intersections={of=left side and ray top,by=P1}];
\path[name path=ray bottom] (A2) -- (B2);
\path[name intersections={of=left side and ray bottom,by=P2}];
\fill [white, thick] (A1) -- (P1) -- (P2) -- (A2) -- cycle;
% Calculate angle of incidence
\pgfmathanglebetweenpoints{\pgfpointanchor{BL}{center}}{\pgfpointanchor{T}{center}}
\let\leftSideAngle\pgfmathresult
\pgfmathanglebetweenpoints{\pgfpointanchor{A}{center}}{\pgfpointanchor{B}{center}}
\pgfmathsetmacro\sinIncidenceAngle{sin(90-\leftSideAngle+\pgfmathresult)}
% Calculate refraction angles
\pgfmathsetmacro\deltaAngleTopL{asin(\sinIncidenceAngle)-asin(\sinIncidenceAngle/\refractionIndexRed)}
\pgfmathsetmacro\deltaAngleBottomL{asin(\sinIncidenceAngle)-asin(\sinIncidenceAngle/\refractionIndexPurple)}
% Draw shaded "triangle" inside the prism
\path[name path=path1] (P1) -- ($(P1)!1!-\deltaAngleTopL:(B1)$);
\path[name intersections={of=mid line and path1,by=Q1}];
\path[name intersections={of=right side and path1,by=R1}];
\path[name path=path2] (P2) -- ($(P2)!1!-\deltaAngleBottomL:(B2)$);
\path[name intersections={of=mid line and path2,by=Q2}];
\path[name intersections={of=right side and path2,by=R2}];
\shade[shading=axis, left color=white, right color=black]
(P1) -- (Q1) -- (Q2) -- (P2) -- cycle;
% Calculate incidence angles
\pgfmathanglebetweenpoints{\pgfpointanchor{BR}{center}}{\pgfpointanchor{T}{center}}
\let\rightSideAngle\pgfmathresult
\pgfmathanglebetweenpoints{\pgfpointanchor{P1}{center}}{\pgfpointanchor{R1}{center}}
\pgfmathsetmacro\sinTopIncidenceAngle{sin(\rightSideAngle-90-\pgfmathresult)}
\pgfmathanglebetweenpoints{\pgfpointanchor{P2}{center}}{\pgfpointanchor{R2}{center}}
\pgfmathsetmacro\sinBottomIncidenceAngle{sin(\rightSideAngle-90-\pgfmathresult)}
\pgfmathsetmacro\deltaAngleTopR{asin(\sinTopIncidenceAngle)-asin(\sinTopIncidenceAngle/\refractionIndexRed)}
\pgfmathsetmacro\deltaAngleBottomR{asin(\sinBottomIncidenceAngle)-asin(\sinBottomIncidenceAngle/\refractionIndexPurple)}
% Draw rainbow
\coordinate (T1) at ($(P1)!12!-\deltaAngleTopR:(Q1)$);
\coordinate (T2) at ($(P2)!15!-\deltaAngleBottomR:(Q2)$);
\foreach \i in {0, ..., 5} {
\pgfmathparse{\colors[\i]}
\edef\color{\pgfmathresult}
\pgfmathsetmacro\a{\i/6}
\pgfmathsetmacro\b{(\i+1)/6}
\fill[fill=\color] ($(R1)!\a!(R2)$) -- ($(T1)!\a!(T2)$) -- ($(T1)!\b!(T2)$) -- ($(R1)!\b!(R2)$) -- cycle;
}
\end{tikzpicture}
\end{document}
And here is an animated version: I am on fire! :)

Homework exercise: Write a LaTeX code that produces an image of a famous building in London with a pig flying above it.