# A Large Visual, Qualitative and Quantitative Dataset of Web Pages

Christian Mejia-Escobar
Central University of Ecuador
P.O. Box 17-03-100
Quito, Ecuador
<EMAIL_ADDRESS>
Miguel Cazorla
Institute for Computer Research
University of Alicante
P.O. Box 99. 03080, Spain
<EMAIL_ADDRESS>
Ester Martinez-Martin
Institute for Computer Research
University of Alicante
P.O. Box 99. 03080, Spain
<EMAIL_ADDRESS>

###### Abstract

The World Wide Web is not only one of the most important platforms of
communication and information at present, but also an area of growing interest
for scientific research. This motivates a lot of work and projects that
require large amounts of data. However, there is no dataset that integrates
the parameters and visual appearance of Web pages, because its collection is a
costly task in terms of time and effort. With the support of various computer
tools and programming scripts, we have created a large dataset of 49,438 Web
pages. It consists of visual, textual and numerical data types, includes all
countries worldwide, and considers a broad range of topics such as art,
entertainment, economy, business, education, government, news, media, science,
and environment, covering different cultural characteristics and varied design
preferences. In this paper, we describe the process of collecting, debugging
and publishing the final product, which is freely available. To demonstrate
the usefulness of our dataset, we expose a binary classification model for
detecting error Web pages, and a multi-class Web subject-based categorization,
both problems using convolutional neural networks.

_Keywords_ Convolutional neural networks $\cdot$ dataset $\cdot$ webshots
$\cdot$ deep learning $\cdot$ Web categorization

##  1 Introduction

Imagining today’s world without the Internet is difficult since human
activities such as commerce, education, entertainment, social interaction, and
many more have their digital version. It is the tool that has allowed much of
these activities to take place despite the paralysis caused by the recent
pandemic. Internet is commonly associated with the Web, both terms are
intimately related but are very different concepts. The first one refers to
the big network of networks, i.e., the infrastructure, whereas the second one
refers to the content, formed by Web sites, which are a collection of Web
pages on a specific topic and linked to each other [1].

Since its invention in the 1990s, the World Wide Web, or just Web, has
revolutionized access to large amounts of data and information for individuals
and organizations in all areas. Factors such as ease of use (user-friendly
interface), popularity, and increasing connectivity have made the Web a field
of interest for the business sector and scientific research. Among the main
domains of development are the following:

  * •

Web design and redesign: identification of metrics and guidelines to support
the work of beginners and experts.

  * •

Analysis of aesthetics and quality of Web pages.

  * •

Optimization and improvement of the indexing of Web pages by search engines as
Google and Bing [2].

  * •

Categorization Web: classifiers and recommenders systems, Web directories and
crawlers [3].

  * •

Security: detection of illegitimate Web sites (phishing).

  * •

Accessibility without limitations, regardless of knowledge, skills and
technology.

  * •

Programming: automatic code generation.

  * •

Machine Learning and Artificial Intelligence projects.

  * •

Challenges of performance of algorithms and competitions of the best Web
sites.

All of the above topics demand an essential resource: a large amount of data
for analysis and testing tasks. Currently there is no large Web-related
dataset that includes both visual representation and attributes of Web pages.
Therefore, we make the following contributions:

  * •

A free and available dataset of 49,438 Web pages from all countries worldwide
and classified in the following topics: arts and entertainment, business and
economy, education, government, news and media, and science and environment.
The dataset combines different types of data: images, text, and numbers, which
represent the visual aspect of the full Web page (webshot), and qualitative
and quantitative attributes, respectively.

  * •

A workflow supported by programming languages and computer tools to automatize
most of the process of collecting, organizing, and debugging links, webshots,
and parameter extraction. This methodology can be adapted to other problems
where the acquisition of a lot of data is needed.

  * •

A deep convolutional neural network to detect error Web pages using only their
screenshots. This allowed us to debug our image dataset after the HTML code is
no longer available. It can also be useful in other situations, e.g. for the
job of crawlers, indexers and search engines by skipping analysis of HTML
content, or webmasters could be notified of problems and hacking through
periodic screenshots.

The rest of this paper is organized as follows: a review of similar works; a
description of our dataset and the methodology used for its creation,
debugging, and publication; a statistical analysis of the Web page parameters;
and a case study on Web categorization to demonstrate the practical use of the
dataset presented here.

##  2 Related work

The availability of a large amount of data is the current need for research
and development in areas related to the Web. We have generated an extensive
dataset of Web pages, including features of various types: text, numbers, and
images. First, we reviewed the literature and analyzed the existing datasets,
whose main properties are in Table 1.

Table 1: State-of-the-art datasets. Owner & year | Size | Topic | Data type | Purpose
---|---|---|---|---
| De Boer
---
et al., 2011
| Small:
---
60 screenshots
| News, hotels,
---
conferences, and
celebrities
| Images
---
database
| Aesthetics and thematic
---
classification with
Machine Learning
| Reinecke
---
et al., 2014
| Small:
---
430 screenshots
Generic |  | Images
---
database
| Aesthetics
---
classification
| López
---
et al., 2017
| Small:
---
280 Web pages
| Food, animals,
---
fashion, nature,
home and vehicles
| URL and
---
images extracted
from HTML
| Thematic
---
classification with
Machine Learning
| López
---
et al., 2019
| Small:
---
365 Web pages
| Food, vehicles,
---
animals, fashion,
home design and
landscape
| URL and
---
images extracted
from HTML
| Thematic
---
classification with
Machine Learning
| CIRCL, 2019
---
| Small:
---
460 screenshots
Phishing |  | Images
---
database
| Analysis of
---
security events
| ImageNet, 2009
---
| Large:
---
1840 screenshots
| Generic
---
| Images
---
database
| Resource for
---
image and vision
research field
| Nordhoff
---
et al., 2018
| Large:
---
80901 screenshots
Generic |  | URL,
---
metrics
and images
| Aesthetics and
---
Web design
| CIRCL, 2019
---
| Large:
---
37500 screenshots
| Onion Website
---
(Hidden Web,
no indexed)
| Images
---
database
| Analysis of
---
security events
| University of
---
Alicante, 2019
| Large:
---
8950 labeled
screenshots
| Good and
---
bad design
| Labeled
---
images
dataset
| Aesthetics Web
---
categorization

For ease of comparison, we have divided the state-of-the-art datasets into two
groups according to size: small (less than 1000 instances) and large. Other
relevant properties are the topic, data types, its owner, purpose, and
availability.

DeBoer _et al._ [1] use a tiny dataset, only visual and collected for
categorization within four classes (news, hotels, conferences, and
celebrities). These categories are quite different from each other, so the
categorization problem is of less complexity. There is no link to download the
screenshots.

Lopez _et al._ [7] and [9] have datasets with more Web pages, including their
respective images and links (URLs). However, these images are not screenshots
but elements of the Web page. The URL is used to download the images from HTML
code and analyze them for categorization. Although there are more categories
than in the previous work, they are still very different topics. In both
cases, no download link.

Reinecke _et al._ [6] is the most relevant dataset among the smaller ones. It
could be a useful resource for small-scale research and development works. It
covers several countries in the world, various topics and is available for
download. However, it is strictly visual and insufficient for current needs,
and its purpose is more oriented to aesthetics analysis and classification.

The Computer Incident Response Center Luxembourg (CIRCL) is a government
initiative created to respond to computer security threats and incidents.
CIRCL [10] offers a dataset of more than 400 screenshots of verified or
potential phishing Web sites. Also, an extensive dataset with more than 37000
images is available [11], corresponding to screenshots of Web sites belonging
to the Dark-Web, the problematic facet of the Web associated with cybercrime,
hate, and extremism [15]. Both datasets can be easily downloaded; however,
because the images represent fakes or hidden Web pages would have limited
applications.

