16 Oct, 15 tweets, 6 min read
apparently these good people solved the explosion in steps when the ray gets close to the surface during SDF sphere marching (thanks to @Atrix256) diglib.eg.org/handle/10.1111…
i must say i'm a little angry with myself because i spent hundreds of hours on getting around this exact problem and couldn't find a better way.
the classical sphere marching method: lipschitz continuity guarantees that the blue line never intersects the diagonal of the red stepping function, which always moves as many units forward as it has measured upwards.
plotting the first derivative of our curve (green), the light green lines designate the global lipschitz limit that the function is guaranteed never to overstep.

the purple lines bracket the local upper and lower bounds of the first derivative within a local region.
plotting the limits as as a wedge of tangents, all positive, we see that the region can't possibly contain a root, and thus deem it safe to skip the entire interval.
whereas in this less beneficial interval, our tangent bundle can only guarantee us safe passage up until the cyan colored point.
this region here however allows us to make a step twice as a large as a simple SDF lookup would permit us.
it is easy to see how this method becomes particularly useful when we are grazing surfaces with low curvature, as the tangent width narrows, and we can practically perform an interation of the newton-raphson method.
the authors don't do a good job of showing these connections. the provided formula is effectively a version of the newton-raphson method which uses a gradient interval instead of a local gradient.
to compute the gradient interval, you use a combination of automatic differentiation and interval arithmetic on the first derivative.

here are primitives for both:
the new arithmetic primitives will likely look a lot like joint ranges from revised affine arithmetic (shadertoy.com/view/4sV3zm), except that we get a right facing interval cone instead.
a much more important consequence of all this is that the lipschitz continuity requirement |f'(x)| <= 1 no longer applies as we always see a local gradient cone. you can use this to trace any old implicit function, not just only distance functions.
bonus: with 1 more sample at the right end of the interval, we can reuse the same gradient interval, flip it, and use it to truncate our extrapolated destination. in this case, we discover that we can skip the entire interval rather than having to jump to the cyan point.
the right hand samples amortize over time, as we can reuse them in the next iteration.

• • •

Missing some Tweet in this thread? You can try to force a refresh

This Thread may be Removed Anytime!

Twitter may remove this content at anytime! Save it as PDF for later use!

# More from @paniq

14 Oct
musical genres are also memes, strange animals of the mind. they become mainstream and then are copied ad nauseam until the musicians get creative and diversify into new directions, the mainstream forms again and once more we have new genre names.
the population of genres is tightly controlled by the number of humans participating in meme distribution, because each one can only memorize a limited number of facts, and so we build genre preferences and eventually settle for a few favorites.
so these musical genres are self-replicating among musicians, they have a mutation phase after which they have a period of stability that gradually erodes back into mutation. they are alive in the collective conscious.
14 Oct
happy couples who have been through some shit have managed the unbelievable miracle of intersecting their personal space with the personal space of another human being and not going mad from it. ask them how they do it and you will surely learn how to bring world peace.
no, that is NOT a john lennon & yoko ono quote! not yet, at least
what's surely always going to b hard 4 a couple is to feel the pain and wonder for a while: is it us? is it you? is it me? and then finally figure out: no! it's THEM. if you get it wrong the one way you quit too soon & if you get it wrong the bonnie&clyde way you quit too late.
13 Oct
disappointed that submissivism doesn't exist as a political movement. i only found a right wing slur, "white submissivism" which implies that, as a white anglo-saxon person, you are, somehow, wrong to (wish to) submit to other ethnicities.
there are sure a lot of people out there who believe you're wrong to wish to submit to anything or anyone, and there's no telling how much damage that is doing to the world.
twenty years ago when i was learning about taoism i picked up on the observation (i think alan watts said it) that the west overly idolizes yang and almost despises yin, and you can see expressions of this everywhere in western culture.
13 Oct
for tukan i now have the core composite primitive, which has pretty much feature parity with lua tables (sans mutability), but it's fairly complex for a basic type and i'm a little worried the kernel is not going to be as minimal as it could be.

there's an alternative...
i noticed that the table implementation, namely both key=value and indexed array parts, could also be done in userspace with a simple tuple primitive (i.e. fixed size arrays of variants)
but because the intermediate language is homoiconic (i.e. it uses basic data structures to define the AST), it would mean we can't use native key=value maps, and the kernel still needs a private map type just to do syntax expansion and typechecking.
11 Oct
unless thing look like used and return by other customer because seller lose money when have to open and check return package, clean product, replace protective cover and reseal bags and seller decide no time for this shit and just send crap to you
if seller do this with lot customers then they give one star review on amazon marketplace which no help because reviews aggregate all sellers and there no telling who was was rotten egg and perhaps amazon itself is rotten egg because employees treated badly and have no time
and just like this by third tweet we arrive at worker's rights as envisioned by karl marx which when missing customer unhappy too because quality drop all over the place and customer have bad experience all day and not know why
27 Aug
trying to read a leftist thinkpiece on how, basically, BSD/MIT is evil because it's not as anti-corporate as GPL, but my bewilderment could not stop me from falling asleep.

open software licenses are all socialist battle techniques that eventually met their match.
GPL was an attempt to virally propagate the inability to close sources at all, and the corporate countermeasure was to ban inhouse use.
yet corporations, foremost apple, recognized that open standards made it easier to shuttle software engineers between jobs, as developer expertise is strongly connected to tooling and proprietary tooling effectively locked programmers into their jobs.