Shared posts

07 Feb 17:48

Renga in Blue: Philosopher’s Quest: Three openings

by Jason Dyer
Adam.hill

More Mainframe IF!

I’m going to make a clarification that might be a little too much inside baseball, but Jimmy Maher brought something up I felt deserved a more detailed response. I’ll get back to the main gameplay (and what might the cruelest maze ever) next time.

There are three versions of this game.

A mainframe version from 1979, titled Brand X.
A commercial version for BBC Micro computer published by Acornsoft in 1982, titled Philosopher’s Quest.
A commercial version for various computers published by Topologika in 1987, also titled Philosopher’s Quest.

I’m playing the mainframe version, ported to be playable on modern computers by Graham Nelson, Adam Atkinson, and David Kinder.

The 1982 version was shortened from the mainframe version. If that was the only version titled Philosopher’s Quest, I probably would consider the title assigned to a different game and say I was playing Brand X.

Via BeebMaster.

Via BeebMaster. No doubt tape capacity played some role in truncating the original game.

However, the 1987 version restored the original material (with some tweaks). I hence consider the title Philsopher’s Quest to be the “author’s choice” for the game and am calling it that, although I confess I had some angst over the decision (which indicates, possibly, I’m getting into this a little too much) but I have the side justification that most people searching for this game would know it by the latter title.

Here’s the 1979 version, reproduced from my last post:

You are standing in a small shop which normally has various goods displayed for sale. There are areas of the shop obviously intended for the display of treasure. There is an exit south, above which hangs a large sign, which reads:

philsign

There is an aqualung with a full tank of oxygen here. It
turns on automatically upon contact with water.
There is a fluffy lace-edged cushion here.
There is a bunch of keys here.
A piece of sausage is curled up here.
There is a small teabag on the floor here.

Here’s how the 1982 version starts:

You are standing in a small shop which normally has goods for sale. There are areas of the shop intended for the display of treasure. There is an exit south, above which hangs a sign, reading: “Leave treasure here. Please note that only two objects may be removed from this shop. So choose carefully!”
There is an aqualung here
There is a bunch of keys here
There is a cup of tea here
There is a steel rod here

Finally, the 1987 version:

You are standing in a small shop which normally has various goods displayed for sale. Areas of the shop are obviously intended for the display of treasure. Above an exit south hangs a large sign, which reads:

Adventurers please note only two implements may be removed from this shop under penalty of death.
So choose carefully!

A piece of sausage is curled up here.
There is a fluffy lace-edged cushion here.
A small teabag is lying close at hand.
There is a aqualung with a full tank of oxygen here. It turns on automatically upon contact with water.
There is a bunch of keys here.

Note that the references to Zork and Adventure are stripped away from the sign in both the commercial versions (kind of like how early Zork made a Wumpus reference but dropped it later, likely due to obscure injokiness).

Also not only does the 1982 version have some item differences, it mentions explicitly to drop treasures in the shop while the other two versions don’t. This makes me suspect treasures go somewhere else in those versions.

The difference in objects might be a sufficient hint to figure out which three are needed (remember, you can “cheat” and get one extra past the sign’s rule). Since the aqualung, keys, and tea are the only shared objects, I suspect those are the right ones (and indeed I think I know where all three are used).


21 Mar 05:08

Get Voxel Farm!

by Miguel Cepero
Almost a week ago we announced new licensing plans for Voxel Farm. We have gone a long way since I asked you the readers what would you like to come out of this project. It is hard to believe three years have passed.

So you have three different Voxel Farm flavors to pick from: Creator, Indie and Pro. But before adding anything else, a word of caution: There are rough edges. The documentation lacks coverage for many of the things you can already do with the engine.

We are committed to this project for the long run, and we will be providing constant updates. We want to deliver rather than make promises or hype new features. I do not see this release as early access, or as request for the community to crowd-fund us. This software is released as-is.

In the proper hands there is a lot that can be achieved. There is no question you can use Voxel Farm today to make your next-gen killer game or app. Also, if you run into trouble you can always contact us and we will do our best to get you back on track.

The INDIE license gets you access to our SDK and the Voxel Studio creation tool. Here the engine core remains in binary form. These are C++ libs you can link into your project. The SDK contains a dozen of different examples, including full source code for a Unity plugin. Very important: the Unity plugin uses a DLL, so your game will be Windows only. Also you will need to develop on a Windows machine. There is a one time fee of $295 USD, and a recurring fee of $19 USD per month. When your project has grossed more than $100,000 USD, a 5% royalty fee is applied. While your subscription is active, you will get free updates perpetually to the SDK, example code and tools.