ImageNet [5], the most popular of the image databases, includes millions of
images organized according to the WordNet hierarchy111A large lexical database
of English. Nouns, verbs, adjectives and adverbs are grouped into sets of
cognitive synonyms (synsets). (https://wordnet.princeton.edu). The Web sites
section has 1840 screenshots from different countries and languages without
categorization. Some screenshots appear cropped, and download requires
registration and authorization.

The dataset created by the University of Alicante [12] collects 8950
screenshots of Web pages for analysis and evaluation of the quality of Web
design. Half of the images come from the Awwwards site
(https://www.awwwards.com), so they have been labeled with "good design",
whereas the other half extracted from yellow pages, labeled with "bad design".
This dataset serves the academic work of the institution.

Nordhoff _et al._ [8] stands out because it has achieved a larger number of
Web pages. However, they come from only 44 countries, the parameters are
purely aesthetics, and the image download is not direct. In contrast, our
dataset takes into account all countries worldwide, includes parameters
related to Web page structure, is general-purpose, and available for download.

According to the above, it is not possible to take advantage of existing data
sources, so our purpose is to create from scratch an extensive and available
dataset. It incorporates the visual representation of the Web page through a
webshot, complemented with qualitative and quantitative parameters extracted
from the underlying HTML source code, so that a Web page is better
characterized. Because manual data collection is a complex task and requires
too much time and human effort, we have automatized most of the process by
writing several programs in Python and R.

##  3 Description of the dataset

The dataset has been designed to combine visual, textual and numerical
elements, which are presented in Table 2 and detailed below.

Table 2: Structure of the dataset. Element | Type | Description
---|---|---
Webshot | Visual | Web page entire screenshot in JPG format
Name | Text | Identification given to the webshot
URL | Text | Link to locate and display a Web page
Country | Qualitative | National origin of Web page
Continent | Region grouping countries
Category | Main thematic of Web page
Time | Quantitative | Web page’s source code download time
Bytes | Size in bytes of Web page’s source code
Images | Number of images from Web page
Script_files | Number of executable files of Web page
CSS_files | Number of files to layout a Web page
Tables | Number of table tags in the source code
iframes | Number of iframe tags in the source code
Style_tags | Number of style tags in the source code
Img_bytes | Webshot size in bytes
Img_width | Webshot width in pixels
Img_height | Webshot height in pixels

A webshot is a digital image of the entire Web page; unlike a screenshot,
which may appear cropped because its dimensions exceed the viewing device,
forcing the user to scroll. The name given to the webshot is a key element
that follows a convention to identify the Web page’s source, category, and
country. It is also the link between the image and the qualitative and
quantitative parameters. A URL (Uniform Resource Locator) is the Web page’s
address together the recovery mechanism (http / https). It is placed in the
address bar of the browsers, which are the programs to display the content to
the user. We have collected URLs worldwide to cover different cultural
characteristics and preferences, so the dataset includes attributes related to
the geographic location such as country and continent. The Web pages collected
belong to the following categories: Arts and Entertainment, Business and
Economy, Education, Government, News and Media, and Science and Environment.
We have considered these categories since they are part of the Web directory
used here and explained in section 4.1.2.

We have added the following quantitative parameters, which give us an overview
of the structure and quality of a Web page:

  * •

Download time: users want to wait as little as possible to view a Web page
[13], which means reducing the source code download time.

  * •

Size: the larger the size in bytes, the slower the download and display of the
Web page.

  * •

Images: the images will increase the download time. A Web page is not more
attractive because it has more images, a balance between all types of
information is recommendable.

  * •

Scripts: they are external files to get more complex functionality to the Web
page. It is convenient to reduce their quantity because they increase the
network traffic and download time.

  * •

CSS files: style files cause an extra load and delay the display of the Web
page, ideally there should be one.

  * •

Tables: are often used to structure the Web page’s content; however, it is
discouraged due to appropriate elements such as "div" tags.

  * •

iFrames: insert a Web page inside another one, which is not a good practice
currently.

  * •

Style tags: are not recommended since there are CSS files.

Finally, we have the image size in bytes, as well as the dimensions (width and
height) in pixels of each webshot. Fig. 1 presents a small sample of the
dataset showing a case of each category.

Figure 1:  A small sample of the dataset, including one example of each
category.

##  4 Methodology

The workflow developed to produce the dataset is represented in Fig. 2.
Following, we describe each stage included in the methodology, supported by
various techniques, procedures, and computer tools.

Figure 2:  Methodology created to obtain the Web pages dataset.

###  4.1 Data Acquisition

The first step is to collect URLs worldwide related to the given categories.
Then, each of the URLs will allow us to download the HTML code, extract
quantitative and qualitative parameters by scraping, and take a screenshot of
the entire Web page (webshot).

In order to obtain a larger number of URLs, we have used two ways of finding
information on the Web: "Searching" and "Browsing". Searching requires the
user to translate a need for information into queries, whereas Browsing is a
basic and natural human activity, occurring in an information environment
where information objects are visible and organized [14]. Below, we describe
in detail how both techniques allowed us to collect URLs, and based on them,
extract parameters and capture webshots, all through various Python and R
scripts.

####  4.1.1 URL collection by Searching

The Google search engine asks for words or phrases related to the topic of
interest. To avoid the repetitive task of typing the query into the Google
search page and manually retrieving the response URLs, we have automatized the
process through a Python script222https://osf.io/k6yrx, where:

  1. 1.

The country name and its Internet code are extracted iteratively from a plain
text file333https://osf.io/yrmx8.

  2. 2.

The search query has the following structure:

’site:’ + countrycode \+ ’ business OR economy OR marketing OR computers OR
internet OR construction OR financial OR industry OR shopping OR restaurant’ +
’ ext:html’

OR, site and ext are operators or reserved words that can be used in query
phrases within the Google search engine. The "OR" operator concatenates
several search words related to the category. The "site" operator specifies
the geographic top-level Internet domain assigned for each country, e.g. ".es"
for Spain. The "ext:html" operator allows us to obtain results exclusively
with this extension.

  3. 3.

The request returns the Google results page with the first 100 links. We have
defined it like this to achieve an approximately uniform distribution of Web
pages according to country and category.

  4. 4.

Web page links are extracted by automatically scanning the source code of the
results page (scraping), generating a text file that contains the URLs and
their attributes: country, continent and category.

For the rest of the categories, the query phrases are:

’site:’ + countrycode \+ ’ arts OR entertainment OR dance OR museums OR
theatre OR literature OR artists OR galleries’ + ’ ext:html’

’site:’ + countrycode \+ ’ education OR academy OR university OR college OR
school’ + ’ ext:html’

’site:’ + countrycode \+ ’ government OR military OR presidency ’ + ’
ext:html’

’site:’ + countrycode \+ ’ news OR media OR magazine OR radio OR television OR
newspaper ’ + ’ ext:html’

’site:’ + countrycode \+ ’ science OR environment OR archaeology’ + ’
ext:html’

####  4.1.2 URL collection by Browsing

This technique uses a Web Directory, a specialized Web site consisting of a
catalog of links to other Web sites. Build, maintain, and organization by
categories and subcategories is done by human experts, unlike search engines
that do it automatically. To include a URL, specialists perform a review,
analysis, and evaluation process to verify the requirements determined by the
Web Directory.

Today a few Web Directories have survived the popularity of search engines
like Google. We can highlight Best of the Web (BOTW) (Fig. 3), one of the most
recognized by its quality, global reach, a wide range of categories and
subcategories, level of traffic (visits per month), reliability, the number of
links, and demanding requirements.

Figure 3:  BOTW Web Directory (https://botw.org/)

Instead of a query or search phrase, it is necessary to know the hierarchical
structure of the directories and subdirectories until the URL of interest. We
have taken advantage of the organization by countries and categories defined
by BOTW Web Directory, e.g. for Greece:

    https://botw.org/top/Regional/Europe/Greece/Arts-and-Entertainment/
    https://botw.org/top/Regional/Europe/Greece/Business-and-Economy/
    https://botw.org/top/Regional/Europe/Greece/Education/
    https://botw.org/top/Regional/Europe/Greece/Government/
    https://botw.org/top/Regional/Europe/Greece/News-and-Media/
    https://botw.org/top/Regional/Europe/Greece/Science-and-Environment/

We collect the URLs published within each category through a Python
script444https://osf.io/73sc2 that:

  1. 1.

Reads iteratively the name of each country from a flat text
file555https://osf.io/ve986.

  2. 2.

Sets the path corresponding to the category, which will always have the same
structure, only the country’s name changes:
’https://botw.org/top/Regional/’ + countryname \+ ’/Science_and_Environment/’

  3. 3.

A connection to the formed Web address is realized, which obtains the source
code of the results page to extract the URLs of each category.

  4. 4.

The links are stored in a text file666https://osf.io/hjwgm that can be opened
in a spreadsheet where a filter is applied to select only those links
belonging to a country in particular.

####  4.1.3 Parameters collection by Scraping

After collecting and storing the URLs from the two sources described above, we
implemented a Python script777https://osf.io/de78f to: a) sequentially read
the URL links stored in the text file888https://osf.io/gk3p2; b) make a
connection via browser to each of these links; and c) download and analyze the
source code of the Web page, obtaining the parameters specified in the
dataset: download time in seconds, total size in bytes, number of images,
script files, CSS files, tables, iFrames tags, and style tags. This script
includes the library for Web scraping named Beautiful Soup, which allows us to
define and extract the mentioned parameters from the HTML code of each Web
page.

####  4.1.4 Webshots collection

We take advantage of Webshot and PhantomJS packages to create a R
script999https://osf.io/6pmyb that: reads each URL from text files generated
in sections 4.1.1 and 4.1.2, takes a snapshot of the entire Web page, and
saves it as JPG image.

The name assigned to the image is an unique identifier that allows us to know
the source, category, and country to which the Web page belongs, e.g.
B2Netherlands_791.jpg indicates a screenshot of a Web page obtained through
the technique of Browsing, belonging to category number two (Business and
Economy) and that it comes from the Netherlands. The number after the
underscore only establishes a sequential order. Note that such identifier is
the key to attach the webshots to their respective qualitative and
quantitative parameters. In this way, it was possible to link two different
storage media, i.e. a parameters datasheet and an images folder.

Additionally, this script includes functions to obtain both webshot size in
bytes and webshot dimensions (width and height) in pixels, so we get a better
characterization of the Web page. All images are available for viewing and
downloading101010https://osf.io/7ghd2/?view_only=0bf99589809e4e88b0aa0602c8060b46.

###  4.2 Dataset debugging

During the automatic data collection, some events did not allow downloading
the HTML code or capturing the webshot, caused by: request for manual
acceptance of cookies and SSL certificates, error messages as HTTP 403
Forbidden, HTTP 404 Not Found, HTTP 406 Not Acceptable, HTTP 909 Denied
permission, and exceed timeout.

We used exception handling inside the scripts to avoid interruptions during
the execution of the programs. When an error occurred, the fields associated
with the parameters or webshot were assigned the value "-1". Thus, the
programs could continue their execution, and the inexistence of webshots or
parameters was solved.

For the final dataset, we have considered only URLs that have their respective
webshot, as this is the most relevant element of our work. However, after a
brief visual review of the webshots in the dataset, several error Web pages
were detected, e.g. Web sites under construction, maintenance, domain offer,
suspended account, page not found, browser incompatibility, virus or phishing
risks. Some of them shown in Fig. 4.

Figure 4:  A sample of the error Web pages.

The webshots above are not useful for the dataset, so we decided to select and
remove these images that appeared in the automatic collection. Although the
size of the final dataset will be smaller, we will obtain a cleaner dataset.
Given that the URLs connections corresponding to these webshots did not return
HTTP 403 or HTTP 404 error messages, nor did the HTML code contain phrases
like "suspended account" or "page under construction", text analysis was not
possible. We need implement an image analyzer to avoid manual and visual
verification of thousands of webshots, which consumes too much time and
effort. We used a Convolutional Neural Network (CNN), the state-of-the-art
tool in computer vision, to detect error Web pages, and then separate them
into a dedicated folder, all automatically.

Here we present an automatic detection of error Web pages based exclusively on
their webshots. It consists of determining if a Web page belongs to a "VALID"
category or, by the contrary, to an "ERROR" category, i.e. a binary
classification problem. To tackle it, we followed the methodology shown in
Fig. 5.

Figure 5:  Methodology for detecting error Web pages.

####  4.2.1 Data selection

The main resource for automatic learning is data. In our case, images that
will be the input for a training process that tries, iteratively, to obtain a
known output ("valid" or "error"), and if an acceptable accuracy is reached,
to make predictions.

The training process requires images associated with their respective
category: valid or error. Since our dataset consists of two groups of images
(Browsing and Searching), we selected the webshots of the smallest subset
(Browsing) to perform an exhaustive visual inspection and classify the images
manually, obtaining the results shown in Table 3. Once the neural network
model is adjusted, it will classify each webshot in the largest subset
(Searching) as valid or error.

Table 3: Dataset for binary classification (Browsing webshots).

| Browsing
---|---
Category | Webshots | Valid | Error
Arts & Entertainment | 447 | 397 | 50
Business & Economy | 1058 | 892 | 166
Education | 419 | 368 | 51
Government | 730 | 669 | 61
News & Media | 458 | 394 | 64
Science & Environment | 497 | 462 | 35
Total | 3609 | 3182 | 427

The dataset for training an error Web pages detection model has a total of
3609 images, 427 error webshots and 3182 valid webshots, which have been
uploaded to Google Drive in separated folders, called "VALID" and "ERROR"
(Fig. 6).

Figure 6:  Directory structure of the dataset.

We take advantage of Google Colaboratory, a free platform that offers powerful
hardware and requires no installation or setup, supports Python through an
online notebook, and includes the packages and libraries to facilitate
automatic learning such as Tensorflow, Keras, Sklearn, and others. Next, a
description of the developed
code111111https://colab.research.google.com/drive/1mzmm0C-WDNopOlEtRm7VVA6_8eHuYoVH?usp=sharing.

The initial step is the connection to the data source where the images of our
dataset have been stored within folders and subfolders, named as the
categories (Fig. 6). Such denomination facilitates the labeling of the images
with their corresponding category. A pair of instructions are needed to access
Google Drive:

    from google.colab import drive
    drive.mount(’/content/drive’)

####  4.2.2 Split data

One of the tasks that characterizes automatic learning is the division of the
data. Because we have only 3609 images, we consider two subsets: training and
validation (Table 4). The training subset contains the largest amount of
images (80%) and is used for learning and fitting the model’s parameters,
whereas the validation subset (20%) is used to evaluate the capacity of the
model, which will serve to adjust its hyperparameters.

Table 4: Dataset split for training and validation.

Subset | Webshots | Valid | Error | Percentage
---|---|---|---|---
Training | 2886 | 2545 | 341 | 80%
Validation | 723 | 637 | 86 | 20%
Total | 3609 | 3182 | 427 | 100%

Although the most convenient is a balanced dataset, that is, an equal number
of error cases and valid cases, we used all the images in order to obtain a
better generalization. To automatically divide into training and validation
folders, is useful to install and import the split-
folders121212https://pypi.org/project/split-folders/ package. It is necessary
to specify the images directory, output directory, and the proportion to split
(80% and 20%, respectively).

    splitfolders.ratio(’/content/drive/My Drive/DATASET’,
        output=’/content/drive/My Drive/SPLIT’, seed=1337,
        ratio=(.8,.2), group_prefix=None)

The result is a new directory structure. Within the "SPLIT" folder, the
"train" and "val" folders are created, and within each of these, the "ERROR"
and "VALID" folders.

####  4.2.3 Data pre-processing

The images need to be prepared before modeling. First, we normalize the pixel
values (integers between 0 and 255) to a scale between 0 and 1, using an image
processing utility. The ImageDataGenerator class from Keras framework divides
all pixels values by the maximum pixel value (255).

    train_datagen = ImageDataGenerator(rescale=1./255)

Second, the images have different dimensions (width and height), so they are
all resized to 256x256 pixels by setting the target_size parameter of the
flow_from_directory method. This operation is performed in groups of 32 images
(batch_size) that are labeled for binary classification (class_mode) according
to the folder where they are stored (valid and error) within of training
directory.

    train_generator = train_datagen.flow_from_directory(
        train_data_dir,
        target_size=(256,256),
        batch_size=32,
        shuffle=False,
        class_mode=’binary’)

In this way, the small values of both pixels and dimensions help speed up the
training process. The above code applies to the validation data, only the
directory changes.

####  4.2.4 Create model

The model’s architecture is based on the convolutional neural network proposed
by Liu _et al._ [16] to detect malicious Web sites. Since this is a similar
problem, we just applied minor adaptations. The model’s structure (Fig. 7) is
composed of two parts:

Figure 7:  CNN architecture.

  * •

Convolutional basis: for automatic extraction of features. The input image is
resized to 256x256 pixels and separated into 3 RGB color channels (Red, Green,
Blue). Then, it is processed by 3 convolutional layers with their respective
activation functions (ReLU, Rectified Linear Unit) and max-pooling layers. The
first two convolutions use 32 filters (kernels) while the third convolution
has 64, with a size of 3x3, in contrast to the pool size is 2x2.

  * •

Binary classifier: features are received in a flattened form by a fully
connected layer that applies dropout to avoid overfitting. The sigmoid
function generates the prediction as a probability value between 0 and 1. If
the value is greater than 0.5, the Web page is valid, otherwise, an error Web
page.

Keras provides functions to implement this model from scratch in a simple way,
just adding in sequence the convolutional, activation, pooling, dropout,
flatten, and dense layers, and specifying their respective parameters. For
example, the first convolutional block has the following instructions:

    model = Sequential()
    model.add(Conv2D(32, (3, 3), input_shape=(256, 256, 3)))
    model.add(Activation(’relu’))
    model.add(MaxPooling2D(pool_size=(2, 2)))

Meanwhile, the classifier part:

    model.add(Flatten())
    model.add(Dense(64))
    model.add(Activation(’relu’))
    model.add(Dropout(0.5))
    model.add(Dense(1))
    model.add(Activation(’sigmoid’))

Finally, the model.summary() instruction allows us to verify the structure in
detail (Fig. 8).

Figure 8:  Model’s layers summary.

####  4.2.5 Train and fit model

Before starting the training, we must explicitly define the hyperparameters
required by the neural network for binary classification.

    model.compile(loss=’binary_crossentropy’,
        optimizer=’rmsprop’, metrics=[’acc’])

Through Keras, we can establish the loss function that will be minimized by
the optimization algorithm and the classification accuracy as the metric that
will be collected and reported by the model.

    history = model.fit(
        train_generator,
        steps_per_epoch=train_samples // batch_size,
        epochs=epochs,
        validation_data=val_generator,
        validation_steps=validation_samples // batch_size,
        callbacks=[checkpoint])

After a few hours of computation, 20 iterations (epochs) of the training
dataset (2886 images) have been executed; each iteration consists of 90 groups
(steps_per_epoch) of 32 images (batch_size). The accuracy achieved is 96.6%
(iteration 20), while in the validation stage the accuracy is 97.16%
(iteration 16). The evolution of the process is summarized in the graphs of
the training and validation curves (Fig. 9).

Figure 9:  Accuracy and loss in training and validation phases.

The training and validation phases have reached a high level of accuracy, both
progressing to the same level, which is desirable. The model fits very well
with the images provided, but how it will behave with new images
(generalization). This concern is answered by analyzing the difference between
training and validation losses. The last one, despite oscillating, does not
separate so much from the other one until iteration 17, after which, they
start to separate, with the possibility of overfitting. Therefore, the model
is saved with the accuracy and parameters of iteration number 16. We can say
that the model is capable of acceptably distinguishing error Web pages and
valid Web pages and thereby move to the prediction phase.

####  4.2.6 Predictions

The images from the largest set (Searching) of our dataset become the input of
the already trained and validated model. We used google.colab library to
select and upload from local drive the file (webshot) with click on “Choose
Files” button.

    from google.colab import files
    uploaded = files.upload()

Once the file to be 100% uploaded, it will be pre-processed using
keras.preprocessing and NumPy libraries to transform the image into an array
with a suitable shape and normalized pixel values for the model, which makes
the prediction.

     img = image.load_img(path, target_size=(256, 256))
     x = image.img_to_array(img)/255.
     x = np.expand_dims(x, axis=0)
     images = np.vstack([x])
     classes = model.predict(images)

Fig. 10 shows the result for two images selected one at a time. The resized
webshot is displayed and the prediction is a probability value between 0 and
1, less than 0.5, so the category assigned is ERROR (left side), and a case of
a valid Web page, with a probability value very close to 1 (right side).

Figure 10:  Prediction of error and valid Web page.

In addition to making predictions one by one, more important for our purpose
is to generate predictions for groups of images. We just select a list of
files using the choose button. As our dataset is organized by topic
categories, we can select all images in one category, e.g. "Arts and
Entertainment". An extract of the results is shown in Fig. 11.

Figure 11:  Prediction for a group of Web pages.

This list of predictions is passed to a spreadsheet, then by means of a
filter, the Web pages of the error category are selected and saved as a text
format file (list.txt). This file is the input to execute a command that moves
all images from their original folder to the "ERROR" folder. This command-line
runs in Windows (PowerShell interface), although it is easily adaptable to
different operating systems such as Linux.

    cat list.txt | ForEach {mv $_ ERROR}

As result of the prediction, 822 error Web pages y 7747 valid Web pages. Once
the images were classified and separated, the visual verification was much
faster, and we were able to manually establish the successes and fails of the
classifier. Thus we identified 1214 real error Web pages and 7355 real valid
Web pages. The same procedure is carried out for the remaining images in the
other categories. The results are summarized in Table 5.

Table 5: Results of the binary Web categorization.

| Searching
---|---
Category | Webshots |  | Valid
---
(Prediction)
| Error
---
(Prediction)
| Valid
---
(Real)
| Error
---
(Real)
Accuracy
| Arts &
---
Entertainment
8569 | 7747 | 822 | 7355 | 1214 | 94.68%
| Business &
---
Economy
8699 | 8004 | 695 | 7546 | 1153 | 93.79%
Education | 8742 | 8083 | 659 | 7524 | 1218 | 92.80%
Government | 8088 | 7363 | 725 | 6685 | 1403 | 90.85%
| News &
---
Media
11574 | 10597 | 977 | 9650 | 1924 | 90.80%
| Science &
---
Environment
8893 | 8137 | 756 | 7496 | 1397 | 92.34%
Total | 54565 | 49931 | 4634 | 46256 | 8309 | 92.47%

We used the Confusion Matrix to evaluate and know how accurate our model is.
This table enables us to compare reality and prediction, and based on the
successes and fails, calculates an accuracy value. E.g. for "Arts and
Entertainment" category, the classifier predicted 822 error Web pages,
however, it failed in 32 instances. There were 7747 predictions of valid Web
page, but 424 were incorrect. These values are placed in Table 6 and
substituted into the formula for accuracy.

Table 6: Confusion Matrix for the "Arts and Entertainment" category. |  | Prediction
---|---|---
|  | Error | Valid
| Error | 790 | 424
Real | Valid | 32 | 7323

$Accuracy=\frac{790+7323}{790+32+424+7393}=0.9468\times 100\%=94.68\%$

The classifier reached an accuracy of 94.68% for this category, which is good
considering the small number of images that were part of the training process.
Table 7 shows the respective confusion matrix for each category and a total
matrix indicating an accuracy of 92.47% for the entire Searching dataset.

Table 7: Confusion matrix for the rest of categories and overall result.

Business and Economy

|  | Prediction
---|---|---
|  | Error | Valid
| Error | 654 | 499
Real | Valid | 41 | 7505

Education

|  | Prediction
---|---|---
|  | Error | Valid
| Error | 624 | 594
Real | Valid | 35 | 7489

Government

|  | Prediction
---|---|---
|  | Error | Valid
| Error | 694 | 709
Real | Valid | 31 | 6654

News and Media

|  | Prediction
---|---|---
|  | Error | Valid
| Error | 918 | 1006
Real | Valid | 59 | 9591

Science and Environment

|  | Prediction
---|---|---
|  | Error | Valid
| Error | 736 | 661
Real | Valid | 20 | 7476

Overall

|  | Prediction
---|---|---
|  | Error | Valid
| Error | 4416 | 3893
Real | Valid | 218 | 46038

After running the automatic error Web pages detection, the debugging is
complete. The composition and final size of our dataset is shown in Table 8.
Combining Browsing and Searching techniques, we have achieved to collect 49438
valid Web pages that occupy approx. 17 GB.

Table 8: Composition and size of the final dataset. Category |  | Browsing
---
Webshots
| Searching
---
Webshots
Total
Arts & Entertainment | 397 (147 MB) | 7355 (2.58 GB) | 7752
Business & Economy | 892 (300 MB) | 7546 (2.48 GB) | 8438
Education | 368 (126 MB) | 7524 (2.64 GB) | 7892
Government | 669 (253 MB) | 6685 (2.47 GB) | 7354
News & Media | 394 (237 MB) | 9650 (3.19 GB) | 10044
Science & Environment | 462 (193 MB) | 7496 (2.63 GB) | 7958
Total |  3182 (1.22 GB) |  46256 (15.99 GB) | 49438

###  4.3 Publication of the dataset

All products generated in this work are public and available through
OSF131313https://osf.io/ (Open Science Foundation), a free and open platform
to support, disseminate and enable collaboration of scientific research. The
OSF Web site offers a user-friendly interface to manage everything related to
the project, as shown in Fig. 12.

Figure 12:  Web Pages Dataset Project in OSF.

The hierarchical organization of the project consists of: a) the dataset
divided in the visual part (images in categories), and the textual and
numerical part (datasheets); b) the code developed; and c) support
documentation. The project is public141414https://osf.io/7ghd2/ and their
resources can be selected and viewed within the same page and downloaded
through the button on the top bar.

