\documentclass[usenames,dvipsnames, aspectratio=169]{beamer}
%----------------------------------------------------------------------------------------
%	Struktur und Pointer Referat
%   20.04.2020
%----------------------------------------------------------------------------------------
\usetheme[nofirafonts]{focus}


\usepackage[utf8]{inputenc}

\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bbm}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{mathtools}

\RequirePackage[T1]{fontenc}

\PassOptionsToPackage{sfdefault}{FiraSans}
\RequirePackage{FiraSans}

\RequirePackage{FiraMono}

% Farbdefinitionen
\definecolor{backgroundcoloreq}{RGB}{180,140,0}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{codeorange}{RGB}{190,100,0}

% we wanna use default caleographic alphabet
\DeclareMathAlphabet{\mathcal}{OMS}{cmbrs}{m}{n}


%----------------------------------------------------------------------------------------
%	 TITLE SLIDE
%----------------------------------------------------------------------------------------

\title{De-Cluttering Scatterplots}
\subtitle{with Integral Images}
\author{Lukas Heiligenbrunner}
\date{\today}

%------------------------------------------------

\begin{document}

%------------------------------------------------

    \begin{frame}
        \maketitle
    \end{frame}



%----------------------------------------------------------------------------------------
%	 SECTION 1: INTRODUCTION
%----------------------------------------------------------------------------------------

    \section{Introduction}

    \begin{frame}{Goal of the Paper}
        \begin{itemize}
            \item Scatterplots are fundamental for exploring multidimensional data
            \item But: with large datasets they suffer from \textbf{overplotting}
            \item Dense regions obscure structure, samples become inaccessible
            \item Goal:
            \begin{itemize}
                \item Reduce clutter
                \item Preserve neighborhood relations
                \item Achieve uniform sample distribution
                \item Maintain interpretability
            \end{itemize}
        \end{itemize}
    \end{frame}

%----------------------------------------------------------------------------------------
%	SECTION 2: PROBLEM
%----------------------------------------------------------------------------------------

    \section{Problem: Overplotting}

    \begin{frame}{Why Scatterplots Clutter}
        \begin{itemize}
            \item Modern datasets: millions of samples
            \item Pixel resolution fixed → many samples map to the same pixel
            \item Consequences:
            \begin{itemize}
                \item Occlusion of clusters + outliers
                \item Loss of density information
                \item Hard to select individual items
                %\item Misleading visual perception
            \end{itemize}
            \item A method is needed to \textbf{declutter} without losing structure
        \end{itemize}
    \end{frame}

    \begin{frame}
        \centering
        \includegraphics[scale=0.8]{rsc/overplotting}
        \footnotesize\text{Source: \cite{statisticsglobe_overplotting_r}}
    \end{frame}

    \begin{frame}{Limitations of Traditional Approaches}
        \begin{itemize}
            \item Transparency-based methods
            \begin{itemize}
                \item Improve density perception
                \item But still lose individual sample visibility
            \end{itemize}
            \item Down-sampling
            \begin{itemize}
                \item Removes data → not acceptable for analysis
            \end{itemize}
            \item Local spatial distortions
            \begin{itemize}
                \item Risk of collisions
                \item Often non-monotonic mappings
            \end{itemize}
            \item Need a \textbf{global}, \textbf{smooth}, \textbf{monotonic}, \textbf{collision-free} method
        \end{itemize}
    \end{frame}

    %----------------------------------------------------------------------------------------
%	SECTION 3: BACKGROUND
%----------------------------------------------------------------------------------------

    \section{Background: Density Fields \& Integral Images}

    \begin{frame}{Density Estimation}
        \begin{itemize}
            \item Given samples $z_i = (x_i, y_i)$
            \item Build smoothed density:
            \[
                d_r(x,y) = \sum_{p=1}^n \varphi_r(x-x_p, y-y_p)
            \]
            \item Typically Gaussian kernel
            \item Add global constant $d_0$ for stability:
            \[
                d(i,j) = d_r(i,j) + d_0
            \]
            \item Ensures no empty regions → avoids singular mappings
        \end{itemize}
    \end{frame}

    \begin{frame}{Integral Images (InIms) I}
        \begin{itemize}
            \item Integral images compute cumulative sums over regions
            \item Four standard tables:
            \[
                \alpha,\beta,\gamma,\delta
            \]
            \item Four tilted (45°) tables:
            \[
                \alpha_t, \beta_t, \gamma_t, \delta_t
            \]
            \item Each encodes global density distribution
            \item Key advantage:
            \begin{itemize}
                \item Displacements depend on \textbf{global density}, not local neighborhood
                \item Avoids collisions
            \end{itemize}
        \end{itemize}
    \end{frame}

    \begin{frame}{Integral Images (InIms) II}
        \centering
        \includegraphics[scale=0.3]{rsc/2408.06513v1_page_6_5}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Integral Images (InIms) III}
        \centering
        \includegraphics[scale=0.3]{rsc/2408.06513v1_page_6_6}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Integral Images (InIms) IV}
        \centering
        \includegraphics[scale=0.3]{rsc/2408.06513v1_page_6_7}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    %----------------------------------------------------------------------------------------