The PRO license gets you full source code, plus the SDK, plus Voxel Studio. There is a one time fee of $995 USD and then a recurring monthly fee of $95 USD. If your project makes more than $100,000 USD, a 2% royalty fee applies. There is an important twist here: The PRO license is organization-wide. It means your company only needs to purchase one license and it can be re-used by many different individuals within the organization. This also applies to the Voxel Studio tool. The INDIE license, on the other hand, is for just one individual.

And there is the CREATOR license. Here you get the Voxel Studio tool for $19 USD a year. Voxel Studio allows creating new worlds from scratch, including the different materials available for procedural generation and voxel editing. It also has fully functional L-System and grammar editing. The current version has limited exporting capabilities, so at the time your creations may be locked inside Voxel Studio, or you may be limited to collaborating with people and groups who have licensed INDIE or PRO. Whatever you create using this tool belongs to you. This is pretty much a content creation tool like Photoshop or Maya.

You can check out the license agreements in our online documentation.

As usual let me know what you think. There is a lot of hard work into this project, the team has done great. I also want to thank all of you who stopped by at our booth at GDC. It was great meeting you all and sharing our vision of the future with you.


(Photo: Michael and Rados at our booth at GDC 2015)

27 Feb 10:04

Physical Map Projection Mapped

by Chris Watson

Projection mapping offers exciting opportunities to animate and alter our perceptions of a physical space through light. More often the physical space projected on to is buildings with mesmeric light sequences and often contextual narratives.

Image © 2015 Dalziel and Pow

Much like Louis Daguerre & Charles Bouton achieved a sense of movement through altering the play of light on a large transparent screen with the Diorama in 1822, projection mapping can create this immersive and moving scene onto any 3d object or screen. Through altering the play of light with large amounts of lumens generated by today’s digital projectors, artists and designers can become the theatrical painters without being limited to dark purpose built venues and opaque or translucent paints, instead projections can be achieved in other lighting situations with custom built screens & pixels.

Dalziel + Pow have moved the play of light onto a physical map where they experiment with different narratives using the terrain of Berlin to abstract and segment their sense of movement. I like the idea that with this being an indoor permanent installation the growth and development of the narratives can evolve and change from the projection mapping unlike many projection mapping spectacles that are single events. It is exciting from a data visualisation point of view to see how they could experiment with this, ‘expect to see dynamic data and live online feeds added in the near future.’ (Dalziel and Pow, 2015).

Dynamic data could be live narratives from geotextual tweets, visual iconography of weather, real time data of subway, air or live visuals with imagery of scenery, architecture that are geotagged within the framed boundaries of the physical map then abstracting into their segments in a realtime collaborative cartophoto-montage.

Primark Berlin: Projection Mapping Project from Dalziel and Pow on Vimeo.

It is exciting to see how this art form will evolve with physical cartographic representations and their inter-play with light immersing us through digital mappings.

http://www.dalziel-pow.com/projects/digital-projection-mapping-installation

See also https://www.youtube.com/watch?v=lX6JcybgDFo for projection mapping onto moving physical objects much more aligned to the spectacle characteristics of the Diorama. Or even see this http://www.theicebook.com/The_Icebook.html.

23 Feb 22:28

Clojure Gazette 115

by Clojure Gazette
Clojure Gazette 115
Macros!

Clojure Gazette

Issue 115 February 22, 2015


Editorial

Hi homoicons,

Macros were one of the things that first drew me to Lisp. The promise of a language that you could extend to suit your problem intrigued me. Like many beginners, I would write small macros to do small tasks for me, so I wouldn't have to write out the code in longhand. Then I would weep when I had to go back to macroless languages.

My understanding of macros has evolved to where I actually rarely use macros. I use functional constructs and data-driven constructs much more. I just wasn't so aware of them before. But even though I don't use macros as much, they are still hugely powerful and important.

Macros are what enable core.async to be a library and not a core part of the language. They let David Nolen experiment with core.match. In short, it enables a kind of linguistic democracy. Clojure is a relatively small language, itself written largely of macros. And that same macro material is available to us as programmers.

Rock on!
Eric Normand <eric@lispcast.com> @ericnormand