##  5 Statistical analysis

Both sources of the Web pages: Browsing and Searching, are compared through a
statistical study supported by the R programming language. Before, we should
note that the calculation of statistical indicators and creation of graphs
excluded outliers due to the high heterogeneity of the variables included in
Table 2. These values are far from those considered common and may cause
distortions in mathematical and visual analysis. By using the well-known rule
"1.5 times the Interquartile Range", outliers can be identified and omitted.
For this reason, the number of values of each of the variables may differ.

###  5.1 Qualitative parameters

Although we tried to obtain an uniformly distributed set of URLs with respect
to the categories, the errors cited in the debugging section, caused the
results shown in Fig. 13a. In Searching, there is less imbalance, in contrast
to Browsing, where Web pages related to business, economy and government
predominate, possibly due to a greater need for dissemination and economic
capacity to register their Web pages in a paid service.

(a)

(b)

Figure 13: Distribution of the qualitative parameters about Web pages: a)
category and b) continent.

The geographical location of the Web pages is mostly in Europe and Asia, both
for Browsing and Searching. Such continents agglomerate a larger number of
countries. Moreover, the economic potential could explain why they are at the
top. (Fig. 13b).

###  5.2 Quantitative parameters

The variability of Searching is more evident for the number of characters in a
URL (Fig. 14a), since a wider range (the difference between the minimum and
maximum) and a higher mean and standard deviation. In both graphs, the values
accumulate more at the bottom of the variable and are less frequent at the
top, so there is a tail to the right. This behavior is desirable when reading
or typing a URL in a browser, and is an indicator that there are not too many
levels to reach a particular Web page.

The download time of the source code of the Web pages shown in Fig. 14b has a
similar behavior for Browsing and Searching. In both cases, although there is
considerable variability due to the width of the range and standard deviation,
the values are around 20 milliseconds and mostly low, which is a benefit for
the user who wants to view the Web page in the shortest time possible.
According to the errors cited in the debugging section, 254 of 3182 URLs
belonging to Browsing were not available, i.e. 7.98%; while in Searching, 4079
of 46256, i.e. 8.82%, were not accessible to download the source code, and
hence the extraction of the quantitative parameters was not possible.

The behavior of the size in bytes (Fig. 14c) is almost identical between
Browsing and Searching, where the average of the Web pages is approximately 50
KB. Both the variability and the tails of the distributions are practically
the same, being favorable for a quick view of the Web page, which is in direct
relation to a small size. Although there are still Web pages with a
considerable size, which may be due to graphic elements or external objects
linked to page.

In Fig. 14d, close to 60% of Web pages do not include images within their
source code. It seems that the pages present textual information exclusively.
However, they might include images through CSS style files, which is a good
practice [13]. Although the range of number of images is wide, the average is
low, 2 or 3 images per Web page, so there is a tendency to use a few images
within a Web page in order to make it lighter.

Non-scripted Web pages exceed 50% in both cases. Scripts are add-on programs
that provide additional functions to Web pages. However, their use may cause
incompatibilities with browsers and make the page more complex and heavy. In
Fig. 14e, the trend is to minimize the presence of scripts, 3 scripts per Web
page on average.

Fig. 14f shows that approximately 50% of the Web pages do not use Cascading
Style Sheets (CSS) files, whose use is recommended as a good practice in Web
design. The ideal amount would be one style file per Web page. The average for
Browsing and Searching is 5 and 4, respectively, not too far away. The
tendency is towards low values, but there are some cases with many style
files, being prejudicial to the agile display of the Web page.

The graphs in Fig. 14g have a very similar aspect. The majority of Web pages
(about 85%) no longer use tables within the source code. Tables were generally
used to structure the content; however, this practice has been replaced with
the "div" tag, achieving a more elegant and professional design.

Over 85% of Web pages do not use iFrames. For Browsing and Searching, the bars
in the graph are grouped on the left (Fig. 14h). We can deduce that the
embedding of another document in the current HTML document through the
"iFrame" tag is disappearing, as there are now better options.

More than half of the Web pages (close to 60%) no longer use "style" tags in
their source code. Both graphs in Fig. 14i have bars that decrease towards the
right. The trend is to minimize the number of such tags, as it is more
appropriate to use CSS files. Thus, the source code of a Web page does not
extend too much.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(j)

(k)

(l)

Figure 14: Distribution of the quantitative parameters about Web pages

The webshot size is decisive in determining how much space our dataset will
consume on a storage device. In Fig. 14j, the size fluctuates over a wide
range of values, with an average of about 300 KB. Most of the values are
concentrated in low sizes, but with a considerable presence of images with
medium and high size. This behavior would require not only a good amount of
space but a pre-processing of the images for Machine Learning and Deep
Learning applications.

