Figures 7.2 and 7.3 Goings on in the space-time aquarium

figures
code
R
Code
library(dplyr)
library(plotly)
library(plot3D)
Code
time_space_data <- read.csv("tg-day-in-the-life.csv")

locations_0 <- unique(select(time_space_data, x, y)) %>%
  mutate(id = 1:5, t = 0)
locations_24 <- locations_0 %>%
  mutate(t = 24)

lines3D(time_space_data$x, time_space_data$y, time_space_data$t, 
        xlim = c(min(time_space_data$x) - 2, 
                 max(time_space_data$x) + 2),
        ylim = c(min(time_space_data$y) - 2, 
                 max(time_space_data$y) + 2),
        xlab = "x", ylab = "y", zlab = "Time, t",
        col = "#00000080", lwd = 2, alpha = 0.5, 
        phi = 25, theta = 60, bty = "g", scale = FALSE)

points3D(locations_0$x, locations_0$y, locations_0$t, 
         add = TRUE, col = "black")

arrows3D(locations_0$x, locations_0$y, locations_0$t, 
         locations_24$x, locations_24$y, locations_24$t, 
         add = TRUE, lty = "dashed", lwd = 0.5, col = "black")

Code
time_space_data <- read.csv("tg-meeting.csv")

trace <- time_space_data %>% 
  filter(id == 1)

lines3D(trace$x, trace$y, trace$t, 
        xlim = c(-6, 6), ylim = c(-6, 6),
        xlab = "x", ylab = "y", zlab = "Time, t",
        col = "black", lwd = .5, phi = 25, theta = 60, 
        bty = "g", scale = FALSE)

for (i in 2:8) {
  trace <- time_space_data %>% filter(id == i)
  lines3D(trace$x, trace$y, trace$t, add = TRUE,
          xlim = c(-6, 6), ylim = c(-6, 6),
          col = "black", lwd = .5)
}

Code
# License (MIT)
#
# Copyright (c) 2023 David O'Sullivan
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to  permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

© 2023 David O’Sullivan