PS Learn more about the Clojure Gazette and subscribe. Learn about advertising in the Gazette.

Practical Common Lisp: Macros: Defining Your Own


I always liked this (fictional?) history of the origin of macros.

Clojure for the Brave and True: Writing Macros


The Brave Clojure chapter on macros is a pretty good introduction to macros in Clojure.

A Scheme Syntax-Rules Primer


Scheme has what are known as Hygienic Macros, which is an attempt to forever rid programmers of the dangers of variable capture. As a macro writer, you're transforming other people's code. You can accidentally rebind a local that that other person was trying to use. Or you could try to use a local that the code you're transforming has rebound. Scheme has a system called Syntax Rules to eliminate this problem.

Clojure takes a different approach which was kind of controversial when it happened. All of the discussion around macros at the time revolved around how to make them safer and safer, to the point of being provably safe. Clojure's approach to macro safety was similar to its safety approach in other areas: make it easy to do the right thing, even though you still allow the wrong thing.

Sweet.js


Would you believe that Javascript has macros? They are of the Scheme hygienic macro variety. Some people have done some pretty wacky stuff with them, including a Clojure-like language called Ki that sits inside a macro.

Template Haskell


Would you believe that Haskell has macros? It's called Template Haskell. The homoiconic nature of Lisp is touted a lot, but Haskell is also homoiconic in the sense that the AST is available as a Haskell data structure. The AST is just data and can be manipulated in Haskell. If you write a function that takes an AST and returns a new AST, and hook that into the compiler, you've got yourself a macro. Here's a nice tutorial.

On Lisp


Back before Paul Graham was a startup messiah, he was spreading the Lisp gospel. This book could be the single best book on the practical uses of Lisp macros. It's available free for download. I remember studying these macros, especially the more mind blowing ones, to really get what was going on. Be sure to check out the continuation macros.

Let Over Lambda


Now, I usually don't link to things I haven't read. But this book comes up so often I thought it would be neglectful not to link to it. Now with that warning, I'll add another: this is one of those books that is a labor of love. It takes an unconventional view of macros ("safety is for beginners") and takes that view very far. I have had this book on my long reading list for a while, but now that I'm reminded of it, I'm putting it on my short list. Oh, and lots of it is free online.

Mastering Clojure Macros


I'm currently reading this book (about halfway through, though I've skimmed sections from the second half). The first half is basic macro tutorial, but from a Clojure perspective. Although a lot of it I already knew, I did learn several things about Clojure macros that I didn't know before. The rest of the book looks to get more nitty gritty with practical macros you'd actually want to use. I say "use" and not write because a lot of the macros it talks about are simply macros from other libraries. I was disappointed that the delimited continuation chapter does not explain how to write one, as with some of the other macros. For instance, it teaches you how to use criterium, which has a macro for testing the performance of your code. The theme of the book seems to be more "look how the language can be extended without even changing the language", not "people are doing macro wizardry, and here's how you can too". I expect the latter from a macro book, so I would recommend On Lisp before this, even if you are into Clojure more than Common Lisp.

Clojure: Deep Walking Macros Youtube


This is a great introduction on how to do some of the more code-transforming macros in Clojure, from Tim Baldridge, who wrote the core.async go macro.
Copyright © 2015 LispCast, All rights reserved.


unsubscribe from this list    change email address    advertising information

23 Feb 22:28

Paper Draft: "Ceptre: A Language for Executable Game Descriptions"

by Chris Martens
I briefly interrupt this recent series on Twine to announce that I've recently completed a paper draft on my thesis programming language, Ceptre (pdf, 8 pages):

Abstract

We present a language called Ceptre in which we unify the concepts underlying several rule-based game design tools, such as Kodu, PuzzleScript, and Inform 7. We illustrate how to capture common mechanical idioms found in these frameworks, such as movement, item acquisition, and agent-based simulation, without specializing anything in Ceptre to those ideas. By distilling the essence of several systems in one using a small, general set of primitives (based on linear logic), we provide a setting in which to recombine fragments of existing world models and to define new ones, freeing designers from genre constraints and assumptions. Our eventual aim is to implement this language as a prototyping tool for game logics and mechanics.
From a PL perspective, this paper introduces the ideas behind forward-chaining linear logic programming, as well as the construct of stages that I extend it with, in order to describe game mechanics.
23 Feb 03:26

Clojure Weekly, Feb 6th, 2015