The Searching and Browsing graphs are quite similar for the webshot width
(Fig. 14k). In both cases, the first bar, where the minimum is, significantly
predominates as the default screenshot sets a width of 992 pixels. The average
value is very close to the minimum since almost all images were captured with
this default value (about 85%); however, there are also images with a wider
width, especially in Searching with a maximum of almost 10000 pixels.

In the case of the height variable (Fig. 14l), the minimum value prevails too,
although to a lesser degree (about 28%), which coincides with the default
value set by the screenshot, i.e. 744 pixels. Unlike the previous case, there
is a less unbalanced distribution of values, with a wider variability in which
the highest accumulation occurs up to 5000 pixels, a considerable accumulation
between 5000 and 10000 pixels, and finally, images with a height of up to
almost 50000 pixels have been obtained. Considering the width and height, most
of the Web pages have a vertical layout. These parameters are closely related
to the resolution or quality of the image. The more pixels, the more
resolution and quality the image has, but it demands more storage space.

Table 9: Summary of statistical indicators for quantitative parameters.

Parameter | Browsing | Searching
---|---|---
Min. | Max. | Mean | Std. Dev. | Min. | Max. | Mean | Std. Dev.
URL length | 14 | 161 | 31.73 | 12.59 | 21 | 200 | 69.84 | 30.99
Time (ms) | 1.25 | 72.9 | 18.72 | 17.39 | 1.9 | 73.3 | 22.33 | 15.83
Size (KB) | 0 | 200.89 | 50.49 | 44.33 | 0 | 176.87 | 46.82 | 39.58
Images | 0 | 15 | 2.05 | 3.48 | 0 | 17 | 2.51 | 4.14
Scripts | 0 | 20 | 3.35 | 5.1 | 0 | 17 | 3.04 | 4.43
CSS files | 0 | 30 | 5.38 | 8.07 | 0 | 22 | 4.19 | 5.77
Tables | 0 | 15 | 0.25 | 1.05 | 0 | 15 | 0.39 | 1.45
iFrames | 0 | 14 | 0.16 | 0.62 | 0 | 15 | 0.18 | 0.6
Style tags | 0 | 15 | 1.25 | 2.37 | 0 | 15 | 0.8 | 1.6
Size (KB) | 15.75 | 954.23 | 302.72 | 200.18 | 13.59 | 846.77 | 273.92 | 180.25
Width (px) | 992 | 6814 | 1058.8 | 388.7 | 992 | 9954 | 1052.3 | 379.6
Height (px) | 744 | 49658 | 3859 | 4293 | 744 | 49894 | 3560 | 3918

Finally, Table 9 summarizes the main statistical indicators for the
quantitative parameters of the Web pages, both for Browsing and Searching set.

##  6 Case study: Multi-class categorization of Web pages

The Web is a global communication platform where the volume of information
available is enormous, grows rapidly, and covers any topic. Search and
recovery service providers are constantly working on improving mechanisms to
manage this information effectively. Classification is a basic technique to
deal with this problem. Since doing it manually is not practical, the
automatic classification of Web pages is the recommended method and has
motivated several research and development works.

The classification of Web pages, also called Web categorization, determines
whether a Web page or Web site belongs to a category in particular. For
example, judging whether a page is about "arts", "business", or "sports" is an
instance of subject classification [4]. This is usually done by analyzing both
the textual content and underlying HTML code. However, the visual appearance
is also an important part of a Web page, and many topics have a distinctive
visual appearance, e.g., Web design blogs have a highly designed visual
appearance, whereas newspaper sites will have a lot of text and images [1].

Here, we present an automatic categorization of Web pages according to topic
or subject and based exclusively on their visual appearance. We take advantage
of the dataset generated in this work, formed by images (webshots) belonging
to 6 categories: arts and entertainment, business and economy, education,
government, news and media, and science and environment. Therefore, the
problem becomes a multi-class categorization.

We implemented a model of Deep Learning with a Convolutional Neural Network
(CNN). In essence, a learning process with the webshots collected in order to
achieve an acceptable accuracy and then make predictions. We hope to capture
features (difficult to identify manually) that can distinguish categories,
predict to which of them a Web page would belong, analyze the difficulty of
the topic classification of the Web pages and verify if there are particular
patterns for each category.

It is important to highlight that the following results have been selected
from a series of various experiments, where different models and architectures
were tested using the whole dataset and parts of it. The developed code, as
well as the weights of the adjusted deep learning model, are publicly
accessible151515https://osf.io/8zfh2.

The best results were obtained with the Transfer Learning technique and the
images of the Browsing dataset. This may be since in a Web directory such as
BOTW, the Web pages go through a rigorous registration process under the
supervision of human specialists, so the Web pages have a better distinction
and categorization.

The dataset for the multi-class categorization is constituted only by the
webshots of the set of Browsing, which has been organized and split according
to Table 10. For the training process, we have a balanced amount of data, i.e.
the same number of images for each category, to avoid possible preferences.
The category with fewer images (Education) was the basis for randomly
selecting the same number of images in the other categories. One image of 3.68
MB and resolution of 992x30154 was discarded because the Python imaging
library does not open larger images to avoid malicious attacks. So, each
category has 367 images, a total of 2202 images, 80% for training, whereas 20%
remaining is destined for validation (both sets randomly selected).

Table 10: Dataset split for multi-class categorization.

Category | Webshots | Dataset | Train (80%) | Val. (20%)
---|---|---|---|---
Arts & Entertainment | 397 | 367 | 293 | 74
Business & Economy | 892 | 367 | 293 | 74
Education | 368 | 367 | 293 | 74
Government | 669 | 367 | 293 | 74
News & Media | 394 | 367 | 293 | 74
Science & Environment | 462 | 367 | 293 | 74
TOTAL | 3182 | 2202 | 1758 | 444

The images are stored within the directory structure displayed in Fig. 15.
Within the main folder of the dataset the division in training and validation,
and the sub-folders represent the categories, which have been named as the
topics considered in this work.

Figure 15:  Directory structure by categories for training and validation.

After organizing the images, a pre-processing step is convenient to normalize
the image’s pixel values (integers between 0 and 255) to the scale of values
between 0 and 1; and resize to 224x224 pixels recommended for the model,
because the images in the dataset have different dimensions (width and
height). Both are a common practice that helps speed up the process of
training.

In the training phase, several models were tested with a variety of options to
achieve greater accuracy. The final model exploits the Transfer Learning
technique using ResNet [17], a competitive CNN pre-trained on the ImageNet
dataset (above 14 million images belonging to 1000 categories) and winner of
ImageNet challenge in 2015.

Despite more up-to-date models, ResNet is still very popular for Transfer
Learning implementations. We used ResNet-50 that is 50 layers deep, whose
convolutional basis is kept for feature extraction, while the classifier part
is replaced by a new one that will predict the probabilities for 6 classes
corresponding to our categories (Fig. 16).

Figure 16:  Model’s architecture based on ResNet-50.

Only the classifier layers are trained on our dataset. After 500 iterations
(epochs) of the whole training set (1758 images) in groups of 32 images
(batch_size), an accuracy of 94.26% was obtained and 40.38% in the validation
phase. The evolution of the process is summarized in the following training
and validation curve graphs (Fig. 17).

Figure 17:  Accuracy and loss in training and validation phases.

A suitable solution to this problem must meet: a) high training accuracy; b)
validation and training curves very close to each other; and c) small
difference between the validation and training error. According to the graphs,
only the first item is accomplished, so the model learned very well but does
not for generalization, i.e. to classify new images acceptably. Although we
increased the data, tuned the hyperparameters, and applied regularization
techniques such as dropout, neither accuracy is improved nor overfitting is
significantly reduced.

For a better understanding of the results, Fig. 18 displays the confusion
matrix with the validation data.

Figure 18:  Confusion matrix for validation data.

The model is correct in most cases if we focus on the categories of arts and
entertainment, government, and news and media; however, the number of
successes is low. This test takes the validation data, a total of 444 images,
achieving an accuracy of 38.29%, according to the confusion matrix. For
remaining categories, the model gets significantly confused. The
classification of these categories is a very hard problem. Nowadays, the
composition of Web pages is becoming more complex, and the content has a high
variability of visual features, even within the same category.

##  7 Conclusions

We combined different types of data (text, numbers, and images) in a single
and extensive dataset about Web pages. Although the data is organized
separately, the qualitative and quantitative parameters are linked to the
webshots through an alphanumeric identifier whose name allows us to know the
Web page’s source, category, and country of origin.

We were able to collect 3609 webshots from Browsing (Table 4) and 54565 from
Searching (Table 5), a total of 58174 webshots; however, the final dataset was
reduced to 49438 due to the elimination of Web pages with error messages. This
type of non-valid pages is equivalent to 15%, a significant value that
reflects a problem on the Internet that affects webmasters, search engines,
and users in general. To address this problem, more efficient debugging
processes are needed. As an approach, we implemented an automatic detection of
error Web pages based on a CNN model from scratch achieving acceptable
accuracy.

The methodology described for the generation of the Web pages dataset could be
adapted without inconvenience in several problems that involve the collection,
organization, analysis, and publication of large amounts of data. Much of the
workflow was automatized using Python and R scripts that allowed us to collect
URLs and their webshots. By using scraping, several parameters have been
extracted from each Web page. In this way, thousands of Web pages, indexed by
Google and BOTW Web Directory, organized by categories (Arts and
Entertainment, Business and Economy, Education, Government, News and Media,
Science and Environment), and geographical location (country and continent),
are available for public use.

The statistical analysis of the quantitative parameters: download time, size,
number of images, scripts, CSS files, number of tables, iFrames, and style
tags, show similar behavior. These variables have a very heterogeneous
distribution, high variability, and tend to be strongly concentrated in the
low values (Table 9). This suggests that Web design follows an implicit rule
of optimization of all these parameters, since the higher their values, the
longer the download and display time of the page would increase, causing the
consequent user’s discomfort.

Regarding the multi-class CNN model, the results showed that the automatic
categorization of Web pages based exclusively on visual appearance (webshot)
is a highly complex problem. Our dataset has proven to be difficult to
classify; the difficulty increases when the categories cover a wide range of
topics (like the case presented here). In addition, within each topic there is
also a lot of variability in the visual aspect of the images.

Although it is not possible to reliably distinguish between the categories in
the dataset using only the webshots, the successes of the Deep Learning model
for Web categorization, especially for government and, arts and entertainment
categories, allow us to presume that it is feasible to identify distinctive
visual patterns, which may be part of a next work. A high level of accuracy
has not been achieved; however, it can serve as a baseline for future
research. We suppose that increasing the dataset, preprocessing the images to
have the same size and resolution, cropping and scaling the Web pages, could
improve the results.

##  8 Future work

Our work can motivate the following developments:

  * •

Extending the dataset provided, increasing the categories, URLs, webshots, and
other qualitative and quantitative parameters.

  * •

Achieving a higher level of automation in the process of collecting,
organizing, and capturing webshots.

  * •

Considering alternative URLs sources, that is, a search engine other than
Google for Searching, and a Web directory other than BOTW for Browsing.

  * •

Improving the accuracy achieved in multi-class categorization of Web pages
with deeper and more recent convolutional neural networks.