%	SECTION 4: METHOD
%----------------------------------------------------------------------------------------

    \section{Density-Equalizing Mapping}

    \begin{frame}{Goal of the Mapping}
        \begin{itemize}
            \item We want to transform the scatterplot domain so that:
            \begin{itemize}
                \item dense regions expand
                \item sparse regions contract
                \item overall density becomes approximately uniform
            \end{itemize}
            \item The deformation must be:
            \begin{itemize}
                \item smooth
                \item globally consistent
                \item monotonic (no point order swaps)
                \item free of collisions
            \end{itemize}
            \item To achieve this, we compute a \textbf{density–driven displacement field}.
        \end{itemize}
    \end{frame}

    \begin{frame}{Corrected Mapping: Key Idea}
        \begin{itemize}
            \item Let $t(x,y; d)$ be the deformation computed from the
            \textbf{actual density field} $d(x,y)$.
            \item This deformation is built from cumulative sums of density
            through the integral images.
            \item Problem: even for \textbf{constant density}, $t(x,y; d_0)$
            is \emph{not} zero (due to construction of the integral tables).
            \item Therefore:\\
                We subtract the deformation caused by constant density.
        \end{itemize}
        \begin{align*}
            T(x,y) = (x,y) \;+\; t(x,y; d) \;-\; t(x,y; d_0) \;
        \end{align*}

        \begin{itemize}
            \item $T(x,y)$ is the \textbf{corrected mapping}.
            \item For uniform density: $t(x,y; d) = t(x,y; d_0)$  $\rightarrow$ identity mapping.
        \end{itemize}
    \end{frame}

%    \begin{frame}{Why the Corrected Mapping Works}
%        \begin{itemize}
%            \item \textbf{Identity on uniform density}
%            \begin{itemize}
%                \item Without correction: the old mapping distorted even uniform fields.
%                \item With correction: uniform density $\rightarrow$ no deformation.
%            \end{itemize}
%            \item \textbf{Monotonicity}
%            \begin{itemize}
%                \item The corrected mapping guarantees no coordinate inversions.
%                \item Order of points is preserved along both axes.
%            \end{itemize}
%            \item \textbf{Smoothness}
%            \begin{itemize}
%                \item The mapping is built from integral images (global cumulative fields),
%                \item yielding slow, continuous changes.
%            \end{itemize}
%            \item \textbf{Stability in iteration}
%            \begin{itemize}
%                \item As the density becomes more equalized, $t(x,y;d)$ approaches $t(x,y;d_0)$.
%                \item Mapping naturally converges toward identity.
%            \end{itemize}
%            \item \textbf{No collisions}
%            \begin{itemize}
%                \item Global, monotonic deformation prevents points from crossing paths.
%            \end{itemize}
%        \end{itemize}
%    \end{frame}


    \begin{frame}{Iterative Algorithm Overview}
        \begin{enumerate}
            \item Rasterize and smooth density
            \item Compute integral images
            \item Compute corrected deformation $t(x,y)$
            \item Apply bi-linear interpolation to sample positions
            \item Iterate until:
            \begin{itemize}
                \item Time budget reached
                \item Uniformity threshold reached
            \end{itemize}
        \end{enumerate}
    \end{frame}

    \begin{frame}
        \centering
        \begin{figure}
            \centering
            \begin{minipage}{0.4\textwidth}
                \centering
                \includegraphics[width=\textwidth]{rsc/2408.06513v1_page_7_1}

                \vspace{4pt}
                \footnotesize MNIST Dataset (UMAP)~\cite{Rave_2025}
            \end{minipage}
            \begin{minipage}{0.15\textwidth}
                \centering
                $\Longrightarrow$
            \end{minipage}
            \begin{minipage}{0.4\textwidth}
                \centering
                \includegraphics[width=\textwidth]{rsc/2408.06513v1_page_7_2}

                \vspace{4pt}
                \footnotesize Visual encoding of the density-equalizing transform (32 Iterations)~\cite{Rave_2025}
            \end{minipage}
            \label{fig:figure}
        \end{figure}
    \end{frame}