Welcome to another issue of Clojure Weekly! Or should I say biweekly? I’m deep into an Haskell project these days (God forbid) so my daily Clojure is reduced. Despite this annoying bit, here’s the latest issue. That’s it, enjoy!

Clojure for Lispers transcript Oldie but goodie, here’s a transcription of “Clojure for Lispers”, one of the first public presentation Rich ever gave after making Clojure public. Its full of philosophical perls, especially toward the end, where the plan for Clojure world domination is revealed in more details: continuations, tail recursion, lexical scope, classes and OO and whatnot. Good to have it a searchable form if you don’t want to watch the entire video to find for a specific bit.

xsc/rewrite-clj Well description is pretty much all you need to know. The background of this is a talk by @cgrand that I enjoyed a while ago, talking about challenges in editor parsing and formatting. Space and indentation preserving transformations are not an easy problem but this library seems to contain all the necessary tooling. It also allows zipper traversal that is space/ident-aware. Use when your project requires styled output of Clojure forms.

ptaoussanis/sente So the time has come for your web-site to become “real-time”. One solid approach is certainly server-side push over one of the technologies available, such as WebSockets. But then you have to handle a few things, like reconnections, browser differences, message encoding, Ajax fallback and much more. Sente implements that thin layer on top of this bidirectional communication. It is based on http-kit (so you can expect those 600k+ concurrent connections) and core.async (the best model out there to handle async events from inside a terse API).

trptcolin/clojureslim Fitnesse is the venerable tool that allows input for acceptance tests as tables. In testing automation process it could be a nice tool to put in front of a customer to obtain verification for a feature (and maybe input a few more rows of tests). Over the years it got maintained and expanded. Slims are the “plugins” that allow Fitnesse fixtures to be written in other languages. Of course there is one for Clojure, although it appears to be in its initial state of 3 years ago. Nonetheless, I’m happy to give it a go for some project of mine that fits very well the table model.

clojure/tools.namespace tools.namespace is a required dependencies for so many projects that it could be already in your path without you noticing. It provides accurate reloading capabilities for namespaces, an essential feature for any live coding tool, being this the repl or other kind. Code analysis libraries for instance need to walk source folders to inspect namespaces and load them. It’s also a fundamental piece in components systems, where the restart of a component often means reloading of the corresponding namespace (and dependencies).

semperos/clj-webdriver Years have passed since I last developed some browser automation. Well, glad to see how easy it is now, but remembering very well how low level it used to be. Anyway, great clj wrapper around Selenium web driver. As expected the lispy aspect translated into a pleasant automation API called Taxi. It’s all well documented and samples are easy to find. The user group is alive and answering questions. Setup a working example was literally 3 lines of clojure.

23 Feb 03:25

Your Flying Car is Ready: Amazing Programming Tools of the Future, Today!

by Craig Stuntz

That’s the title of my presentation at Dog Food Conference 2014, 29-30 September, in Columbus, Ohio. If you found my post on "Test-Only Development" with the Z3 Theorem Prover was interesting, then you’ll love this.

What if simply writing "unit tests" was enough to produce a program which makes them pass? What if your compiler could guarantee that your OpenSSL replacement follows the TLS specification to the letter? What if you could write a test which showed that your code had no unintentional behavior?

Microsoft Research is well known for its contributions to Kinect, F#, the Entity Framework, WorldWide Telescope, and more, but it’s also the home of a number of programming tools which do things which many programmers would consider surprising, if not impossible. But they work, and in this session you’ll see them in action.

Like the idea of code contracts, but concerned about runtime performance and errors? The Dafny language can check contracts at compile time. Sounds a bit magical, but it works! I’ll use the Z3 theorem prover to generate working programs from specifications alone. Sound impractical? I’ll explain how it is used to make Hyper-V and Windows Azure secure. I’ll show the F7 specification language for F# and relate how its authors used it to not only produce a TLS implementation which probably follows the spec, but to also identify dangerous holes in the TLS specification itself. You’ll learn how Amazon uses the TLA+ specification language to prove that there are no edge cases in its internal protocols.

Far from being research toys, these tools are in daily use in cases where stability, security, and reliability of code matters most. Can they help with your hardest problems? You might be surprised!

Share This | Email this page to a friend

23 Feb 03:24

Persistent Vector Performance

This is a very detailed blogpost related to persistent/transient vector performance, with benchmarks and plots. I also improved the overall vector performance "by accident".
23 Feb 03:23