## References

  * [1] V. De Boer, M. Van Someren, and T. Lupascu, “Classifying web pages with visual features,” _WEBIST 2010 - Proceedings of the 6th International Conference on Web Information Systems and Technology_ , vol. 1, pp. 245–252, 2010, doi: 10.5220/0002804102450252.
  * [2] M. Du, Y. Han, and L. Zhao, “A Heuristic Approach for Website Classification with Mixed Feature Extractors,” _IEEE 24th International Conference on Parallel and Distributed Systems (ICPADS)_ , 2018, doi: 10.1109/ICPADS.2018.00028.
  * [3] S. Lassri, H. Benlahmar, and A. Tragha, “Machine Learning for Web Page Classification: A Survey,” _International Journal of Information Science & Technology (iJIST)_, vol. 3, no. 5, pp. 38-50, 2019.
  * [4] X. Qi and B. D. Davison, “Web page classification: Features and algorithms,” _ACM Computing Surveys_ , vol. 41, no. 2, 2009, doi: 10.1145/1459352.1459357.
  * [5] J. Deng, W. Dong, R. Socher, L. J. Li, K. Li, and L. Fei-Fei, “ImageNet: A Large-Scale Hierarchical Image Database,” _IEEE conference on computer vision and pattern recognition CVPR2009_ , pp. 248-255, 2009. [Online]. Available: http://www.image-net.org/
  * [6] K. Reinecke and K. Z. Gajos, “Quantifying visual preferences around the world,” _Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, CHI-14_ , pp. 11–20, 2014, doi: 10.1145/2556288.2557052.
  * [7] D. López-Sánchez, J. M. Corchado, and A. G. Arrieta, “A CBR system for image-based webpage classification: Case representation with convolutional neural networks,” _FLAIRS 2017 -Proceedings of the 30th International Florida Artificial Intelligence Research Society Conference_ , pp. 483–488, 2017.
  * [8] M. Nordhoff, T. August, N. A. Oliveira, and K. Reinecke, “A Case for Design Localization: Diversity of Website Designs in 44 Countries,” pp. 1-12, 2018, doi: 10.1145/3173574.3173911.
  * [9] D. López-Sánchez, A. G. Arrieta, and J. M. Corchado, “Visual content-based web page categorization with deep transfer learning and metric learning,” _Neurocomputing_ , vol. 338, pp. 418–431. 2019, doi: 10.1016/j.neucom.2018.08.086.
  * [10] V. Falconieri, “CIRCL - Computer Incident Response Center Luxembourg,” _Security made in Lëtzebuerg (SMILE)_ , g.i.e. 16, bd d’Avranches L-1160 Luxembourg Grand-Duchy of Luxembourg, 2019. [Online]. Available: https://www.circl.lu/opendata/circl-phishing-dataset-01/
  * [11] V. Falconieri, “CIRCL - Computer Incident Response Center Luxembourg,” _Security made in Lëtzebuerg (SMILE)_ , g.i.e. 16, bd d’Avranches L-1160 Luxembourg Grand-Duchy of Luxembourg, 2019. [Online]. Available: https://www.circl.lu/opendata/circl-ail-dataset-01/
  * [12] Institute for Computer Research, University of Alicante, 2019, P.O. Box 99. 03080, Alicante, Spain.
  * [13] A. B. King, “Website Optimization: Speed, Search Engine & Secrets,” O’Reilly Publications, EEUU, ISBN-13: 978-0596515089, 2008.
  * [14] I. Ruthven and D. Kelly, “Interactive Information Seeking, Behaviour and Retrieval,” London: Facet Publishing, 320 pp., ISBN: 978-1856047074, 2011.
  * [15] T. Fu, A. Abbasi, and H. Chen, “A focused crawler for Dark Web forums,” _Journal of the American Society for Information Science and Technology_ , vol. 61, no. 6, pp. 1213-1231, 2010, doi: 10.1002/asi.21323.
  * [16] D. Liu, J. Lee, W. Wang, and Y. Wang, “Malicious Websites Detection via CNN based Screenshot Recognition,” _International Conference on Intelligent Computing and its Emerging Applications (ICEA)_ , pp. 115-119, 2019, doi: 10.1109/ICEA.2019.8858300.
  * [17] K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” _IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_ , pp. 770-778, 2016, doi: 10.1109/CVPR.2016.90.


# Geodesics on Regular Constant Distance Surfaces

J. J. P. Veerman
Weizmann Institute, Rehovot, Israel.Maseeh Dept. of Math. and Stat., Portland
State Univ., Portland, OR, USA; e-mail<EMAIL_ADDRESS>
###### Abstract

Suppose that the surfaces $K_{0}$ and $K_{r}$ are the boundaries of two
convex, complete, connected $C^{2}$ bodies in $\mathbb{R}^{3}$. Assume further
that the (Euclidean) distance between any point $x$ in $K_{r}$ and $K_{0}$ is
always $r$ ($r>0$). For $x$ in $K_{r}$, let $\Pi(x)$ denote the nearest point
to $x$ in $K_{0}$. We show that the projection $\Pi$ preserves geodesics in
these surfaces if and only if both surfaces are concentric spheres or co-axial
round cylinders. This is optimal in the sense that the main step to establish
this result is false for $C^{1,1}$ surfaces. Finally, we give a non-trivial
example of a geodesic preserving projection of two $C^{2}$ _non_ -constant
distance surfaces. The question whether for any $C^{2}$ convex surface
$S_{0}$, there is a surface $S$ whose projection to $S_{0}$ preserves
geodesics is open.

2020 Mathematics Subject Classification: 52A15, 53A05.

##  1 Introduction

Suppose $\gamma(t)$ is a trajectory of an object in $\mathbb{R}^{3}$ outside a
convex body. In this paper, $\Pi(\gamma(t))$ is called the _projection_ of
$\gamma(t)$. In many applications it is important to track the point
$\Pi(\gamma(t))$ on the surface of the body nearest to the moving object111A
case in point is the event on September 26, 2022, when an unmanned spacecraft
hit the asteroid Didymos on purpose [9], thereby changing the orbit of the
asteroid. Clearly, the change in orbit of the asteroid is related to the
locus, angle, and speed of the missile at the time of impact. The asteroid
itself is in good approximation a convex set, but far from round [9].. In
[10], a method to compute and track the projection was considered. Instead,
here we consider the question whether this projection can take geodesics to
(reparametrized) geodesics.

Before describing the main result, we give some general background about this
problem. A diffeomorphism $\phi:S_{1}\rightarrow S_{2}$ between (sub)
manifolds is called a _geodesic mapping_ if it carries geodesics to geodesics.
We restrict our discussion to surfaces in $\mathbb{R}^{3}$. It is well-known
that if $S_{1}$ has constant Gaussian curvature, then there is a geodesic
mapping from $S_{1}$ to the plane. Vice versa, Beltrami’s theorem says that if
$S_{1}$ admits a (local) geodesic mapping to the plane near every point in
$S_{1}$, then $S_{1}$ has constant Gaussian curvature ([4], Section 4.6,
exercises 12 and 13). There is a fairly large body of literature on geodesic
mappings, [7, 8] and the references therein. Our own interest here is to find
out whether _projections_ from one surface to another can be _geodesic
mappings_.

Our main result concerns projections to the convex set from a surface whose
distance to the convex set is exactly $r$ (a constant). We call such a surface
a surface of constant distance (the word ‘equidistant’ is already in use for a
slightly different concept [11]). Very little has been written about sets of
constant distance (but see [3, 2]). What we aim to show here is essentially a
rigidity result in $\mathbb{R}^{3}$: a constant distance surface whose
projection takes geodesics to geodesics must be a sphere or a cylinder. We
proceed with the details.

We imagine a $C^{2}$ convex body in $\mathbb{R}^{3}$ whose boundary we denote
by $K_{0}$. Let $p$ be any point in the surface. By applying an isometry, we
may assume that $p$ is located at the origin of $\mathbb{R}^{3}$ and that the
tangent plane to $K_{0}$ at $p$ is given by $z=0$. Thus the coordinate patch
near the origin can be written as

$K_{0}(x_{1},x_{2})=\left(x_{1},x_{2},-\frac{1}{2}(a_{1}x_{1}^{2}+a_{2}x_{2}^{2})-h(x_{1},x_{2})\right)\,,$
(1.1)

where the $a_{i}$ are the _principal curvatures_ and $h$ is twice continuously
differentiable with $h(0,0)$ is zero and the same holds for all first and
second derivatives. By convexity, the principal curvatures $a_{i}$ are non-
negative.

Because of the smoothness and the convexity, we can smoothly coordinatize the
space $\Omega$ surrounding the convex body by using these coordinate patches
as follows [10]:

$S(x_{1},x_{2},r)=K_{0}(x_{1},x_{2})+r\hat{n}(x_{1},x_{2})\,.$ (1.2)

where $\hat{n}$ is the unit normal to $K_{0}$. These 3-dimensional coordinate
patches form a differentiable atlas of $\Omega$. Denote by
$\Pi:\Omega\rightarrow K_{0}$ the orthogonal ‘projection’ from $\Omega$ onto
$K_{0}$, defined as follows [10]: $\gamma:=\Pi(z)$ is the unique point on
$K_{0}$ nearest to $z\in\Omega$. Clearly, the inverse of $\Pi$ at a point
$\gamma$ of $K_{0}$ consists of a ray normal to $K_{0}$ at $\gamma$.

$\Pi^{-1}(\gamma)=\cup_{r>0}\\{\gamma+r\hat{n}(\gamma)\\}\,,$

where $\hat{n}$ is the unit normal at $\gamma$ pointing outwards.

Figure 1.1: _Left, the projection (red) of straight line orthogonal to the
axis of symmetry of a solid cylinder. Right, the projection of a line at an
arbitrary angle with the axis of symmetry of the cylinder. The former is a
geodesic, the latter clearly not._

The simple example of Figure 1.1 shows that the projection of a straight line
in $\mathbb{R}^{3}$ does not usually result in a geodesic in $K_{0}$. The
question arises when is it that geodesics _do_ project to geodesics? In this
paper, any non-singular reparametrization (i.e. with non-zero, possibly
variable, speed) of a unit speed geodesic will also be called a geodesic.

###### Definition 1.1

i) Given two closed $C^{2}$ surfaces $S_{1}$ and $S_{2}$ in $\mathbb{R}^{3}$.
The _projection_ $\Pi:S_{1}\rightarrow S_{2}$ is defined as follows. For $x\in
S_{1}$,

$\Pi(x):=\\{y\in S_{2}\,:\,y\textrm{ minimizes the Euclidean distance
}d(x,y)\\}\,.$

ii) Two surfaces are called _regular constant distance surfaces_ if the
Euclidean distance from any point $x$ in $S_{1}$ to $S_{2}$ equals $r$
(fixed), and the nearest point on $S_{2}$ is always unique.

It is a curious fact that in general $\Pi:S_{1}\rightarrow S_{2}$ and
$\Pi^{\prime}:S_{2}\rightarrow S_{1}$ are _not_ inverses of one another.
However, if the $S_{i}$ are at least $C^{1}$ and regular constant distance,
then $\Pi$ and $\Pi^{\prime}$ _are_ inverses. This is the content of
Proposition 2.1. In the remainder of this paper, we deal with this case
(except where mentioned otherwise).

Let $K_{r}$ denote the surface that has distance $r$ to $K_{0}$, or

$K_{r}:=\\{S(x_{1},x_{2},r)\,:\,r>0\textrm{ fixed}\\}\,.$

We are interested in determining when the projection $\Pi:K_{r}\rightarrow
K_{0}$ between these surfaces have the property that they send geodesics to
(reparametrizations of) geodesics. We call this property _preservation of
geodesics_ and $\Pi$ a _geodesic mapping_. The proof of the following result
takes up most of this paper.

###### Theorem 1.2

Let $K_{0}$ be $C^{2}$ surface patch given by (1.1) with $a_{1}\geq 0$ and
$a_{2}\geq 0$ and fix $r>0$. Then the projection $\Pi:K_{r}\rightarrow K_{0}$
does _not_ preserve geodesics, unless (in that patch) (i) the Gaussian
curvature is zero (i.e. $a_{1}a_{2}=0$) or (ii) the patch consists of umbilic
points (i.e. $a_{1}=a_{2}$)

A moment’s reflection, will tell us that in $\mathbb{R}^{3}$, projections
between concentric spheres or between co-axial round cylinders _do_ preserve
geodesics. The interesting question is, are there any others? Here is a (to
the author) surprising corollary of Theorem 1.2.

###### Corollary 1.3

Let $K_{0}$ and $K_{r}$ be regular constant distance, complete, convex,
connected, $C^{2}$ surfaces in $\mathbb{R}^{3}$ at a distance $r>0$. The
projection from $K_{r}$ to $K_{0}$ preserves geodesics if and only if both are
either spheres or (infinite) round cylinders.

Remark. In this context, a (generalized) cylinder $C$ is a set of points such
that for every point $p\in C$ there is a unique line $\ell(p)$ in $C$ and any
two such lines are either the same or parallel. A ‘perfect’ or ‘round’
cylinder is a cylinder that rotationally symmetric around its axis. In
particular, its principal curvatures are constant.

Remark. In view of Proposition 2.1, $\Pi:K_{r}\rightarrow K_{0}$ and
$\Pi^{\prime}:K_{0}\rightarrow K_{r}$ are inverses. So $\Pi$ preserves
geodesics if and only if $\Pi^{\prime}$ preserves geodesics.

Proof of Corollary 1.3. It is clear that if $K_{0}$ and $K_{r}$ both are
either spheres or (infinite) round cylinders, then the geodesics are
preserved.

Vice versa, if the projection preserves geodesics, then by Theorem 1.2, every
$C^{2}$ surface patch is either a piece of a sphere or piece of a cylinder.
The two cannot occur in the same $C^{2}$ patch, because at any ‘intermediate’
point, (i) or (ii) in that theorem will be violated, and then geodesics will
not be preserved. Thus all of $K_{0}$ must satisfy either (i) or (ii).

It is well-known that a $C^{2}$ complete surface whose principal curvatures
are the identical (or _umbilic_ surface) must be a part of a sphere ([4],
Section 3.2). Similarly ([4], section 5.8), a complete surface with Gaussian
curvature zero, must be a generalized cylinder. Finally, Proposition 4.1
implies that if $K_{0}$ and $K_{r}$ are cylinders and the projection preserves
geodesics, then they must be round cylinders.

