4 karma · joined Aug 2, 2016 (10y ago) · 10 submissions
comment 1y ago · link · parent
Alternatively, Ian Mertz's survey might be a bit more accessible than the original catalytic paper: https://iuuk.mff.cuni.cz/~iwmertz/papers/m23.reusing_space.p...
comment 4y ago · link · parent
My mail-sending script; tested only on OpenBSD:
#!/bin/sh
#
# Save a copy of an email in Sent, then send it with sendmail.
set -e
TMP=$(mktemp -d)
cat > "$TMP/message"
notmuch insert --folder=Sent < "$TMP/message"
sendmail -f falsifian@falsifian.org "$@" < "$TMP/message"
rm -r -- "$TMP"comment 4y ago · link · parent
I'm using the WebGL API pretty directly, though. So if it were missing I could have hacked it with some foreign function calls, but it would have been a lot more effort.
comment 4y ago · link · parent
The six rooms in the house form six cells of the hypercube. You can make one more cube by joining up the tops of the walls: that cell is always above you. And finally, there would be one more cell below you. (To be a bit more precise: the six rooms of the house would have to be extended to be twice as tall. The tops of the walls are at coordinates (+-1, 1, +-1, +-1), but right now the bottoms of the walls are at (+-1, 0, +-1, +-1). You have to remove the floor and make the walls go all the way down to (+-1, -1, +-1, +-1).
You can do this for any 4D polytope. Taking it down a dimension, the layout of the house shows how to put a cube on a 2-sphere. I could have done it for any other 3D polyhedron. Give the sphere and the polyhedron the some centre point, and then project all the lines of the polyhedron onto the sphere. Each face of the polyhedron becomes a 2-D region on the sphere (in the case of the house, each room is a square). Going a dimension up, you can centre the 3-sphere and the polytope on the same point, and do the same kind of projection. Every cell of the polytope turns into one 3-D region of the 3-sphere.
I wish I had had time to include that.
comment 4y ago · link · parent
That is, if you scale just one of the three points of the triangle, e.g. (1, 0, 0, 1), (0, 1, 0, 1), (0, 0, 0, 1000), then while the triangle will appear in the same place as before, interpolation (e.g. deciding which part of the texture to draw in each pixel of the triangle) changes.
The current version of the demo doesn't have any textures but that's mostly laziness on my part. For a while I gave the rooms "ceilings" which were each a checkerboard-pattern square, which forced me to figure out how to get the interpolation thing right. So I can confirm it can be done. But I dropped the ceilings because they just got in the way.
comment 4y ago · link · parent
This happens to work with (Open/Web)GL. Here's my understanding of why. Say you tell WebGL to draw a triangle with points at clip space coordinates (i.e. after all the transforming is done) (1,0,0,1), (0,1,0,1), (0,0,0,1). If you multiply all those by a positive number, e.g. (10, 0, 0, 10), (0, 10, 0, 10), (0, 0, 0, 10), you get the same triangle. But if you multiply by a negative number, they will not be drawn at all: (-1, 0, 0, -1), (0, -1, 0, -1), (0, 0, 0, -1) is not drawn. I think this is because of the rules for clipping: only points where -w <= x,y,z <= w survive the clipping step. If w is negative, that's impossible.
Related: my code draws the universe twice on each frame. First I draw things that are more than halfway around the sphere from you, and then I reset the z buffer and draw things that are closer to you. https://git.sr.ht/~falsifian/s3d/tree/main/item/src/S3D/Draw...