rogueviz:: added URLs to various visualizations

This commit is contained in:
Zeno Rogue 2021-04-03 00:57:37 +02:00
parent 604083cb0e
commit a86fb6cd4d
15 changed files with 41 additions and 13 deletions

View File

@ -569,6 +569,8 @@ auto hook = addHook(hooks_args, 100, readArgs)
[] (presmode mode) {
slidecommand = "Banach-Tarski switch";
slide_url(mode, 't', "Twitter link", "https://twitter.com/ZenoRogue/status/1001127253747658752");
if(mode == 3) {
while(gamestack::pushed()) stop_game(), gamestack::pop();
banachtarski::bmap = false;

View File

@ -350,7 +350,7 @@ int ah = addHook(hooks_args, 100, readArgs) +
gmatrix0 = gmatrix;
rogueviz::collatz::start();
})
}, [] (presmode m) { slide_url(m, 'y', "YouTube link", "https://www.youtube.com/watch?v=NqPUwA_A0_k"); })
});
});

View File

@ -350,10 +350,12 @@ auto fifteen_hook =
[] (presmode mode) {}
});
auto add = [&] (string s, string lev, string text) {
auto add = [&] (string s, string lev, string text, string youtube = "") {
fifteen_slides.emplace_back(
tour::slide{s, 100, LEGAL::NONE | QUICKGEO, text,
[=] (presmode mode) {
if(youtube != "")
slide_url(mode, 'y', "YouTube link", youtube);
string fname = "fifteen/" + lev + ".lev";
if(!file_exists(fname)) {
slide_error(mode, "file " + fname + " not found");
@ -376,9 +378,9 @@ auto fifteen_hook =
};
add("15", "classic", "The original Fifteen puzzle.");
add("15+4", "fifteen", "The 15+4 puzzle by Henry Segerman.");
add("15+4", "fifteen", "The 15+4 puzzle by Henry Segerman.", "https://www.youtube.com/watch?v=Hc3yfuXiWe0");
add("15-4", "sphere11", "The 15-4 puzzle.");
add("coiled", "coiled", "Coiled fifteen puzzle by Henry Segerman.");
add("coiled", "coiled", "Coiled fifteen puzzle by Henry Segerman.", "https://www.youtube.com/watch?v=rfAEgxNEOrQ");
add("Möbius band", "mobiusband", "Fifteen puzzle on a Möbius band.");
add("Kite-and-dart", "kitedart", "Kite-and-dart puzzle.");

View File

@ -513,6 +513,7 @@ auto hook = addHook(hooks_args, 100, readArgsG)
"See grigorchuk.cpp for more comments.",
[] (tour::presmode mode) {
slide_url(mode, 'p', "a paper about Grigorchuk group", "https://arxiv.org/pdf/math/0607384.pdf");
if(mode == pmStart) {
grigorchuk::grig_limit = 10000;
gamestack::push();

View File

@ -109,12 +109,12 @@ auto hypcity_ah = arg::add3("-hypcity", enable)
hypcity_slides.emplace_back(
slide{"Introduction", 999, LEGAL::NONE,
"Here we put a 3D model of a city into various geometries. Don't forget to try changing RogueViz projection and view range settings!\n\n"
"Model by Emile Johansson, downloaded from: https://sketchfab.com/3d-models/night-city-p2-82637933a7cb4fafadb0e2a79415c438\n\n"
"Thanks to Nico Belmonte for the idea of using this model.\n\n"
"Remember to try different projections (press '1')!"
,
[] (presmode mode) {}
});
[] (presmode mode) {
slide_url(mode, 'm', "original model by Emile Johansson", "https://sketchfab.com/3d-models/night-city-p2-82637933a7cb4fafadb0e2a79415c438");
slide_url(mode, 't', "original Tweets by Nico Belmonte", "https://twitter.com/philogb/status/1375147728389476356");
}});
auto add = [&] (string s, string text, int dim, reaction_t setter) {
hypcity_slides.emplace_back(

View File

@ -284,6 +284,7 @@ auto hchook =
"Move with mouse/arrows/PgUpDn. Press '5' to enable animation, 'o' to change ring size.\n\n",
[] (presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://youtu.be/3WejR74o6II");
setCanvas(mode, '0');
slidecommand = "animation";

View File

@ -155,6 +155,7 @@ tour::slide *gen_noniso_demo() {
slide{"Non-isotropic geometry demo", 999, LEGAL::NONE | QUICKSKIP,
"This is a presentation of non-isotropic geometries.",
[] (presmode mode) {
slide_url(mode, 'p', "paper about non-isotropic geometries", "https://arxiv.org/abs/2002.09533");
if(mode == pmStart) {
stop_game();
set_geometry(gCubeTiling);

View File

@ -1489,6 +1489,11 @@ auto shot_hooks = addHook(hooks_initialize, 100, create_notknot)
"Some experiments with weird portals. Press '5' to change between available experiments.\n"
,
[] (tour::presmode mode) {
slide_url(mode, 'k', "knotted portal (YouTube)", "https://www.youtube.com/watch?v=eb2DhCcGH7U");
slide_url(mode, 'h', "self-hiding knot portal (YouTube)", "https://www.youtube.com/watch?v=vFLZ2NGtuGw");
slide_url(mode, 'n', "non-Euclidean portal in Nil (YouTube)", "https://www.youtube.com/watch?v=2K-v8tK68AE");
slide_url(mode, 's', "spherical portal (YouTube)", "https://www.youtube.com/watch?v=PerPeQFu5gw");
slide_url(mode, 'c', "Cat Portal in Solv (YouTube)", "https://www.youtube.com/watch?v=CGiSxC9B6i0");
setCanvas(mode, '0');
using namespace tour;
if(mode == pmStart) {

View File

@ -686,6 +686,7 @@ slide dmv_slides[] = {
"This is a 3D model of Ascending and Descending by Lucian B. It is based on an optical illusion."
,
[] (presmode mode) {
slide_url(mode, 'm', "link to the original model", "https://3dwarehouse.sketchup.com/model/3e6df6c24a95f583cefabc2ae69d584c/MC-Escher-Ascending-and-Descending");
ply_slide(mode, gCubeTiling, mdPerspective, false);
if(!ply::staircase.available()) return;
if(mode == pmStart) {
@ -1004,6 +1005,7 @@ slide dmv_slides[] = {
"(the animation is not included with RogueViz)"
,
[] (presmode mode) {
slide_url(mode, 'i', "Instagram link", "https://www.instagram.com/p/B756GCynErw/");
empty_screen(mode);
// show_picture(mode, "rogueviz/nil/emty-ring.png");
// show_animation(mode, "rogueviz/nil/emty-ring.mp4", 720, 900, 300, 30);
@ -1050,6 +1052,7 @@ slide dmv_slides[] = {
"We have used the trick mentioned before to move into the Nil space. Here are the results."
,
[] (presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/watch?v=DurXAhFrmkE");
ply_slide(mode, gNil, mdGeodesic, true);
}
},
@ -1082,6 +1085,7 @@ slide dmv_slides[] = {
"A perpetuum mobile in Nil as the final slide. That's all for today!"
,
[] (presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/watch?v=mxvUAcgN3go");
setCanvas(mode, '0');
if(mode == pmStart) {
stop_game();

View File

@ -323,7 +323,10 @@ slide *gen_rvtour_mixed() {
rvslides_mixed.emplace_back(slide{
"RogueViz", 999, LEGAL::ANY,
"This presentation is mostly composed from various unsorted demos, mostly posted on Twitter and YouTube. Press Enter to continue, ESC to look at other functions of this presentation.",
[] (presmode mode) {}
[] (presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/user/ZenoTheRogue");
slide_url(mode, 't', "Twitter link", "https://twitter.com/zenorogue/");
}
});
callhooks(hooks_build_rvtour, "mixed", rvslides_mixed);

View File

@ -215,7 +215,9 @@ auto msc =
"Here we see random walk in various geometries.\n"
"Press '5' to reset.\n"
,
[] (tour::presmode mode) {}
[] (tour::presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/watch?v=sXNI_i6QZZY");
}
});
rw_slide(v, "Euclidean plane", "In Euclidean plane, the random walk always returns to the neighborhood of the starting point with probability 1.", [] {
set_geometry(gEuclid);

View File

@ -143,8 +143,9 @@ namespace rogueviz {
inline hookset<void(string, vector<slide>&)> hooks_build_rvtour;
slide *gen_rvtour();
template<class T> function<void(presmode)> roguevizslide(char c, const T& t) {
return [c,t] (presmode mode) {
template<class T, class U> function<void(presmode)> roguevizslide(char c, const T& t, const U& f = [] (presmode mode) {}) {
return [c,t,f] (presmode mode) {
f(mode);
patterns::canvasback = 0x101010;
setCanvas(mode, c);
if(mode == 1 || mode == pmGeometryStart) t();

View File

@ -242,7 +242,10 @@ auto hchook = addHook(hooks_drawcell, 100, draw_snow)
"\n\n"
"You can use mouse to look in different directions. Press 5 to turn the automatic movement on or off. Press 'o' to change density and shape."
,
[] (tour::presmode mode) {}
[] (tour::presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/watch?v=leuleS9SpiA");
slide_url(mode, 't', "Twitter link", "https://twitter.com/ZenoRogue/status/1245367263936512001");
}
});
snow_slide(v, "Euclidean geometry", "This is the Euclidean space. Looks a bit like space flight in some old video games.", [] {
set_geometry(gCubeTiling);

View File

@ -250,6 +250,7 @@ int phooks = arg::add3("-stair", enable)
if(mode == pmStart) staircase::make_staircase();
slidecommand = "staircase menu";
if(mode == pmKey) pushScreen(staircase::showMenu);
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/watch?v=HZNRo6mr5pk");
}}
);
})

View File

@ -288,6 +288,8 @@ auto hook = 0
"Press o to change the density.",
[] (presmode mode) {
slide_url(mode, 'y', "YouTube link", "https://www.youtube.com/watch?v=bKzibaNqEog");
slide_url(mode, 't', "Twitter link", "https://twitter.com/ZenoRogue/status/1247900522905886723");
setCanvas(mode, '0');
if((mode == pmStop || mode == pmGeometry) && rug::rugged) rug::close();