Remark. Interestingly, this corollary is clearly false in $\mathbb{R}^{2}$.
For instance, if $K_{0}$ is an ellipse in $\mathbb{R}^{2}$ and $K_{r}$ a
circle that contains it, the projection $K_{r}\rightarrow K_{0}$ is
surjective. On the other hand, in dimension 4 or higher, nothing appears to be
known.

We furthermore prove that Corollary 1.3 is optimal in the sense that if we
drop $C^{2}$ in favor of $C^{1,1}$, that is: once continuously differentiable
with a Lipschitz derivatives, then the result does not hold.

###### Theorem 1.4

There exist regular constant distance, complete, convex, $C^{1,1}$ surfaces
$K_{0}$ and $K_{r}$ in $\mathbb{R}^{3}$ with the property that (wherever the
surfaces are $C^{2}$) either (i) $a_{1}a_{2}=0$ or (ii) $a_{1}=a_{2}$ holds,
but the projection from $K_{0}$ to $K_{r}$ does not preserve geodesics.

Proof. The result follows directly from Proposition 5.1.

Remark. In [1] (see also [10]), a related, but more complicated, counter-
example was constructed which carries over to cylinders in $\mathbb{R}^{3}$.
It says that here is a convex $C^{1,1}$ cylinder such that the projection
$\Pi$ onto this cylinder does not have a derivative.

Finally, we are interested in the question whether, given the boundary $S_{0}$
of a convex body, there is _any_ surface $S$ outside it, whose projection onto
$S_{0}$ preserves geodesics. For cylinders in $\mathbb{R}^{3}$, the answer is
affirmative, as we show in Section 6. In fact, in that case, the space outside
$S_{0}$ can be foliated by surfaces $S_{k}$, $k\geq 0$ so that each projection
$\Pi_{k}:S_{k}\rightarrow S_{0}$ preserves geodesics. However, as we will
show, these surfaces $S_{k}$ generally are not convex.

Remark. For general $C^{2}$ convex bodies, even in $\mathbb{R}^{3}$, it is
unknown at the time of this writing whether the space outside them can be
foliated by surfaces $S_{k}$ so that each projection $\Pi_{k}:S_{k}\rightarrow
S_{0}$ preserves geodesics.

##  2 Preliminaries

We first prove that the projections between two regular constant distant
surfaces (see Definition 1.1) are inverses of one another. Then we discuss the
strategy to prove Theorem 1.2.

###### Proposition 2.1

Let $S_{1}$ and $S_{2}$ be $C^{1}$ surfaces in $\mathbb{R}^{3}$ such that the
Euclidean distance from any point $x$ in $S_{1}$ to $S_{2}$ equals $r$
(fixed), and the nearest point on $S_{2}$ is always unique. Then the
projections $\Pi:S_{1}\rightarrow S_{2}$ and $\Pi^{\prime}:S_{2}\rightarrow
S_{1}$ are inverses of one another.

Figure 2.1: _This figure illustrates that $\Pi:S_{1}\rightarrow S_{2}$ and
$\Pi^{\prime}:S_{2}\rightarrow S_{1}$ are not generally inverses of one
another. Traveling from $y$ along $S_{2}$ in the direction of $c(t)$ will
(initially) decrease the distance to $x^{\prime}$._

Proof. Consider $\Pi:S_{1}\rightarrow S_{2}$ and
$\Pi^{\prime}:S_{2}\rightarrow S_{1}$ and suppose $\Pi(x)=y$ (see Figure 2.1).
Suppose there is $x^{\prime}$ in $S_{2}$ not equal to $x$ such that
$x^{\prime}\in\Pi^{\prime}(y)$. Denote the Euclidean distance by $d(x,y)$. Now

$\displaystyle x^{\prime}\in\Pi^{\prime}(y)\quad$
$\displaystyle\Longrightarrow$ $\displaystyle\quad d(y,x^{\prime})\leq
d(y,x)=r$ $\displaystyle d(x^{\prime},S_{2})=r\quad$
$\displaystyle\Longrightarrow$ $\displaystyle\quad d(x^{\prime},y)\geq r$

So $d(y,x^{\prime})=r$.

Consider the plane $P$ through $x$, $x^{\prime}$, and $y$, and parametrize
$S_{2}$ by the arclength $t$ and let the geodesic $c(t)$ be the tangent to
$S_{2}(t)$ as drawn in Figure 2.1. Then, by differentiability of $S_{2}$,

$\lim_{t\searrow
0^{+}}\frac{d(S_{2}(t),x^{\prime})-d(S_{2}(0),x^{\prime})}{t}=\lim_{t\searrow
0^{+}}\frac{d(c(t),x^{\prime})-d(c(0),x^{\prime})}{t}=-\cos\phi\,.$

The last equality is a special case222In this simple case, it can also be
derived easily from an explicit computation. of Theorem 4.3 in [5]. Thus for
some positive $t$, $d(S_{2}(t),x^{\prime})<r$, contradicting the assumption
that $d(x^{\prime},S_{2})=r$.

To prove Theorem 1.2, we pick a family $\Gamma$ of geodesics in the patch
given by (1.1) as follows. A geodesic $\gamma(t)$ in $\Gamma$ is determined by
initial condition $\gamma(0)=(0,x_{2}(0),x_{3}(0))$, where $x_{2}(0)$ is not
zero but small and $\dot{x}_{1}(0)>0$ is of order unity, while $x_{3}(0)$ is
determined by the fact that $\gamma$ is a curve in the surface $K_{0}$ (see
Figure 2.2).

Figure 2.2: _A view of a geodesic $\gamma$ in $K_{0}$ from ‘above’ (i.e.
$x_{3}>0$). At $t=0$, $\gamma$ passes through the point $(0,x_{2}(0))$ with
velocity $(\dot{x}_{1}(0),0)$._

Since we are interested not in geodesics per se, but in geodesics modulo (non-
singular) reparametrization, we establish a simple characterization of
geodesics in $\Gamma$ that does not depend on the parametrization (Lemma 3.1).
We then consider the projection $\Pi:K_{0}\rightarrow K_{r}$, with $r>0$,
which maps $\gamma$ to a curve $\gamma_{r}$ in $K_{r}$. And finally, we prove
that $\gamma_{r}$ is not a (reparametrization of a) geodesic by showing that
it fails the criterion just mentioned. To do this, we will need to determine
the terms of the leading order of magnitude in a fairly involved expression.
We will employ the standard ‘big-oh’ and ‘small-oh’ notation as follows. We
consider curves such as the ones in Figure 2.2, and evaluate certain
quantities as these curves cross the $x_{1}=0$ axis. Thus333Care should be
exercised with the “=” sign. It is not reflexive in this context. using $x$ as
shorthand for $(x_{1},x_{2})$:

$\displaystyle f(x_{1},x_{2})$ $\displaystyle=$ $\displaystyle
Ok\quad\textrm{means}\quad\limsup_{|x|\rightarrow
0}\frac{|f(x)|}{|x|^{k}}<\infty\,,$ $\displaystyle\textrm{and }\quad\quad
f(x_{1},x_{2})$ $\displaystyle=$ $\displaystyle
ok\quad\textrm{means}\quad\lim_{|x|\rightarrow 0}\frac{|f(x)|}{|x|^{k}}=0\,.$

It will be convenient to have a more compact notation. Hence the following
definition.

###### Definition 2.2

We define $z_{i}:=a_{i}x_{i}+\partial_{i}h(x)$, where
$x(t)=(x_{1}(t),x_{2}(t))$ is the projection to the $x_{1}$-$x_{2}$ plane of
the geodesic $\gamma(t)$ in Figure 2.2.

We compute the leading orders at $t=0$ of $z_{i}$, $\dot{z}_{i}$, and
$\ddot{z}_{i}$.

$\dot{z}_{i}=a_{i}\dot{x}_{i}+d_{t}\partial_{i}h\quad\;\;{\rm
and}\;\;\quad\ddot{z}_{i}=a_{i}\ddot{x}_{i}+d_{t}^{2}\partial_{i}h\,.$

We know that $h=o2$ and so $\partial_{i}h=o1$. Furthermore, at $t=0$,
$x_{1}=0$, and $x_{2}=O1$. Thus

$z_{1}=\partial_{1}h\quad\;\;{\rm and}\;\;\quad z_{2}=a_{2}x_{2}+o1\,.$ (2.1)

Each of these is $O1$ or less. Now,

$d_{t}\partial_{i}h=\partial_{1}\partial_{i}h\;\dot{x}_{1}+\partial_{2}\partial_{i}h\;\dot{x}_{2}\,.$

Along the geodesic in the patch, $\dot{x}_{1}$ is order unity (or $O1$), and
even though $\dot{x}_{2}$ may be small, we see that $d_{t}\partial_{2}h=o0$.
In fact, we are only interested in evaluating these quantities at $t=0$ at
which point we have $\dot{x}_{2}=\ddot{x}_{2}=0$. Putting this together
results at $t=0$ in

$\dot{z}_{1}=a_{1}\dot{x}_{i}+o0\quad\;\;{\rm
and}\;\;\quad\dot{z}_{2}=\partial_{1}\partial_{2}h\;\dot{x}_{1}\,,$ (2.2)

and so $\dot{z}_{2}=o0$. The next derivative, $\ddot{z}_{i}$, is a little
trickier. The reason is that $d_{t}^{2}\partial_{2}h$ cannot be bounded by
some order. It may be large, or, depending on $h$, it may be small. To ensure
we have the leading terms of $\ddot{z}_{i}$, we have to include both terms and
the expression does not simplify. Setting $t=0$, we will see that
$\ddot{x}_{1}=O1$ and we know that $\ddot{x}_{1}=0$. So at $t=0$,

$\ddot{z}_{1}=a_{1}\ddot{x}_{i}+d_{t}^{2}\partial_{2}h\quad\;\;{\rm
and}\;\;\quad\ddot{z}_{2}=\partial_{1}\partial_{2}h\;\dot{x}_{1}\,.$ (2.3)

##  3 Proof of Theorem 1.2

To distinguish the standard inner product in $\mathbb{R}^{3}$ from a 2-tuple,
we indicate the former by a dot: $x\cdot y$. Also, to avoid cluttering the
formulas with the repetitive occurrence of the argument “(0)”, we will not
write it, except when its omission might lead to misunderstandings.

###### Lemma 3.1

Suppose the family of curves
$\gamma(t)=(x_{1}(t),x_{2}(t),-\frac{1}{2}[a_{1}x_{1}(t)^{2}+a_{2}x_{2}(t)^{2}]-h)$
in $K_{0}$ are (a reparametrization of) geodesics with $x_{1}=0$,
$\dot{x}_{1}>0$, $x_{2}\neq 0$, and $\dot{x}_{2}=0$. Then at $t=0$

$\lim_{x_{2}\rightarrow
0}\,\dfrac{\ddot{x}_{2}}{\dot{x}_{1}^{2}x_{2}}=-a_{1}a_{2}\,.$

Furthermore, this characterization is independent of the (smooth)
parametrization of $\gamma$.

Proof. Set $e_{i}:=\partial_{i}K_{0}$, where $K_{0}$ is given by (1.1). The
metric tensor $g_{ij}=e_{i}\cdot e_{j}$ and its inverse are given by (see
Definition 2.2)

$g=\begin{pmatrix}1+z_{1}^{2}&z_{1}z_{2}\\\
z_{1}z_{2}&1+z_{2}^{2}\end{pmatrix}\quad\;\;{\rm and}\;\;\quad
g^{-1}=\Delta^{-1}\begin{pmatrix}1+z_{2}^{2}&-z_{1}z_{2}\\\
-z_{1}z_{2}&1+z_{1}^{2}\end{pmatrix}\,,$

where $\Delta$ is the determinant of $g$. The coefficients of $g^{-1}$ are
denoted by $g^{ij}$. The Christoffel symbols of the second kind are now given
by

$\Gamma^{k}_{ij}:=\partial_{i}e_{j}\cdot\sum_{n}g^{kn}e_{n}\,.$

We have that

$\partial_{i}e_{j}=(0,0,-\partial_{i}z_{j})\,.$

So we only need the 3rd component of $\sum_{n}g^{kn}e_{n}$. A straightforward
computation gives that these are $-\Delta^{-1}z_{k}$. This yields

$\Gamma^{k}_{ij}=\Delta^{-1}z_{k}\;\,\partial_{i}z_{j}\,.$

Employing the rules for order calculation, one checks that this gives an $O1$
term only if $i=j$, namely $a_{i}x_{i}$. Everything else gives at best $o1$
terms. So $\Gamma^{k}_{ii}=a_{k}a_{i}x_{k}+o1$, and $\Gamma^{k}_{ij}=o1$ if
$i\neq j$. The geodesic equations are

$\ddot{x}_{k}+\sum_{i,j}\Gamma^{k}_{ij}\dot{x}_{i}\,\dot{x}_{j}=0\,.$

So in our case, the equation for $\ddot{x}_{2}$ is