Rich Hickey on Values

by encho81

Rich Hickey talks about the benefits of value oriented programming. I like the explanations on how values make best interfaces and how they reduce coordination and thus help making software testing easier. Great twist at the end about the current/forthcoming ‘Space Age’ in technology.

23 Feb 03:23

Procedural textures in WebGL with Babylon.JS

by Etienne Margraff_

This article talks about procedural textures in WebGL and how Babylon.JS can help you using and creating them.

This feature is part of the Babylon.JS v2.0 release. Read more about it here : http://blogs.msdn.com/b/eternalcoding/archive/2015/02/18/what-s-new-in-babylon-js-v2-0.aspx

Feel free to contact me on twitter (@meulta) to ask me any question about this article.

What are Procedural Textures ?

clip_image002

In classic texturing, we use 2D images, often pictures that have been shaped specifically to match an object. Let’s imagine you are creating a medieval fantasy game, working on a dwarf pub, where there are multiple, big, "old school" wooden tables.

With classic 2D texturing, you have 3 choices:

  • Create a single texture and use it on all of the tables (but every table is going to look the same)
  • Create a collection of various wood textures and apply them randomly to each table
  • Create a separate texture for each table, insuring that they each look different

No choice seems to be a good one. Enter procedural textures.

Procedural texturing is a way to programmatically create a texture.

There are 2 types of procedural textures: code-only, and code that references some classic 2D images, sometimes called 'refMaps' or 'sampler' images.

One main advantage of procedural textures is that they are written using a fragment shader (using GLSL in the case of Babylon.js). That means that the code generating the texture is executed by the GPU and not the CPU (that is to say, NOT executed in JavaScript code). This has a huge performance impact in a positive way because in WebGL, JavaScript/CPU time is a critical resource: the more is done by the GPU, the better.

Procedural textures can be generated only once to create the texture which is put into cache or every 1, 2, 3, or 4, or more frames to be able to create an animated texture (like fire).

You can get more information about procedural textures here : http://en.wikipedia.org/wiki/Procedural_texture

How to use standard procedural textures in Babylon.JS ?