%----------------------------------------------------------------------------------------
%	SECTION 6: VISUAL ENCODING
%----------------------------------------------------------------------------------------

    \section{Visual Encoding of Deformation}

    \begin{frame}{Problem After Deformation}
        \begin{itemize}
            \item After equalization:
            \begin{itemize}
                \item Local densities lost
                \item Cluster shapes distorted
                \item Distances no longer meaningful
            \end{itemize}
            \item Need additional encodings to preserve structure
        \end{itemize}
    \end{frame}

    \begin{frame}{Three Proposed Encodings I}
        \begin{itemize}
            \item \textbf{Deformed grid lines}
            \begin{itemize}
                \item Show local expansion / contraction
            \end{itemize}
            \item \textbf{Background density texture}
            \begin{itemize}
                \item Shows cluster cores after deformation
            \end{itemize}
            \item \textbf{Contour lines}
            \begin{itemize}
                \item Reveal subcluster structure
            \end{itemize}
        \end{itemize}
    \end{frame}

    \begin{frame}{Three Proposed Encodings II}
        \centering
        \begin{figure}
            \centering
            \begin{minipage}{0.3\textwidth}
                \centering
                \includegraphics[width=\textwidth]{rsc/2408.06513v1_page_7_2}

                \vspace{4pt}
                \footnotesize Deformed grid lines~\cite{Rave_2025}
            \end{minipage}
            \begin{minipage}{0.3\textwidth}
                \centering
                \includegraphics[width=\textwidth]{rsc/2408.06513v1_page_7_3}

                \vspace{4pt}
                \footnotesize Background density texture~\cite{Rave_2025}
            \end{minipage}
            \begin{minipage}{0.3\textwidth}
                \centering
                \includegraphics[width=\textwidth]{rsc/2408.06513v1_page_7_4}

                \vspace{4pt}
                \footnotesize Contour lines~\cite{Rave_2025}
            \end{minipage}
            \label{fig:figure2}
        \end{figure}
    \end{frame}

    %----------------------------------------------------------------------------------------
%	SECTION 5: IMPLEMENTATION
%----------------------------------------------------------------------------------------

    \section{GPU Implementation}

    \begin{frame}{Efficient GPU Computation}
        \begin{itemize}
            \item All major steps implemented on GPU:
            \begin{itemize}
                \item Density accumulation $\rightarrow$ vertex + fragment shader
                \item Gaussian smoothing $\rightarrow$ 2 compute-shader passes
                \item Integral image computation $\rightarrow$ fragment shader
            \end{itemize}
            \item Achieves interactive rates for millions of samples
        \end{itemize}
    \end{frame}

%----------------------------------------------------------------------------------------
%	SECTION 7: RESULTS
%----------------------------------------------------------------------------------------

    \begin{frame}{Performance}
        \begin{itemize}
            \item Runs at interactive frame rates:
            \begin{itemize}
                \item e.g. 4M samples in $\approx 3$ ms per iteration
            \end{itemize}
            %\item Standard deviation of samples/bin decreases monotonically
            %\item Overplotting fraction also decreases monotonically
        \end{itemize}
        \centering
        \includegraphics[scale=0.4]{rsc/img}
    \end{frame}


    % ---  THE END

    \begin{frame}[focus]
        Thanks for your Attention!
    \end{frame}

%----------------------------------------------------------------------------------------
%	 CLOSING/SUPPLEMENTARY SLIDES
%----------------------------------------------------------------------------------------

    \appendix

    \section{Backup}\label{sec:backup}

    \begin{frame}{Example I}
        \centering
        \includegraphics[scale=0.1]{rsc/2408.06513v1_page_8_1}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Example II}
        \centering
        \includegraphics[scale=0.1]{rsc/2408.06513v1_page_8_2}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Example III}
        \centering
        \includegraphics[scale=0.1]{rsc/2408.06513v1_page_8_3}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Example IV}
        \centering
        \includegraphics[scale=0.1]{rsc/2408.06513v1_page_8_4}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Example V}
        \centering
        \includegraphics[scale=0.1]{rsc/2408.06513v1_page_8_5}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Example VI}
        \centering
        \includegraphics[scale=0.1]{rsc/2408.06513v1_page_8_6}\\
        \footnotesize\text{Source: \cite{Rave_2025}}
    \end{frame}

    \begin{frame}{Sources}
        \nocite{*} % Display all references regardless of if they were cited
        \bibliography{sources}
        \bibliographystyle{plain}
    \end{frame}
\end{document}