$\begin{matrix}\ddot{x}_{2}+(a_{1}a_{2}x_{2}+o1)\,\dot{x}_{1}^{2}+(o1)\dot{x}_{1}\dot{x}_{2}+(a_{2}^{2}x_{2}+o1)\,\dot{x}_{2}^{2}=0\,.\end{matrix}$

Setting $\dot{x}_{2}=0$, proves the first part of the lemma.

To prove that this is invariant under the parametrization $t\rightarrow s(t)$,
define $c(t)=\gamma\circ s$. Set $s(0)=0$. Using $\dot{x}_{2}(0)=0$ again, it
is trivial to show that at $t=0$

$\frac{d_{t}^{2}(x_{2}(s))}{(d_{t}x(s))^{2}\,x_{2}(s)}=\dfrac{\ddot{x}_{2}}{\dot{x}_{1}^{2}x_{2}}\,,$

where we use $d_{t}$ for $\tfrac{d}{dt}$.

###### Lemma 3.2

Given the surface $K_{0}$ of (1.1), then the constant distance surface $K_{r}$
can be parametrized as follows

$K_{r}(u_{1},u_{2})=\left(u_{1},u_{2},r-\frac{1}{2}(a_{1r}u_{1}^{2}+a_{2r}u_{2}^{2})+o2\right)\,,$

where

$a_{ir}=\dfrac{a_{i}}{1+ra_{i}}\,.$

Figure 3.1: _The radius of curvature in the $x$-direction of $K_{0}$ at the
origin equals $1/a$. The orthogonal projection to $K_{r}$ then gives a radius
of curvature of $r+1/a$. The principal curvature is the reciprocal of this._

Proof. Fix $r>0$. The inverse projection $\Pi_{r}^{-1}:K_{0}\rightarrow K_{r}$
is well-defined, and given by

$K_{r}(x_{1},x_{2}):=\Pi_{r}^{-1}(K_{0}(x_{1},x_{2}))=K_{0}(x_{1},x_{2})+r\hat{n}(x_{1},x_{2})\,.$
(3.1)

We’ll call $K_{0}$, somewhat informally, the ‘downstairs’ surface and $K_{r}$
is ‘upstairs’. We compute, using Definition 2.2

$\hat{n}(x_{1},x_{2})=\frac{(z_{1},z_{2},1)}{\sqrt{1+z_{1}^{2}+z_{2}^{2}}}\,.$
(3.2)

So

$\displaystyle K_{r}(x_{1},x_{2})$ $\displaystyle=$
$\displaystyle\left(x_{1}+\frac{rz_{1}}{V},x_{2}+\frac{rz_{2}}{V},-\frac{1}{2}(a_{1}x^{2}+a_{1}x_{2}^{2})-h(x_{1},x_{2})+\frac{r}{V}\right)\,,$
$\displaystyle\;\;{\rm where}\;\;V$ $\displaystyle=$
$\displaystyle\sqrt{1+z_{1}^{2}+z_{2}^{2}}$

There are no mixed quadratic terms of the form $x_{1}x_{2}$ in the expansion
of $K_{r}(x_{1},x_{2})$. So if we rewrite this as
$K_{r}(u_{1},u_{2})=(u_{1},u_{2},r+u_{3}(u_{1},u_{2}))$, then the $u_{1}$\-
and $u_{2}$-axes of $K_{r}$ are the axes of principal curvature at
$(u_{1},u_{2})=(0,0)$. All we need to do to complete the proof, is a
computation of the curvature in the $x_{1}$-$r$ plane to get $a_{1r}$. This is
done in Figure 3.1 by employing osculating circles. The computation is the
same in the $x_{2}$-$r$ plane.

Part of the difficulty here is that it is pretty clear that if $K_{0}$ does
not have constant curvature along a geodesic $\gamma(t)$, then the curve
traced in $K_{r}$ by projecting $\gamma$ will certainly not be a constant
speed curve, let alone a constant speed geodesic. It is thus a priori clear
that the projected curve will not satisfy the geodesic equations. What we wish
to establish, however, is whether it can be _reparametrized_ as a geodesic. We
use Lemma 3.1 that the images $\gamma_{r}$ ($r>0$) under the projection are
not geodesics.

###### Lemma 3.3

The geodesic $\gamma$ depicted in Figure 2.2 with $\gamma(0)=(0,x_{2})$ and
$\dot{\gamma}(0)=(\dot{x}_{1},0)$ projects to a curve

$\gamma_{r}(t)=(u_{1}(t),u_{2}(t),u_{3}(t))$

in $K_{r}$ ($r>0$), where at $t=0$, we have

$\displaystyle\dot{u}_{1}$ $\displaystyle=$
$\displaystyle(1+ra_{1})\dot{x}_{1}+o0$ $\displaystyle u_{2}$ $\displaystyle=$
$\displaystyle(1+ra_{2})x_{2}+o1$ $\displaystyle\ddot{u}_{2}$ $\displaystyle=$
$\displaystyle-(1+ra_{1}+ra_{2})a_{1}a_{2}\dot{x}_{1}^{2}x_{2}+rd_{t}^{2}\partial_{2}h+o1\,.$

Proof. We trace a possibly reparametrized geodesic $\gamma(t)$ in $K_{0}$
satisfying Lemma 3.1, and determine the curvature of its projection
$\gamma_{r}$ ‘upstairs’ in $K_{r}$. Note that $\gamma_{r}(t)$ is given by
$\gamma(t)+r\hat{n}(x_{1}(t),x_{2}(t))$. The unit-normal $\hat{n}$ is given in
(3.2). We use the rules of evaluating the orders given in Section 2.

The $x_{1}$ and $x_{2}$ coordinates of $\gamma_{r}$ will be called $u_{1}$ and
$u_{2}$ and, noting that $z_{i}=O1$ (Section 2), we get

$\begin{matrix}u_{1}=x_{1}+rz_{1}(1-\frac{1}{2}z_{1}^{2}-\frac{1}{2}z_{2}^{2}+O4)\\\\[8.5359pt]
u_{2}=x_{2}+rz_{2}(1-\frac{1}{2}z_{1}^{2}-\frac{1}{2}z_{2}^{2}+O4)\,.\end{matrix}$

Referring to (2.1), this gives for $u_{2}$ the following:

$u_{2}=(1+ra_{2})x_{2}+o1\,.$ (3.3)

Now, differentiate the $u_{i}$ with respect to time.

$\begin{matrix}\dot{u}_{1}=\dot{x}_{1}+r\dot{z}_{1}-r\dot{z}_{1}(\frac{1}{2}z_{1}^{2}+\frac{1}{2}z_{2}^{2}+O4)-r\dot{z}_{1}(z_{1}\dot{z}_{1}+z_{2}\dot{z}_{2}+O3)\\\\[8.5359pt]
\dot{u}_{2}=\dot{x}_{2}+r\dot{z}_{2}-r\dot{z}_{2}(\frac{1}{2}z_{1}^{2}+\frac{1}{2}z_{2}^{2}+O4)-r\dot{z}_{2}(z_{1}\dot{z}_{1}+z_{2}\dot{z}_{2}+O3)\,.\end{matrix}$

Use (2.2), to see that the leading term appearing in $\dot{u}_{1}$ is
$\dot{x}_{1}$ (which is $O0$), and thus

$\dot{u}_{1}=(1+ra_{1})\dot{x}_{1}+o0\,.$ (3.4)

We need to differentiate $\dot{u}_{2}$ one more time with respect to time.

$\displaystyle\ddot{u}_{2}$ $\displaystyle=$
$\displaystyle\underbrace{\ddot{x}_{2}+\ddot{z}_{2}}_{A}-\underbrace{r\ddot{z}_{2}\;O2}_{B}-\underbrace{2r\dot{z}_{2}(z_{1}\dot{z}_{1}+z_{2}\dot{z}_{2}+O3)}_{C}-\underbrace{rz_{2}(\dot{z}_{1}^{2}+z_{1}\ddot{z}_{1}+\dot{z}_{2}^{2}+z_{2}\ddot{z}_{2}+O2)}_{D}\,.$

To analyze this, we denote the four terms A through D, and look at each
individually. In A, $\ddot{z}_{2}$ can be evaluated via (2.3) and
$\ddot{x}_{2}$ can be eliminated via Lemma 3.1. This gives
$-(1+ra_{2})a_{1}a_{2}\dot{x}_{1}^{2}x_{2}+rd_{t}^{2}\partial_{2}h$ for the
term marked A. Clearly, B is negligible compared to A. In C, $\dot{z}_{2}=o0$
as noted before, and the term in parentheses is $O1$. So all together this
term is $o1$ and therefore negligible compared to A. Finally, in C, we use
(2.1) to establish that $-r\dot{z}_{1}^{2}z_{2}$ is $O1$ and, by (2.1), all
other terms are smaller. This last expression can be simplified using (2.1)
and (2.2) to $-ra_{1}^{2}a_{2}\dot{x}_{1}^{2}x_{2}+o1$. Collecting terms and
adding the relations (3.3) and (3.4) yields the lemma.

Proof of Theorem 1.2. On the one hand, if the projected curve $\gamma_{r}$ is
also a geodesic, then it itself must satisfy Lemma 3.1 with the curvatures
given by Lemma 3.2. So

$\ddot{u}_{2}=-\frac{a_{1}a_{2}}{(1+ra_{1})(1+ra_{2})}\dot{u}_{1}^{2}u_{2}\,.$

Eliminating $\dot{u}_{1}$ and $u_{2}$ in favor of $\dot{x}_{1}$ and $x_{2}$
via Lemma 3.3 gives

$\ddot{u}_{2}=-(1+ra_{1})a_{1}a_{2}\dot{x}_{1}^{2}x_{2}+o1\,.$

On the other hand, another equation for $\ddot{u}_{2}$ is given by Lemma 3.3.
If we equate the two expressions, we obtain

$-(1+ra_{1})a_{1}a_{2}\dot{x}_{1}^{2}x_{2}+o1=-(1+ra_{1}+ra_{2})a_{1}a_{2}\dot{x}_{1}^{2}x_{2}+rd_{t}^{2}\partial_{2}h+o1\,.$

Upon simplification, this gives

$-ra_{1}a_{2}^{2}\dot{x}_{1}^{2}x_{2}+rd_{t}^{2}\partial_{2}h=o1\,.$ (3.5)

This equation has two possible solutions. The first is if the left hand is
$o1$ and so $a_{1}a_{2}=0$ and $d_{t}^{2}\partial_{2}h$ is $o1$. From the
rules about manipulating the order symbols in Section 2, it follows that then
$h=o4$. The other possibility is if $a_{1}a_{2}>0$ and so
$d_{t}^{2}\partial_{2}h=a_{1}a_{2}^{2}\dot{x}_{1}^{2}x_{2}+o1$. This happens
if and only if $h=\tfrac{1}{4}a_{1}a_{2}^{2}x_{1}^{2}x_{2}^{2}+g$ and
$d_{t}^{2}\partial_{2}g=o1$. So
$h=\tfrac{1}{4}a_{1}a_{2}^{2}x_{1}^{2}x_{2}^{2}+o4$.

Now consider the geodesic $\eta$ which is just $\gamma$ rotated by $\pi/2$.
Then, by the same reasoning, if the projection $\eta_{r}$ in $K_{r}$ is a
geodesic, we must have that
$h=\tfrac{1}{4}a_{1}^{2}a_{2}x_{1}^{2}x_{2}^{2}+o4$. Since both444Note that
the powers of $a_{i}$ are distinct. must hold, we get
$\tfrac{1}{4}a_{1}a_{2}^{2}x_{1}^{2}x_{2}^{2}=\tfrac{1}{4}a_{1}^{2}a_{2}x_{1}^{2}x_{2}^{2}$
or $a_{1}=a_{2}$.

Remark. The two types of solutions of (3.5) in this proof do indeed occur. For
if $K_{0}$ is a plane or a cylinder with radius $1/a$, we get

$K(x_{1},x_{2})=\sqrt{a^{-2}-x_{1}^{2}}-a^{-1}=-\tfrac{1}{2}ax_{1}^{2}-\tfrac{1}{8}a^{3}x_{1}^{4}+O6\,.$

In this case, the Gaussian curvature is zero and $h=o4$. On the other hand,
for a sphere of radius $1/a$, we have

$K(x_{1},x_{2})=\sqrt{a^{-2}-x_{1}^{2}-x_{2}^{2}}-a^{-1}=-\frac{1}{2}(ax_{1}^{2}+ax_{2}^{2})-\frac{1}{8}(a^{3}x_{1}^{4}+2a^{3}x_{1}^{2}x_{2}^{2}+a^{3}x_{2}^{4})+O6\,.$

Here, the principal curvatures are equal and
$d_{t}^{2}\partial_{2}h=a^{3}\dot{x}_{1}^{2}x_{2}+o1$.