Like any other feature in Babylon.JS, the best way to test procedural textures (PT) is to use our playground (http://www.babylonjs-playground.com).

You can find a full sample using all standard procedural textures under the Custom menu :

clip_image003

Using a procedural texture is done the exact same way it is done for classic textures.

You first have to create a Material object, attached to the current scene :

var marbleMaterial = new BABYLON.StandardMaterial("marbleMat", scene);

Then you create the PT using one provided by default, or one you created yourself :

var marbleTexture = new BABYLON.MarbleProceduralTexture("marbleText", 512, scene);

Finally, you have to set the material associated to the mesh you want to apply the texture to :

square.material = marbleMaterial;

The result in this case is a random marble texture :

clip_image005

If you want to see the whole code and play with it, you can go there : http://www.babylonjs-playground.com/#1XPCZC#3

You will also see that some procedural textures have additionnal custom properties. For the marble PT, you can set the number of tiles you want to generate in height and width. Default is 3 but you can go far more than that :

marbleTexture.numberOfTilesHeight = 6;
marbleTexture.numberOfTilesWidth = 6;

clip_image007

There are a lot more standard PT available by default with Babylon.JS like Fire, Wood or Road.

clip_image009 clip_image011

How to create a custom procedural texture in Babylon.JS ?

As I told you earlier, a procedural texture is an image generated by the GPU using a pixel shader.

If you do not know what a Pixel Shader is I recommend you read this great article by my friend David Catuhe : http://blogs.msdn.com/b/eternalcoding/archive/2014/04/17/learning-shaders-create-your-own-shaders-with-babylon-js.aspx

Basically : it is a piece of code that will be called for each pixel the GPU need to render on a specific surface. The syntax is close to C and it always contains at least the main function. The role of this function is to define the color for the current pixel using the gl_FragColor variable.

Here is a really simple sample where we use the pixel position in the texture (vUV.x / vUV.y) to define the pixel color :

#ifdef GL_ES
    precision highp float;
#endif
varying vec2 vUV;
void main(void) {
    gl_FragColor = vec4(vUV.x,vUV.y,-vUV.x, 1.0);
}

This will result in a beautiful gradient :

clip_image013

The main difficulty when creating PTs is that in the pixel shader code, you only know the current pixel you need to choose a color for. You do not have access to the other pixel colors. So you need to use simple and complex algorithm to generate what you want such as the FBM one : http://en.wikipedia.org/wiki/Fractional_Brownian_motion.

You can find a lot of samples on https://www.shadertoy.com/

So now : How can you create a custom procedural texture that use this Pixel Shader ?

You have to 3 solutions :

  • Embed this pixel shader in the JavaScript code using the ShaderStore
  • Store the shader as a Dom Element in your HTML code
  • Use a file based custom PT

How to embed the pixel shader in the store ?

This can be done easily using the BABYLON.Effect.ShaderStore array :

BABYLON.Effect.ShadersStore["LinesPixelShader"] =
    "#ifdef GL_ES\n" +
   "precision highp float;\n" +
    "#endif\n\n" +
    "varying vec2 vUV; \n" +
   "void main(void) {\n" +
    " gl_FragColor = vec4(vUV.x,vUV.y,-vUV.x, 1.0);\n" +
    "}\n" +
  "";

Note that your shader name should be suffixed with PixelShader as the procedural texture shader is always a pixel shader. Babylon.JS will automatically understand it is a pixel shader.

To use this shader, you just have to create a CustomProceduralTexture and put the name of your shader in the store. Note that the name of the Shader does not contains the "PixelShader" part as when defined in the store.

var customProcText = new BABYLON.CustomProceduralTexture(
    "customtext", 
    "Lines", 
    1024, scene);

You can find and play with a full sample in the playground : http://www.babylonjs-playground.com/#1XPCZC#5.

What is a file based Procedural Texture and why to use it ?

Until now we only used code generated textures. All standards PTs are done this way so you do not have to get images or some other resources for it to work.

When you want to create a PT which is using one or more images and/or you want to package this PT to share it with the community, it is a good idea to create a file based one.

A file based PT is a folder containing at least two files :

  • config.json
  • custom.fragment.fx

The config.json file reference the files needed by the texture and the parameters if any. The fragment file contains the shader code.

To use it, specify the folder path instead of the Pixel Shader name :

var customProcText = new BABYLON.CustomProceduralTexture(
    "customtext", 
    "./textures/customProceduralTextures/land", 
    1024, scene);

Find the full code here : http://www.babylonjs-playground.com/#1XPCZC#4

In this sample we use to textures (dirt and grass) and mix them using an FBM algorithm to create a random ground.

clip_image015

Want to go further ?

Now that you know the basics, the next step is to read the whole procedural texture documentation on the Babylon.JS wiki : https://github.com/BabylonJS/Babylon.js/wiki/How-to-use-procedural-textures%3F

Then, play with it on the playground or on your own code. I would love to hear feedback from you !

And do not hesitate to share your creation on the forum : http://www.html5gamedevs.com/forum/16-babylonjs/.

A lot of people will be happy to use your textures !

Feel free to contact me on twitter (@meulta) to ask me any question about this article.
31 Oct 17:15

Mapping Shakespeare’s Othello

by Chris Watson

Additional background information is shown / Collected and written by Tom Cheesman

This map is part of a research project initiated and super­vised by Tom Cheesman at Swansea University in collab­or­a­tion with Kevin Flanagan and Studio NAND. Over the course of nearly two years, Tom has collected over 50 trans­la­tions and adapt­a­tions of Othello into German driven by the idea to analyse and compare them in order to find traces and patterns that reveal cultural, histor­ical and social fluc­tu­ations.

[…] a first proto­type called Version Variation Visualisation in which we helped building a set of visu­al­isa­tion tools for an exem­plary corpus of 37 German trans­la­tions of Othello (Act 1, Scene 3) in collab­or­a­tion with Kevin Flannagan andSebastian Sadowski.

A beautiful clean design to the map reminiscent of the Stamen Maps Toner maps, it is a great blend of data visualisation, literature and cartography. Differentiating between Books & Scripts the dates on the interactive web based map highlights details of the writers and where that text might have been written, rewritten, published. The creators state this is just a beginning and will no doubt grow, reminds me of Literature Atlas.

http://othellomap.nand.io/

 


01 Sep 06:09

How to make a paper spherical panorama

image

Photos usually only show a rectangular fragment of the scene when the image was taken. Typical panoramic images display more of a landscape, but they still don’t capture the whole picture. Even a 360˚ panorama only captures a horizontal circle, leaving out the ground and sky.

What if you have a nice scene that you’d like to convey in full? I’ll show you how to make a spherical panorama, making use of all 4π steradians with software, a printer, and some paper.

My example is an unseasonal Christmas scene because I played with this a few months ago. Maybe we can imagine this is for a Christmas-themed celebration held in winter in the southern hemisphere.

Tools for creating panoramic images

The first free tool I’d recommend is Microsoft Photosynth, which generates panoramas and other immersive images and videos. You can use Photosynth on a computer or as an app on a smartphone or tablet. The iPhone app automatically snaps pictures as you aim the camera in different directions, and it stitches them into a panorama. Here is an interactive panorama I made of the inside of my house:

The second is Hugin, a free tool for the computer that gives you more freedom to construct your panorama, although it has a higher learning curve. You can import photos from any camera, and the software will stitch them together. You can also help it find matches between the photos to help it stitch better, and change settings to make the panorama as seamless as possible. You can also choose different projections, which allows you to create some interesting artistic effects. For example, one of my favorite projections is called the stereographic projection, which is employed here as in this “small world” effect reminiscent of Le Petit Prince, taken in my backyard.


Figuring out coordinates and projections

These tools can make a 2D representation of a scene, but we want a 3D sphere. You’re probably familiar with the problem of turning a globe into a map of the world: you have to make a projection to translate the 3D globe into the 2D map. Here we want to go in the other direction.

For this project, I prefer the equirectangular projection because it has the nice property that the horizontal coordinate is the longitude and the vertical coordinate is the latitude. This makes the mathematics of the mapping much simpler. Now the mapping to the sphere is

$$\begin{bmatrix}x\\y\\z\end{bmatrix}=\begin{bmatrix}\sin{\theta}\; \cos{\phi}\\ \sin{\theta}\;\sin{\phi}\\ \cos{\theta}\end{bmatrix},$$

where \(\theta\) and \(\phi\) are the standard spherical coordinates. But having these coordinates isn’t enough; I want to make a physical model of this sphere.

The solution is to mathematically find the correct shape for 10 (or some large number) of petal-shaped images, such that the spherical image can be printed on several flat pieces of paper, and then rolled together to form an approximation of a sphere. The sphere is partitioned into some number of sectors (regions with \(\phi\) constrained between \(\frac{2\pi i}{n}\) and \(\frac{2\pi (i+1)}{n}\)). The paper petals will then join, or form a cobordism, between these endpoints.

After plotting and subsequently printing the correct boundary function in Mathematica, here is what the petals look like when they are joined at the point that will become the zenith:

Building the photo sphere

Now that we have the shape planned, we can take a panoramic image and project it down to the petaled surface. You can make a full sphere panoramic image (as an equirectangular map) using the software of your choice. The height should be an even number of pixels.

Then what I did was import the photo into Mathematica and write a program to process it. If you’d like to try my Mathematica code for this, you can import this text file into Mathematica.

image

I decided to alternate the directions of the petals to minimize paper waste (as well as cost).

I cut out the petals, and I rolled each of them to make it easier to join them together.

I then put tape on the white surface (the inside) to hold the petals into the spherical shape. The result was two hemispheres:

Here’s the other side:

It’s beginning to look like something! Now it’s just a matter of gluing the two hemispheres together:

And it’s done!

Things to try

You can use fishing line to hang the sphere. When it rotates, occasionally the sphere appears to turn inside out, and it looks like you are viewing the room through a circular portal through a fisheye lens.

It would be fun to improve on this idea using less reflective paper to reduce glare, and to try to make the seam at the equator less conspicuous.

21 Jun 15:49

linguistsagainsthumanity: Submitted by allthingslinguistic. A...

by loztron


linguistsagainsthumanity:

Submitted by allthingslinguistic.

A group of organised and wickedly funny linguistics students have created a set of “Linguists Against Humanity” cards. These are modeled on, and can be used in conjunction with, Cards Against Humanity - a game that is more or less a NSFW madlibs.

I’ve not had a chance to play with the LAH cards, but they looks great. As far as linguistics based games are concerned, there’s definitely less knowledge needed to play this than LTAG!

One of the best things is that they take requests!

07 Nov 12:35

Understanding the essence of Clojure: EDN

by encho81

This is the video which made me grasp the power of Clojure. I highly recommend watching the whole Clojure Inside Out series by O’Reilly. The introduction to this beautiful language provided by Stuart Halloway and Neal Ford is spot on.