math

Circular inversion

After watching the demonstration of Zvezdelina Stankova on how to prove the Ptolemy’s theorem by using inversion of the plane, I could not resist the urge to implement this projection in a shader and play with. About the implementation The implementation of this projection in a shader was much more easy than excepted. The math

Direction in cyclic spaces

Related to the edition of rotation via 2d gradients, i stumble upon a nice little logical issue: how to pick the shortest path form current value to target one when space is cyclic and not linear. Indeed, rotations are cyclic, PI and PI*3 are not the same angles, ok, but you end up at the

Soft skin

Currently working on a library of skinning called SofSkin. It’s purpose is to make skinning in a different way: less rubberish and more mesh/geometry-oriented. The idea is to use edges of the mesh as springs that tries to recover their initial length by pulling/pushing on the vertices. The lexical field is focused on anatomy, to

The perfect halo function.

The halo is generated by making a linear blending between the sine on a sigmoided angle (sinus1) and a standard sine (sinus2 ). The sigmoided sine has the advantage of being powerful far from the center: + The main problem with this method is the very short blurred area, making it too sudden. The basic

Straight skeleton C++ implementation

Long time no seen! Lot of things happens in may and june, that’s one of the reason of this long silence. The other is the library i’m working on to generate the maps of Disrupted Cities. Implementing a complex process in an efficient way is harsh. But it starts to works nicely. A small openframeworks

Finding the closest road on the right at…

Finding the closest road on the right at a crossroad. To generate the bocks of building based on the roads structure, the method I’m building is based on a simple idea: when you arrives at a crossroad, you take the first street on the right and you go on like this until you reach a

Result of different configuration of network at each…

Result of different configuration of network at each pass. In each image, you see the road network alone and the network with the control grid. I’m proud to mention that the generation time on a big network is taking around 500 millis, something easy to hide with a small transition. Here, there are 3 +

Reviewing the road generation system generation of normal…

Reviewing the road generation system. generation of normal and tangent for each segment (cyan & purple vectors): they can be used easily to generate a new road starting from any point; a million better random selection, based on the formula: X1 = a*X0 + b % m; This random generation merits a bit of attention.

Trigonometry hell Finishing the day with cool code…

Trigonometry hell. Finishing the day with cool code running: World coordinates to camera coordinates, especially usefull for sound sources. Indeed, top, right and front depends on the relative position of the source in the camera space, not the global one. Transformation of the sticks direction into world coordinates relative to camera, once again. This time,