##  4 Cylinders Must Be Round

Now let $K_{0}$ be a convex, but not necessarily round, cylinder, invariant
under translations along the $x_{3}$-axis. Consider “polar” coordinates
$(\rho,x_{3},r)$ in $\mathbb{R}^{3}$ where $\rho$ is the arclength along the
simple, closed curve in the $x_{1}$-$x_{2}$ plane that defines $K_{0}$ as
illustrated in Figure 4.1.

Figure 4.1: _“Polar” coordinates in $\mathbb{R}^{3}$. _

###### Proposition 4.1

With the above assumptions, the projection $\Pi:K_{0}\rightarrow K_{r}$
preserves geodesics if and only if the non-zero principal curvature of $K_{0}$
is constant.

Proof. Since the Gaussian curvature is zero, the map from the cylinder to the
plane, given by $K_{0}(\rho,x_{3})\rightarrow(\rho,x_{3})$ is a bijective
isometry and so maps geodesics to geodesics. A geodesic $\gamma$ in $K_{0}$ is
(a) parallel to the $x_{3}$-axis, or (b) a circle in the $x_{1}$-$x_{2}$
plane, or (c) a curve $\gamma(x_{3})=(\rho(x_{3}),x_{3})$. Since $\gamma$ is a
geodesic, $\rho(x_{3})$ is affine and has a constant derivative
$\frac{d\rho}{dx_{3}}$. Assume $\gamma$ is a geodesic of type (c).

Now consider the projection $\gamma_{r}$ of $\gamma$ onto $K_{r}$. As with
$K_{0}$, we parametrize $K_{r}$ by the arclength $\rho_{r}$ of the defining
curve and $x_{3}$. It is clear that $\gamma_{r}$ is a curve
$x_{3}\rightarrow\rho_{r}(x_{3})$. Again, if $\gamma_{r}$ is a geodesic, then
$\frac{d\rho_{r}}{dx_{3}}$ is constant. Denote the non-zero principal
curvature of $K_{0}$ by $a(\rho)$. A reasoning similar to that of Lemma 3.2
gives that arclengths $\rho_{r}$ and $\rho$ travelled along each geodesic
relate as

$d\rho_{r}=\frac{1/a(\rho)+r}{1/a(\rho)}\,\,d\rho=(1+a(\rho)r)\,\,d\rho\,.$

Since the $x_{3}$ coordinates of $\gamma(t)$ and its projection
$\gamma_{r}(t)$ are the same, we get

$\frac{d\rho_{r}}{dx_{3}}=(1+a(\rho)r)\,\,\frac{d\rho}{dx_{3}}\,.$ (4.1)

Thus $\frac{d\rho_{r}}{dx_{3}}$ is constant if and only if $a(\rho)$ is
constant.

##  5 A $C^{1,1}$ Counter-example

Figure 5.1: _A straight cylinder of radius $r$ topped off by a hemisphere of
radius $r$. This surface is $C^{2}$, except on the circle where the cylinder
and the hemisphere meet. Here $\partial^{2}/\partial z^{2}$ has a
discontinuity. Since the first derivative changes gradually, this surface is
$C^{1,1}$._

We consider the round cylinder ‘topped off’ by a hemisphere both of radius
$r$, which gives a $C^{1,1}$ surface (see Figure 5.1). Denote this surface by
$S_{r}$. It is easy to convince oneself that $S_{1}$ and $S_{r}$ ($r>1$) are
regular, constant distance surfaces. Clearly, at every point (except where
$C^{2}$ does not hold) either (i) $a_{1}a_{2}=0$ or (ii) $a_{1}=a_{2}$.

###### Proposition 5.1

Let $S_{1}$, $S_{r}$, and $\Pi:S_{1}\rightarrow S_{r}$ be given as above. Let
$\gamma_{1}$ be the shortest geodesic connecting $P_{1}=(0,1,\pi/2)$ and
$Q_{1}=(0,-1/\sqrt{2},-1/\sqrt{2})$. The projection of $\gamma_{1}$ by $\Pi$
to $\gamma_{r}$ (connecting $P_{r}$ to $Q_{r}$ in $S_{r}$ ($r>1$)) is _not_ a
local geodesic near the point $M_{r}$ where $\gamma_{r}$ intersects the
boundary of the cylinder (see Figure5.1).

Proof. The geodesic $\gamma$ connects $P_{1}$ to $Q_{1}$, but we do not know
where it crosses over from the cylinder to sphere. So let us call that point
$M_{1}(\theta)$. We have

$P_{1}=(0,1,\pi/2)\;,\quad M_{1}(\theta)=(\sin\theta,\cos\theta,0)\;,\quad
Q_{1}=\left(0,\tfrac{-1}{\sqrt{2}},\tfrac{-1}{\sqrt{2}}\right)\,.$

It is easy to see that then the projection $\gamma_{r}$ of $\gamma$ connects
$P_{r}$ to $Q_{r}$ via $M_{r}(\theta)$ (the same $\theta$), where

$P_{r}=(0,r,\pi/2)\;,\quad M_{r}(\theta)=(r\sin\theta,r\cos\theta,0)\;,\quad
Q_{r}=\left(0,\tfrac{-r}{\sqrt{2}},\tfrac{-r}{\sqrt{2}}\right)\,.$ (5.1)

The projection of $\gamma_{r}$ consists of two pieces that live on $C^{2}$
surfaces with either curvature zero (the cylinder) or the sphere, and so each
of these two pieces is a geodesic in $S_{r}$.

Figure 5.2: _The two geodesic pieces of $\gamma_{r}$ in $S_{r}$. To the left,
the piece in the flattened out cylinder. To the right the piece that lies in
the hemisphere._

The first piece connects $P_{r}$ to $M_{r}$, see the left of Figure 5.2. In
the flattened out cylinder, it is the hypotenuse of the triangle with sides
$\pi/2$ and $r\theta$ and thus has length $\sqrt{\pi^{2}/4+r^{2}\theta^{2}}$.
The second piece lives in the sphere. Its length is $r$ times the angle
$\alpha$ between $M_{r}$ and $Q_{r}$. The cosine of $\alpha$ is given by the
dot product of the unit vectors parallel to $M_{r}$ and $Q_{r}$, which gives
$-\cos\theta/\sqrt{2}$. Thus the length of the second piece equals
$r\arccos\left(\tfrac{-\cos\theta}{\sqrt{2}}\right)$. Therefore, the length of
the projected curve $\gamma_{r}$ is given by

$\ell_{\theta}(\gamma_{r})=\sqrt{\frac{\pi^{2}}{4}+r^{2}\theta^{2}}+r\arccos\left(\frac{-\cos\theta}{\sqrt{2}}\right)\,.$

We need to minimize this over $\theta\in[0.\pi]$. It is an elementary calculus
exercise555Use that the derivative of $\arccos q$ equals $-1/\sqrt{1-q^{2}}$.
to see that this is minimized at $\theta$ satisfying
$\frac{\theta}{\sin\theta}=\frac{\pi/2}{r}$. We know that $\gamma$ is
minimizing in $S_{1}$. Therefore if we substitute $r=1$, we get
$\theta=\pi/2$. That same calculation for $r>1$ implies then that $\gamma_{r}$
(where $r>1$) is not globally minimizing in $S_{r}$.

Figure 5.3: _The tangent space $TS_{r}$ at $M_{r}$. The red curve corresponds
to the lift of $\gamma_{r}$. The branch to the left of the base point $M_{r}$
travels to $Q_{r}$ and the branch to the right travels $P_{r}$ (see (5.1))._

Figure 5.3 is a slightly impressionistic image of the tangent space $TS_{r}$
at $M_{r}$. The slope of $\gamma_{r}$ restricted to the lower half plane that
projects to the hemisphere equals 1. However the slope restricted the upper
half plane which can be identified with the rolled out cylinder, the slope
equals $1/r$. Thus $\gamma_{r}$ is not locally minimizing at $M_{r}$.

##  6 There are Other Projections that Preserve Geodesics

In this Section, we find a beautiful example of a family of projections
$\Pi_{k}:S_{k}\rightarrow S_{0}$ such that the surfaces
$\left\\{S_{k}\right\\}_{k\geq 0}$ foliate the space surrounding the boundary
$S_{0}$ of a convex body in $\mathbb{R}^{3}$. It is not known whether this is
possible for all such surfaces $S_{0}$. Our construction is based on Section 4
and works for (convex) cylinders.

Consider a general, not necessarily round, convex, cylinder $S_{0}$. It
consists of parametrized closed curve $c(t)$ and lines though that curve,
orthogonal to it, as sketched in Figure 4.1. We can define a $S$ outside
$S_{0}$ by first defining a new curve in $\mathbb{R}^{2}$:

$C(t)=c(t)+r(t)\hat{n}(t)\,.$

Here $\hat{n}(t)$ is the unit normal to $c(t)$ and $r(t)$ is a non-negative
distance. Let us denote the curvature of $c(t)$ by $a(t)$. According to (4.1),
the projection $\Pi:S\rightarrow S_{0}$ between the corresponding cylinders
preserves geodesics if

$r(t)=\frac{k}{a(t)}\,,$

where $k$ is a positive constant. The cylinder $S_{k}$, $k\geq 0$ is given by
the lines through $C_{k}$ orthogonal to plane of $C_{k}$. Thus the projection
$\Pi_{k}:S_{k}\rightarrow S_{0}$ preserves geodesics. Notice that we have to
be careful here, because now the back and forth projections are not inverses
of one another anymore (see Proposition 2.1).

Figure 6.1: _the cylinders orthogonal to the plane of the figure through the
blue and the green curves, have projections to the cylinder orthogonal to the
red ellipse that preserve geodesics._

We take as an example the ellipse given by

$c(t):=(\alpha\cos(t),\beta\sin(t))\quad\;\;{\rm and}\;\;\quad
C_{k}(t)=c(t)+\frac{k}{a(t)}\;\hat{n}(t)\,,$

where $k$ is a non-negative constant. Standard calculations give $C(t)$
explicitly as

$C_{k}(t)=\left(\left(\alpha+\frac{k}{\alpha}(\alpha^{2}\sin(t)^{2}+\beta^{2}\cos(t)^{2})\right)\cos(t),\left(\beta+\frac{k}{\beta}(\alpha^{2}\sin(t)^{2}+\beta^{2}\cos(t)^{2})\right)\sin(t)\right)\,.$

We used MAPLE in Figure 6.1, to draw the ellipse $c(t)=(\cos(t),3\sin(t))$ in
red, $C_{k}(t)$ for $k=0.5$ in green, and for $k=1.5$ in blue. Note that these
remarkable curves lose convexity for large enough $k$. We leave it to the
reader to establish that for large $k$, the projection
$\Pi_{k}^{\prime}:S_{0}\rightarrow S_{k}$ is not single-valued and therefore
does not preserve geodesics.

## References

  * [1] S. S. Akmal, M. N. Nam, J. J. P. Veerman, _On a Convex Set with Nondifferentiable Metric Projection_ , Optimization Letters, Vol 9, Issue 6, 1039-1052, 2015.
  * [2] A. Blokh, M. Misiurewicz, L. Oversteegen, _Sets of Constant Distance from a Compact Set in 2-Manifolds with a Geodesic Metric_ , Proceedings of the American Mathematical Society, 137, 733-743, 2009.
  * [3] M. Brown, _Sets of Constant Distance from a Planar Set_ , Michigan Math. J. 19, 321-323, 1972\.
  * [4] M. P. do Carmo (1976), _Differentiable Geometry of Curves and Surfaces_ , Prentice-Hall, London.
  * [5] L. S. Fox, P. Oberly, J. J. P. Veerman, _One-Sided Derivative of Distance to a Compact Set_ , Rocky Mountain Journal of Mathematics 51 (2), 491-508, 2021.
  * [6] P. Michel, _The ESA Hera Mission: Detailed Characterization of the DART Impact Outcome and of the Binary Asteroid (65803) Didymos_ , The Planetary Science Journal, 3: 160, 2022 (July).
  * [7] J. Mikes, _Geodesic Mappings of Affine-Connected and Riemannian Spaces_ , J. Math. Sciences, 78 (3), 1996, 311-333.
  * [8] J. Mikes, V. E. Berezovski, E. Stepanova, and H. Chudá, _Geodesic Mappings and their Generalizations_ , J. Math. Sciences, 217 (5), 2016, 608-623.
  * [9] S.P. Naidu e. a., _Radar observations and a physical model of binary near-Earth asteroid 65803 Didymos, target of the DART mission_ , Icarus, 348, 133777, 2020.
  * [10] J. J. P. Veerman (2020), _Navigating Around Convex Sets_ , The American Mathematical Monthly, 127:6, 504-517,
  * [11] J. B. Wilker, _Equidistant Sets and their Properties_ , Proceedings of the American Mathematical Society, 47 (2): 446-452, 1975.