Posts

This profile is from a federated server and may be incomplete. Browse more on the original instance.

narain, to random
@narain@mathstodon.xyz avatar

I spent a couple hours today working out a Newton method for finding the closest rotation to a given matrix A, i.e. min ‖R − A‖² over R ∈ SO(3). Then I found out that Kugelstadt et al. already figured it out: https://animation.rwth-aachen.de/publication/0561/

Oh well. Glad to verify that I got the same result, but I like my derivation better; it's much shorter :)

johncarlosbaez,
@johncarlosbaez@mathstodon.xyz avatar

@narain - what happens when you torture this algorithm with A = 0?

narain,
@narain@mathstodon.xyz avatar

@johncarlosbaez Same thing that happens every time you ask Newton's method to find the minimum of a constant function: the gradient and Hessian are both zero and you can't go any further.

narain, to random
@narain@mathstodon.xyz avatar

Hey @lisyarus, I was going through your blog and saw that in your 2D soft-body physics engine post (https://lisyarus.github.io/blog/posts/soft-body-physics.html) you wrote about a technique you derived:

"I don't know a well-established name for this, and a quick google search failed to reveal anything of releavance, so I will call this method /shape matching/. If you know some resources on this, I would love to know them, since I had to derive all the equations myself :)"

Good news: it's literally called shape matching! https://matthias-research.github.io/pages/publications/MeshlessDeformations_SIG05.pdf

(P.S. I know your post is almost a year old, so I'm sorry if someone else has already told you this)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@narain Interesting, thanks! Yep, just a few people mentioned it, so the more confirmations I have, the better :)

It's interesting that the article you linked uses a different algorithm for 3D shape matching compared to mine, but it is also iterative in nature.

narain, to random
@narain@mathstodon.xyz avatar

An interesting counterargument to the recent popularizations of geometric algebra as the ideal language for doing geometry in physics, computer graphics, and so on.

I haven't actually worked with GA enough to have an opinion either way, but their basic argument seems compelling:

"1. The wedge product and the rest of Exterior Algebra is 100% amazing, S-tier stuff, definitely something everybody who uses mathematics should know about [...]
2. The geometric product, though, is kinda weird and bad.
3. A lot of other parts of GA are working around the fact that the geometric product is weird and bad.
4. The “better” version of Geometric Algebra [...] which we are... slowly unearthing... will be mostly the same as GA but it will discard the geometric product as a basic operation, to everyone’s benefit. [...]"

https://alexkritchevsky.com/2024/02/28/geometric-algebra.html

johncarlosbaez,
@johncarlosbaez@mathstodon.xyz avatar

@narain

"The “better” version of Geometric Algebra [...] which we are... slowly unearthing... will be mostly the same as GA but it will discard the geometric product as a basic operation, to everyone’s benefit. [...]"

Is this "better" version the one that uses the wedge product instead of the geometric (= Clifford algebra product)? If so, it was introduced by Grassmann in 1844 and most decent mathematicians know about it.

narain, to random
@narain@mathstodon.xyz avatar

A few months ago I came across a paper about how rational numbers can be represented as LEFT-infinite digit sequences without a decimal point.

For example, in base ten,
−1 = ...9999
because adding 1 to it gives ...0000. Similarly,
1/3 = ...6667
because multiplying it by 3 gives ...0001. It's a fun exercise to verify that 1/3 − 1 = −2/3 indeed holds in this system.

I can't find this paper any more. Does anyone know what it might be?

narain, to random
@narain@mathstodon.xyz avatar

What is the area of a 3D polygon p₁p₂...pₙp₁? If the polygon is non-planar, this is not well-defined: if you split up the polygon into triangles pᵢpⱼpₖ and add up their areas ½‖(pⱼ−pᵢ)×(pₖ×pᵢ)‖, the result depends on the choice of triangulation. However, if you forget to take norms and just add up the vectors ½(pⱼ−pᵢ)×(pₖ×pᵢ) instead, you always get the same result: the "vector area" of the polygon! So if you're dealing with non-planar polygons, or non-planar curves in general, it makes sense to think of area as a vector rather than a scalar.

Further reading: https://en.wikipedia.org/wiki/Vector_area

narain, to random
@narain@mathstodon.xyz avatar

(axiom|Advent|Alexandria)
(of|Ocasio)
(Code|choice|Cortez)

narain, to random
@narain@mathstodon.xyz avatar

Here's a rather niche derivation in computer graphics theory that leads to a surprising and generally interesting fact about spheres. Please tell me if this has been noticed before.

In path tracing of Lambertian (i.e. diffuse) surfaces, we need to perform cosine-weighted sampling of a hemisphere, i.e. choose a point in {(x,y,z) : x² + y² + z² = 1, z ≥ 0} with probability density proportional to z. Depending on how you simplify the equations arising from inversion sampling, you get one of two possible methods:

A.1. Sample a point (x,y) uniformly from the unit disk.
A.2. Project it up to the hemisphere by choosing z = √(1 − x² − y²).

B.1. Sample a point p = (x,y,z) uniformly from the unit sphere.
B.2. Take the unit vector halfway between it and the north pole n = (0,0,1), i.e. (p + n)/‖p + n‖.

It's very strange to me that a routine calculation can be simplified in two different ways to yield two very different geometric interpretations -- in particular, two interpretations that by themselves cannot easily be related to reach other.

In fact, putting them together yields the (non-obvious!) fact that the following bijection between a sphere and a disk is area-preserving, up to a constant factor:

C.1. Given a point on a sphere, take the point halfway between it and the north pole.
C.2. Project it down to the xy-plane to get a point on the unit disk.

Since there is only one such equal-area map with rotational symmetry, we must have just reinvented the Lambert azimuthal equal-area map projection!

j_bertolotti,
@j_bertolotti@mathstodon.xyz avatar
narain,
@narain@mathstodon.xyz avatar
narain, to random
@narain@mathstodon.xyz avatar

Cool rainbow effect in the reflection in a metro train window.

What could be the reason for this? I assume it's an LCD screen so the light coming out of it is polarized, but I'm not sure what's going on at the glass interface to cause the colour shift.

narain, to random
@narain@mathstodon.xyz avatar
ColinTheMathmo,
@ColinTheMathmo@mathstodon.xyz avatar

@vam103 Is there any way to find out what the settings should be without spending months becoming an expert in the field?

CC: @narain

vam103,
@vam103@mathstodon.xyz avatar

@ColinTheMathmo @narain
Well yes and no. Having spent the week dealing with settings that stopped webpages loading after following
https://github.com/milgradesec/firefox-settings

Which actually is a good set of settings (turns out most do not need to run off to about:config just the regular settings) but I learnt about not doing the windows specific things or the jit things and I still use quad9 for the DNS.

Mostly I pick things up as I go but the new rust webrender engine was just a hidden gem.

narain, to random
@narain@mathstodon.xyz avatar

Today I learned that crocodilians are more closely related to birds than to other reptiles. WTF?
https://en.wikipedia.org/wiki/Archosaur

j_bertolotti,
@j_bertolotti@mathstodon.xyz avatar

@narain Dinosaurs FTW!

narain,
@narain@mathstodon.xyz avatar

@j_bertolotti I knew that about birds but didn't know it about crocs!

narain, to random
@narain@mathstodon.xyz avatar

If I want spherical geometry but I only have Euclidean geometry, I can get spherical geometry by restricting myself to the unit sphere.

If I want Euclidean geometry but I only have hyperbolic geometry, can I still get Euclidean geometry by restricting myself to some lower-dimensional submanifold?

narain,
@narain@mathstodon.xyz avatar

I think I've found the answer: Coxeter writes¹ that "the intrinsic geometry of the horosphere² is Euclidean", and that this fact was known to Lobachevsky from the beginning.

¹ https://www.thebookshelf.auckland.ac.nz/docs/Maths/PDF/mathschron009-004.pdf
² https://en.wikipedia.org/wiki/Horosphere

gregeganSF,
@gregeganSF@mathstodon.xyz avatar

@narain Cool!

Here’s one way to make this concrete.

You probably know about the hyperboloid model of hyperbolic space, where H^n is a hyperboloid embedded in (n+1)-dimensional Minkowski space-time.

https://en.wikipedia.org/wiki/Hyperboloid_model

The hyperboloid consists of all points in R^4 satisfying g(v,v)=–1, where:

g(v,w) = v diag(–1,1,1,1) w

In this model, the horospheres are the intersection of this hyperboloid with the hyperplanes:

g(v,L) = const

where L is any vector on the light cone, i.e.

g(L,L) = 0

One example is the 2-d surface parameterised by:

v = (x^2+y^2+1, x^2+y^2, x+y, x–y)

This satisfies:

g(v,v) = –1

(i.e. it is a submanifold of the hyperboloid)

and also

g(v,L) = –1

for L = (1,1,0,0), making it a horosphere.

If we take the tangent vectors:

∂v/∂x = (2x, 2x, 1, 1)
∂v/∂y = (2y, 2y, 1, –1)

then the matrix of Minkowski dot products between them is:

g(∂v/∂x , ∂v/∂x) = 2
g(∂v/∂y , ∂v/∂y) = 2
g(∂v/∂x , ∂v/∂y) = 0

which is just a constant flat Euclidean metric.

That is to say, the metric induced on this surface by the ambient Minkowski space is a 2D Euclidean metric!

narain, to random
@narain@mathstodon.xyz avatar

@christianp Hi Christian, how come I can't follow @dasharez0ne? The account is active (https://mas.to/@dasharez0ne) but via Mathstodon it shows up as suspended (https://mathstodon.xyz/@dasharez0ne@mas.to).

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • GTA5RPClips
  • provamag3
  • InstantRegret
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • lostlight
  • All magazines