# algorithm

## Camera rig example in engine

A new example showing how to use the class PCamRig object is available in the engine’s samples. PCamRig is using PRange objects to describe all rotations (pitch, yaw & roll), enabling a simple control of the angles. In the example, roll is going from 0° to 90° and yaw from -45° to 45°, the mouse

## My website being back online I will document…

My website being back online, I will document the researches related to disrupted cities in several pages there. main page (quick presentation, history, etc) galleries generation of the road network I’m currently working on an algorithm to nicely shrink the blocks detected in the network…

## 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

## Road network generation the gif gives you an…

Road network generation: the gif gives you an idea of the procedure executed in ~300 milliseconds by the c++. With a deformation:

## Different kind of network generated by 3 configurations…

Different kind of network generated by 3 configurations (images go 2 by 2). Note: add a variation on the roads length (min, max will be ok).

## 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 +

## flat network no Z slight Z curvature strong…

flat network (no Z) slight Z curvature strong Z curvature strong Z curvature strong Z curvature After a bit of struggle with the management of a 3d grid, the advantage is there: it’s now easy to generate a road network in 3D, with automatic connection of the streets while generating them. It’s a simple brute

## Generation of a 3d grid of cells each…

Generation of a 3d grid of cells, each one of the cells knows who are the surrounding ones. This to speed up searching around the current cell. To generate a unique id for each one of the surrounding cell, and quickly find the current cell in the surrounding cell, i used a python that generates

## Looking for loops in networks It’s seems very…

Looking for loops in networks. It’s seems very simple, but when i’ve started to search for a programmatic way to solve this, you ends up with a kind of complexity that seems much too high compared to the problem. After a bit of research, i found the Rocha Thatte method. It is a very elegant

## Finding cycles in networks Since several days i…

Finding cycles in networks. Since several days, i was trying to solve a problem that will occur in #peel: how to broke a connection when the connection is part of a “cycle” (i’ve called it “loop” until now). This problem is illustrated here: The beginning of the answer is in wikipedia and uses graph theory

## Puzzle research for peel In the process of…

Puzzle research for peel. In the process of searching a “why” 1, the idea of a messed up structure to reconstruct arose. As the other concepts in the game, it’s easy to understand visually, a bit more hard to describe programmatically. Indeed, once several segments will be connected, rotations will be constrained, and hierarchy tree

## UV coordinates generation End of the week and…

UV coordinates generation. End of the week and a bit disapointed: i didn’t finished the joint generation. Manipulation of memory using OGRE_ALLOC_T, MemoryDataStream & DataStreamPtr is tricky. The idea is to generate the texture on the fly, for each new joint. Therefore, i couldn’t achieve the uv calculation… The top faces are ok, the other

## Algorithmic object creation The work started yesterday wit…

Algorithmic object creation. The work started yesterday wit @balt starts to fall into place. All vertices are generated at the right location and in a logical order (see right part of the image), making it possible to construct the faces “easily”. But it’s anyway a hell of +, -, * and % 🙂