.1, mainly because of a depletion of the stock, the low rate of discovery of profitable deposit, and because shale oil in the US as yet to be proven cost-effective ([8]).

Coal production is also entering a period of high uncertainty. While acknowledging that the data to which they have access is limited, poorly detailed, and hard to check [8], academic researchers agree that the peak of coal production in China will likely ■ Build-to-last:

Whether we look at the Egyptian or Maya civilisations, with their impressive pyramids, or the ancient Greeks and Romans with some of their edifices still in a remarkable state of conservation -The Pont du Gard in France, the Pantheon in Rome or the Parthenon in Athens -several civilisations massively oversized their buildings, for reasons ranging from religious zeal to beautiful aesthetics to demonstration of political power, with the side effect of making them last millennia. Even more day-to-day buildings can last centuries: it is not that uncommon in Europe to live in a house built 500 years ago. These long-lasting buildings dilute their potential negative environmental impacts over their lifetime.

■

Build-to-maintain:

Other civilisations took a complementary approach: they based their built environment on demountable wooden structures so that damaged or weak parts can easily be replaced without taking down the entire building. By regular maintenance, some Alpine chalets are still in use centuries after being built, and in Japan, the inns Nishiyama Onsen Keiunkan and Hōshi Ryokan were respectively founded in 705 and 718 and have seen continuous service ever since 2 .

.2: founded around 690, this temple is to be rebuilt every 20 years.

The next rebuilding is scheduled for 2033. One can also think of Scandinavian stave churches, some built in the 12 th century and maintained to this day, or Chinese structures erected a thousand years ago. This work explores the alliance between modern numerical tools and the historically proven approach of demountable structures. What explains the durability of demountable structures? Aside from the ease of maintenance, many interrelated factors play a role in this: according to Glahn who focused on Chinese architecture in [37], the quality of the wood, the flexibility of the joints which dampens the oscillations of the structure, and the fact that the columns merely rests on stone feet instead of being anchored, which prevents excessive strain during an earthquake, as well as the weight of the roof which counterbalance wind loads during typhoons, all explain the surviving of these structures for centuries. Aside from the strict durability of these edifices, in our ever-changing modern cities, demountable designs

ABSTRACT

In the context of sustainable construction in a circular economy, demountable wooden buildings represent an interesting research perspective. The question of reuse, i.e. the best possible reuse of the finished products resulting from the dismantling of buildings, requires that the building not be demolished, which makes it difficult to use nails or any other assembly devices of the same type. On the other hand, the elimination of modern metal assemblies common in wooden structures greatly reduces the carbon footprint of the building. Concerning their environmental impact, wooden assemblies offer much better prospects than their metal counterparts. However, few modern buildings are built without metal; for example, the Louis Vuitton Foundation is extremely consumer of metal products even though it clearly states the ambition to make it out of wood. Designing demountable structures and buildings is an ancient problem: some Austrian chalets are 500 years old, and the oldest inn in the world, the Nishiyama Onsen Keiunkan in Japan, was built in 705! their longevity is due to their demountability: when a part of the structure ages and begins to show signs of weakness, it is partially dismantled and replaced by a new one. Thus, element after element, these structures have withstood the test of time and are still functional today. What could be more sustainable than a 1300-year-old old building still in operation? The question also arises on the other hand: what to do with a 30-or 50-year-old building which, as the city and society change, has reached its expiration date and is no longer used? Here again, the question of dismantling and reusing its structural elements as much as possible for new projects (which potentially greatly reduces their environmental footprint) is part of a sustainable construction approach. Finally, with recent and future advances in robotic construction, the cost and time of manufacturing such assemblies will likely become increasingly competitive with their modern counterparts, both in economical and ecological terms. This PhD project ambitions to participate in the reflection on interlocking assemblies by exploring the feasible space of such assemblies and building generative tools to design them. CONTENTS CHAPTER 1

INTRODUCTION

Social, economical and ecological contexts

The 19 th and 20 th centuries saw two concomitant phenomena in the construction sector. Labour legislation modifications and major improvements in health and safety on the construction site led to an increase in the cost of labour. Simultaneously, the rapid decrease of the prices of construction materials was made possible both by the explosive economic growth, seen especially in western countries, throughout the 20 th century (which was enabled by cheap energy coming from the burning of fossil fuels) and by the omission the environmental and life destruction brought by the over-consumption of natural resources in the calculation of the price. In this context, it was, and still is, in the interest of construction companies to standardize their products: they simplify the design of structures and eased the assembling process as much as possible to shorten working hours and increase productivity, even if it implies consuming more resources than necessary.

Yet this evolution may soon reverse as the parenthesis of abundant energy seems to be closing. Helle Kristoffersen, the president of Strategy and Innovation at Total- be reached this decade, or at the latest in the 2030s, as shown in FiGURE 1.1. This could have major various impacts, as was seen recently when coal prices rose up in 2021 (before the war in Ukraine): gas prices surged in Europe, power outages happened in India [81], and the price of silicon, vital to make solar panels, has tripled [82].

Natural gas (mostly methane) production in the European Union (EU) has been steadily

declining for the past two decades, while its consumption increased [65] resulting in varying degrees of dependence of the EU members on gas exporting countries.

This provoked social unrest in the aftermath of the Ukraine war due to a soaring life price (which was already quite high with the disruptions of the supply chains caused by the coronavirus pandemic). Even if the war had not happened, the inexorable decline of domestic production due to stock depletion on the one hand and on the other "an increase in demand due to the exit from coal and the intermittence of renewable energies will surely further aggravate the collapse of Europe's most energy-intensive industrial activities", [8]. At the time of this writing, inflation in Europe led to a drastic reduction of production in some industries [START_REF] Chazan | German companies halt production to cope with rising energy prices[END_REF]80].

Setting aside these economical and geopolitical considerations, climate imperatives put even more pressure on fossil fuels. As the International Energy Agency (IEA) urges to stop investments in new fossil fuel supply projects [76], a recent article [110] estimates that for the world to have a one-out-of-two chance of limiting global warming to 1.5 • C , 58% of oil, 59% of fossil methane gas and 89% of coal should stay in the ground by 2050 (taking as reference the reserves found in 2018). While the description of the effects of climate change is not the focus of this manuscript the reader is referred to, e.g., [60,63] for a chilling description of the world we are Introduction on track to living in.

What must be done

The main challenges facing all industries in the coming decades are two-fold: energetic sobriety on the one hand as fossil fuels are coming to an end, possibly faster than expected, and with them so is the era of abundant energy and cheap materials. On the other hand, there must be a massive decrease in the environmental footprints of the products manufactured to avoid the worst of suffering due to climate change, but also to preserve critical resources (sand, minerals, arable lands, water, etc.) for the generations yet to come -or even ourselves in a few years.

While some governments loudly advertise green growth made possible by an energy shift towards renewable sources it remains to be seen whether the Earth has enough mineral resources to carry out this task [102]. So far it seems, to me at least, that we are just shifting from dependence on fossil fuels to dependence on fossil minerals, with high uncertainties on the stocks available (those that are known are in the hands of even fewer countries than oil deposits, diminishing further the sovereignty one could hope to have), and whose extraction exerts a heavy toll on ecosystems. According to Dr Fatih Birol, the IEA executive director, "today, the data shows a looming mismatch between the world's strengthened climate ambitions and the availability of critical minerals that are essential to realising those ambitions".

Thus, like all industries, the construction sector must reduce the embodied energy of the built environment, where the "embodied energy can be viewed as the quantity of energy required to process, and supply to the construction site, the material under consideration" [49], but also reduce the various impacts on the geochemical and bio-spheres it currently has (toxicity on humans, marine and terrestrial ecosystems, mineral resources used, water scarcity, climate change, land use change, etc.). While one may rightly be dubious about high-tech solutions in general as they are more energy intensive than low-tech ones, and high-tech construction will certainly not solve all these problems, it may help in some cases, and the numerical exploration of various alternatives of a given design may also put in evidence structures necessitating relatively few resources and with lower impacts on the world 1 . DiXite project [START_REF]DiXite -Digital Construction Site. I-SITE FUTURE[END_REF], which finances this work, was created to study the role played by digital technologies in the construction industry. One of the main issues the project tackles is how the future built environment can be made sustainable.

Introduction

What did the Ancients do?

To answer this question we do not need to start from a blank page: instead, we may leverage the 12 000 years of sustainable civilisations preceding us. Coarsely speaking, our ancestors dealt with sustainable construction in two manners: are of interest as they enable to reuse of structural members. Indeed, today, at the end of the lifetime of a building, assemblies are often destroyed which prevents the reuse of structural components and has a significant impact on the planet: according to the French agency for the environment and energy management, ADEME [START_REF]Déchets chiffres-clés (Waste, key figures)[END_REF] the construction sector generated almost 70% of the waste in France in 2017. Conversely, new construction materials have a severe environmental impact, up to 7% of the emission of greenhouse gas in France in 2016 [67].

Yet, when we look at the wooden edifices built today, we see a profusion of irreversible joints making the structure permanent, whether because of metal fasteners such as nails, screws, bolts and nuts, or because of the use of glue. In the United

States of America, 92% of the new residential buildings were made of wood in 2021

Introduction

[100], mainly through a technique called platform framing which has extensive use of nails. It is thus no wonder that the technical know-how presiding the designs of these demountable joints virtually disappeared in the last two centuries in wood buildings despite their proven relevance. It turns out that historians precisely pinpoint the shift from the design of demountable structures to the irreversible ones that are common today, in the village of Chicago in the fall of 1832, with the invention of the so-called balloon frame.

The westwards expansion of the American people in the first half of the 19 th century resulted in the rapid growth of the villages inhabited by pioneers. In Chicago, the population was multiplied by almost 12 in five years, from 30 inhabitants in 1829 to 350 in 1833 [91]. This sudden surge, or rather the associated demand for buildings, provoked a shortage of the large timbers that were traditionally used in log construction, which in any case could not have been worked with because there were no skilled carpenters in Chicago at the time. Simultaneously the industrialisation and mechanisation of nail factories drove their price down, from a historical 25 cents a pound to 5 cents a pound in 1833 [13]. Taking advantage of these cheap machine-cut nails, as well as of the abundance of small trees in the vicinity of the village, a man named George Snow [35] in the need of a warehouse [91] invented the balloon frame consisting of lumber of small dimensions permanently nailed to each other, see FiGURE 1.3, which differs greatly from the larger sections needed to carve traditional reversible assemblies. The term balloon frame was originally used to ridicule a structure that was deemed too thin and light (compared to traditional designs) to withstand loads. According to the New York engineer Francis W. Woodwards, the balloon frame could "be put up for 40% less money than the mortice and tenon frame" [114]. The further development of the nail and timber industries and the fabrication of standardised pieces, as well as the absence of skills required to build a balloon frame resulted in the adoption of this technique to build houses in the treeless regions of the West: "the western prairies are dotted over with houses which have been shipped there all made, and the various pieces numbered, so that they could be put up complete, by any one" [40]. The invention of the balloon frame "converted building in wood from a complicated craft, practiced by skilled labor, into an industry" [35], and led to the disappearance of master carpenters which were replaced by unskilled labourers. In the course of the 20 th century, balloon framing progressively made way to platform framing, easier and safer to erect and more fireproof.

Since balloon frames are thinner and use less material than their traditional counterparts and given the availability of iron in the planet's crust to make structural steel with, the reader might rightly wonder why we should bother in finding Introduction novel and complex assemblies when we could keep using balloon-frame-like ones.

As said above a decrease in the availability of energy is to be expected. According to [95] the energy needed to process a cube meter of steel is 42.9 MWh. By comparison, T. Gobin estimates the embodied energy of machined wood to be around 0.5

MWh/m 3 [39]. If relatively little steel is needed to make nails, its high embodied energy may make a steel-based assembly less attractive than a wood-wood joint, also called integral joints; thus, this embodied energy ratio of about 80 shows that careful calculations should be carried out when designing assemblies as to choose one with the least embodied energy. The environmental footprints of assemblies were recently investigated in depth in the doctoral thesis of K. Mam [58]. He states that "the production of steel in assemblies can account for up to 61% of the total climate change impact of a timber structure, almost all (97%) of the carcinogenic toxicity impact and 32% of the fine particle formation impact". He concludes that "the idea appears that the optimisation of the structure would not necessarily involve reducing the volume of wood, but rather thinking about the manufacturing processes and the types of assembly of the elements". It seems therefore to be a good idea to try and reduce the quantity of steel used in an assembly, which implies shifting back to tradition-inspired wood-wood assemblies, precisely the focus of this manuscript.

The above remarks should be qualified: indeed a recent study [62] finds that, by 2100, if only half of the new urban dwellers live in timber buildings, forest plantations area should expand by 160%. If we consider instead 90% of new urban dwellers in timber buildings, said area should triple! The authors specify that this estimate is conservative as it does not take into account adverse effects of climate change (e.g. mega-fires and tree dieback) and the renovation or replacement of already-existing edifices. The ADEME estimates that by 2050 about 85% of the consumption of construction materials for housing and tertiary buildings will be con-Introduction crete constituents (sand, gravels, cement) [79]. If timber buildings certainly has a huge potential for carbon emission mitigation [62], it does not seem to become the main construction material of tomorrow and will not suffice to answer the industry demand. That is why in this dissertation we adopt a material-agnostic stance: we will not consider a specific material for our assemblies.

Intent of the dissertation

This dissertation investigates the automatic design of integral joints between parts of an assembly. We aim at numerically finding novel assemblies, with surprising geometrical features, that are relevant to the construction industry. The work presented in this dissertation is still in its infancy: we focus almost exclusively on the geometrical aspect of an assembly. While some work has been done to assess the mechanical relevance of the generated assemblies, the fabricability aspect has not been investigated at all. Thus, there is still a long way to go before having a streamlined workflow from the numerical finding of an assembly (studied here) to the digital fabrication of mechanically relevant designs.

Organisation

This manuscript is organised as follows: CHAPTER 2 defines what we mean by assemblies and presents some past assemblies revealing the skills of master carpenters. It is followed by a review of the work done in puzzle generation, assembly planning and robotic fabrication, fields that are related to ours. The short CHAP-TER 3 is an in-depth presentation of the knowledge the scientific community has on assessing the interlocking of an assembly. While no new concepts are introduced there, it is necessary to read it to understand this manuscript, as our whole approach is to reverse-engineer key principles presented there. CHAPTER 4 is the bulk of this dissertation: we derive the mathematical equations that must be obeyed by a 2D assembly whose kinematics are prescribed, adapt an optimisation algorithm to generate such an assembly and study in depth the mechanical properties of its constitutive parts, as well as the influence played by fabrication imperfections on the kinematics of the assembly. Finally, in this chapter, we introduce what we deem to be our most significant contribution, namely the robust optimisation of assemblies with regard to imperfections. The last CHAPTER 5 simply extends the concepts presented in the previous chapter to 3D assemblies. The main interest of this chapter, in our opinion, lies in the thorough and detailed introduction of unit dual quaternions, little-known mathematical objects that perfectly describe a 3D assembly kinematics.

CHAPTER 2

SEQUENTIAL ASSEMBLIES

INTRODUCTION

This chapter aims to introduce and define what assemblies are, as well as to give examples of research works and built structures.

OVERVIEW

This chapter naturally begins by defining the concept of assembly. We briefly present several kinds of assemblies necessitating an intermediary body, typically a nail, to hold together before looking at the specific kind of assembly that will be the focus of this manuscript, namely reversible interlocking assemblies held together through the geometrical features of its constitutive parts.

CONTRIBUTION OF THIS CHAPTER

■ A (non-exhaustive) catalogue of existing timber assemblies, spanning continents and ages, is presented to reveal the richness and technical know-how of past carpenters and to ponder on human ingenuity when it comes to designing such non-intuitive mechanical puzzles.

■

An up-to-date review of the scientific literature on the computational design of interlocking assemblies is established.

DEFINITION

A mechanical assembly is the connection of different parts of an assembly or product. Assemblies are ubiquitous: whether it is the supporting structure of a house, the container and cap of a toothpaste tube, or a robotic arm transferring motion or applying force, everything from everyday objects to highly sophisticated scientific machines is, ultimately, parts and pieces holding together.

Despite this huge variety, assemblies can be broadly classified into two categories: an assembly is either direct or indirect. Each kind of assembly is also either reversible or non-reversible, meaning that once in the assembled state, it is possible, or not, to disassemble the assembly.

INDIRECT ASSEMBLIES

Indirect assemblies refer to assemblies where two parts are connected together through a third, intermediary body. This body may be:

■ Glue is used to bind parts together by adhesion. Several examples could be given: a windshield is glued onto a car, parts of some home furniture are glued as well, and the mortar between two bricks is a glue... More often than not such assemblies are non-reversible.

■

A staple is a fastener, often metallic, used for joining material together. Stapled elements are often quite thin, even though, in ancient times it was not uncommon in masonry works to tighten two stones using a metallic staple, see for instance the dovetail staples from Pasargadae, Persia, on the inset on the right (source:

Wikipedia). This kind of assembly may be reversible, at the cost of the destruction of the staple.

■

A key, sometimes called a wedge, is a small component that connects two parts in rotation. The assembly is reversible.

■

A nail is a fastener, often metallic, used in construction and woodworking to pin two parts together, by friction in the axial direction and shear strength laterally. This kind of assembly may be reversible, at the cost of the destruction of the nail.

■

A pin is a metal cylinder intended to be loaded in shear at relatively low forces. The connection is due to the adhesion between the pin and the connected parts. When the connection of a shaft to a hub is subject to high loads, a key is used instead. The assembly is reversible.

■

A rivet, usually a cylindrical metallic rod with a "head" at one end, is a permanent fastener. It is typically used to join metallic pieces, be it on a plane, a ship or a bridge structure. The assembly is reversible.

■

A fishplate is intended to immobilise several moving parts of a mechanical assembly (rails, members, chords, etc.) or to stiffen and support a soft or flexible body (cheese, member, etc.). The assembly is reversible.

■

A screw is a mechanical part, made of a threaded shaft and a head; intended to fix one or more parts by pressure, several mechanical fasteners work in the same way: nut, bolt, stud, thread, tap etc. The assembly is reversible.

DIRECT ASSEMBLIES

An assembly is said direct when it does not require any intermediate bodies, the shape of the parts in contact is sufficient for its realization.

■

Welding, one of the most common techniques, is a non-reversible joining process that ensures the continuity of the material between the parts joined. It is done by heating the parts. The continuity happens at the atomic level in the case of metal or molecular level in the case of plastics. Note that it is also possible to weld wood: two pieces of wood are rubbed against each other; the high temperature resulting from the friction as well as the pressure applied on the wood softens the lignin and hemicellulose at the interface, [START_REF] Gfeller | Wood bonding by vibrational welding[END_REF]. Once softened, these polymers get entangled, and the pieces of wood are welded together.

■ What seems to be the most intuitive direct assembly is the friction fit: parts with complementary shapes are tightly held together by friction once they are pushed together. Following [107], as the shapes are complementary, we define as integral joints the portion of each part in contact with adjacent parts. Assemblies with integral joints that may optionally hold through friction will be the focus of this manuscript. In a friction fit assembly, parts may be forced together by hand or using a hammer or a press. Lego bricks are a typical example of such a fit. When the structural integrity of the parts is required and it is therefore desirable not to hammer them against each other, they may be joined using a shrink fit. Depending on the friction force, this kind of assembly may not always be reversible.

■ Figure 2.1|

A rivet is heated, and inserted in the parts before its end is hammered. Renovations of the Grand Palais, Paris, France. Source: [START_REF]C'est pas sorcier -France 3. C'est pas sorcier -Le Grand Palais épate la galerie[END_REF].

A shrink fit aims at joining metallic parts by changing their relative size after assembling using thermal expansion. One part is heated and thus expands, making it possible to fit the other part, at room temperature, without using too much force. Once the first part cools down it shrinks (hence the name of the fit) and tightly holds the second part. It is a non-reversible assembly. As a side, yet quite interesting, note, the metal structure of the Grand Palais in Paris, France, (1897-1899) was assembled by shrink fit, using rivets (hence it qualifies as an indirect assembly): three workers would work together around one rivet; the first heated the rivet to a blank, while the other two hammered each end (which had become soft due to the heat) to round them and thus wedge the rivet between the parts to be joined [54]. Once cooled, the rivet shrinks and presses the two parts together.

■

Clinching is a method to join thin sheets of metal in a non-reversible manner: a tool presses several sheets together until they are plastically deformed and tightly interlocked.

■ Snap-fit aims at attaching flexible parts. One of the two parts, the male part, is elastically deformed during the introduction into the more rigid female part. Once assembled, the male part has room to return to its original shape and is blocked by the female part. Such process may be reversible, for instance the snap-fit buttons of some coats and jackets or the cap of some pens, or non-reversible such as what can be seen on some mobile phones where unscrupulous manufacturers make sure that once assembled, the product cannot be disassembled and thus, when a component is defective it cannot be replaced and the whole phone must be thrown away and bought anew.

REVIEW

As hinted in the previous section, this manuscript studies exclusively the automatic design of reversible integral joint assemblies. Historically, several civilisations used such shape-fitting assemblies in their timber constructions, be it in the Alps, Scandinavia or Japan. Centuries of human ingenuity and trial and error gave joints that take into account the shrinkage of the wood as well as naturally balance shear, compression, bending and torsion. Also, as they are reversible, the design of such assemblies is an active research topic in the construction sector as they enable the reuse of structural members and as such help reduce the amount of new material that must be extracted and stir the industry towards a more circular economy. As remarkable examples of durability, consider the Japanese inns Nishiyama Onsen Keiunkan built in 705 or

Hōshi Ryokan founded in 718: they have been in used for more than 1300 years and are fully dismountable.

As such, whenever a part has decayed it can simply be replaced by a new one. As for the reusing, the Ise shrine, in Japan, has continuously been rebuilt every 20 years for more than 1300 years, while reusing as much as possible the parts from one instance to the other ([118]).

BUILT TIMBER ASSEMBLIES

It would be impossible to give an exhaustive list of past and existing timber assemblies. Indeed, as any carpenter would know, [118], wood is a capricious material that has a life of its own. Whether it is the overall shape of the piece of wood, the orientation of the grain, its density or the presence of bulks, no two pieces are alike. As such, the skilled carpenter adapts the geometry of the joint he/she aims to build to the nature of the wood at hand and the geometry of the structure surrounding the joint. That being said, a classification of wood joints is not totally out of reach, and some authors did try to list the most common ones [43,77,101,118]. While Klaus Zwerger in [118] compares wood joints in Europe and Asia in a rather literary style and provides numerous pictures of built assemblies in these continents, Torashichi and Matsui in [101] have a more engineering approach as they provide a short description and pictures of toy assemblies, detailed diagrams if one wants to try to fabricate some, as well as, quite interestingly, mechanical test results to compare the geometrical resistance and failure modes of similar joints. They also provide, for some joints, the algorithm and geometrical formulae one should follow to carve them. In a similar spirit, Sato and Nakahara,

[43] describe at length (and it resonates with some paragraphs of [118]) the tools needed to build traditional Japanese joinery, as well as the posture one should adopt on its workbench for each tool, before giving detailed and illustrated instructions on how to build such assemblies. They also provide a thorough chapter on where in a building should a given joint be used. Hereafter the enumeration of traditional timber joints is mainly inspired from [118] and [101], as well as the online dictionary [74].

Let us first begin with splice joints, aimed at joining structural members end-to-end. Numerous joints can be categorised as such, and are presented FiGURE 2.2. On the right of each joint, the cone of translational freedom of the blue part is depicted in blue: it means that the blue part may be disassembled from the black part by translating along any vector whose tip is on the blue cap. 2.2e: the mortise is open and the assembly may be (dis) assembled along planar translation only. This joint may withstand a small amount of tension if the tenon is inserted by force in the mortise, thus creating friction at the two interfaces parallel to the grain of the wood. Otherwise, the assembly may easily be pulled apart. FiGURE 2.2f presents a very common type of tenon joint, the stepped dovetailed splice (koshikake aritsugi in Japanese), to be used when the pieces of wood have to withstand both tension and compression. [101] specifies that the timber sections typically range between 105 and 120 mm. Special attention must be taken by the carpenter regarding the angle of the cheek of the dovetail: too small and the assembly could be still disassembled by tension. Too large and the shearing capacity of the joint would decrease. Torashichi and Matsui conducted a tensile test in [101]: the female part developed a crack along the grain of the wood, thus failing. Note that such dovetail joint and the edge-halved scarf (FiGURE 2.2b) were frequently combined to make the joint suitable for unsupported compressive loads ([118]). Used on larger timber pieces than the dovetail joint (150 to 200m), the stepped gooseneck splice (koshikake kamatsugi) was quite common in Japan, much less in Europe. A tensile test conducted on similar pieces of wood by [101] shows that the gooseneck joint has a stiffness about 7 times greater 1 than the dovetail joint and fails for a load 5 times greater. Two failure modes were observed at the head of the gooseneck: crushing of the wood on one side on the male part, and shearing on the other side on the female part. To prevent out-of-plane buckling and the male part slipping out of the female part, abutments could be added on both sides of the gooseneck, FiGURE 2.2h. For sections greater than 200mm that had to withstand tension forces, the rabbeted oblique scarf splice (okkake daisen tsugi), FiGURE 2.2i, is the most indicated. The two parts are identical. Additionally, to prevent lateral motions, two pins, depicted in red, could be inserted in mortises carved in the adhesion planes. While the pins are inserted, the blue part cannot be disassembled. The same tensile test shows a stiffness about 10 times greater and a maximal load 8.3 times greater than what was observed on the dovetail joint. A failure occurred through shearing through one of the adhesion planes. A close cousin is the mortised rabbeted oblique splice (kanawa tsugi) on FiGURE 2.2j. Parts must be assembled first vertically, then they must slide longitudinally onto each other to create room to insert a single draw pin, in red. Lateral motions are blocked by the abutments. According to [101], for the same tensile test, the ulti- 1 Stiffness ratios were eyeballed from graphs in the book. mate load is the same as for the previous joint. However, the nonlinear behaviour of this joint is much less stiff than the previous one. Two other joints, suitable to carry tension forces are depicted FiGURE 2.2k,l: the halved and tabled joint and its abutted version respectively.

Tenon joints are also a very large group. The oldest example known so far of a tenon and mortise joint dates back to 6000-4000 BC and was found in ancient water well in Germany [98]. Examples of such joints were already given FiGURE 2.2e,f,g,h, but the list goes on. They are used to assemble wood pieces end-to-end as well as orthogonally, FiGURE 2.3a. Among the significant joints, one may cite the most common one, be it in Japan or Europe FiGURE 2.3b. In the case of two orthogonal pieces of wood, the mortise may be open so that the tenon goes completely through it. In such a case, a pin may be inserted in the tenon to prevent disassembly. Otherwise, such joints are not suitable to carry tensile forces and, consequently, are sometimes combined with other joints (or fasteners) to prevent accidental disassembly. If a mortise and tenon joint is employed to join pieces of wood edge-to-edge, i.e. is the direction of the grain, it would be referred to as tongue-and-groove, to assemble floor planks or mural panels, FiGURE 2.4b (honzanehagi). Hardwood should be used. According to [118], such assembly is not very stable and should be nailed to a supporting frame. To qualify this statement, such boards were used as mural panels in some stave churches in Scandinavia and stood the test of time. The simplest of such an edge-to-edge joint is the butted boards (imohagi), see FiGURE 2.4a, which does not constitute a proper assembly. A very stable edge-to-edge assembly is presented FiGURE 2.4c: a dovetailed plank is inserted in a corresponding groove orthogonal to the direction of the butted planks. It joins them into one unified surface, particularly fitted for flooring. The V-groove joint of 2.4d (hibukurahagi) is not strong enough for flooring but works well for panelling. Similarly the rabbeted joint 2.4e (chigaihagi) was good for paneling and exterior siding.

It could also replace the abutted boards of the dovetail joint 2.4c ([118]). Finally, the spline joint of 2.4f (yatoizanehagi) should be made of hardwood and inserted into a groove cut in the sides of planks made of softwood.

A particularly interesting category of splices that were quite common in Japan but virtually unknown in Europe [118] were the family of the edge-and-faces-halved scarf, also called rabbeted oblique scarf splice in [101]. They were decorative splices with no particular structural application. Contrary to the joints presented FiGURE 2.2 which could be used both horizontally and vertically, the oblique scarf splices could only be used horizontally. The length of the inclined plane of the halved rabbeted oblique scarf splice, shown on Crossed right-angle joints were used to connect two horizontal orthogonal members of a roof or floor structure, see FiGURE 2.7. These joints are simple enough so that they can easily be adapted to non-orthogonal beams. The simplest of such joints, the stop dadoed crossed lap joint of 2.7a (watari kaki) consists simply of a notched beam inserted on top of another. A slightly more complex version consists in hollowing partly the other beam so it also has a notch, 2.7b, (watari ago). An elegant way to connect two beams so that the whole assembly is of constant height is to use a cross-lap joint 2.7c (ai kaki) where each beam is hollowed at half its depth. FiGURE 2.7d depicts an original joint (tasuki kake watari ago) where two opposing quadrants of a cross are hollowed out.

To assemble a column with ties, groundsills, girders etc. so-called connecting joints are used, FiGURE at creating a non-reversible2 assembly. Two small notches (blue) are cut on an otherwise standard tenon.

Once inserted in the mortise and in the final position, two wedges (red) are pounded inside the notches, which has the effect of splitting the tenon open and locking it, by friction, on the side of the mortise. A blind version jigoku hozo, i.e. a version where the tenon does not reach through the full depth of the other beam, is shown 2.8e. There the tenon beam is pounded on its back side until the tenon is split. The half dovetail joint 2.8f (katasage ari) connects a tie to a column. The dovetail is inserted by sliding its upper face (the noninclined plane) on the top of the mortise hole. Once fully in, it is slid downwards until the small abutment at the start of the dovetail, lower face, fits in the corresponding hole in the column. This opens a rectangular hole on top of the joint. Finally, a plug is driven in this hole to prevent accidental disassembly. The same process happens for the nimai kama tsugi 2.8g: the mortise hole is made taller than the extent of the two horizontal beams to leave enough room to slide one over the other. Once the end sides of the beams are touching each other, the upper beam is slid downwards and two wedges are symmetrically pounded in the hole to lock the assembly. FiGURE 2.8h shows how several joints are used together to create a sophisticated assembly connecting three beams to a column. The shorter male piece, a simple tenon with a hole for a pin, is inserted in the column and locked in place thanks to a transversal draw pint. The two other parts, long male and female pieces, are simply a pole tenon (saotsugi) whose working is presented FiGURE 2.6d,e with the addition of a transversal pin to further prevent any disassembling motion. When seen from below, this assembly seems seamless.

Let us finish this overview of built timber assemblies by the column splices FiGURE 2.9 (for illustrative convenience, the assembled columns are shown lying on their sides). Suitable for large sections of wood, these joints were used at the base of gates, shrines or belfry posts, [74]. Hardwood should be used, [101].

The first of such joints are the four faces dovetail splices (shiouhari) where two dovetail joints (see FiGURE 2.2f) are carved on two adjacent faces of the post and then extruded diagonally to the other two faces. As such, the joint has the particularity of showing a dovetail on each of its four faces. Its close cousin, the four faces gooseneck joint 2.9b, is better able to withstand tensile forces, but much harder to manufacture. Both of the joints should be assembled diagonally, in the direction of the extrusion. FiGURE 2.9c shows a splice that has only been found at the Otemon gate of Osaka castle. Contrary to the previous two joints, it should be assembled in a diagonal-downwards direction. While the blind splice, shown on 2.9d (hako tsugi), is said to be inferior in strength to the rabbeted oblique scarf splice (see FiGURE 2.2i,[101]), this joint has the advantage of being seamless, as the jointing lines are on the edge of the section, thus making it attractive when aesthetics is required. The last joint of this series is the clam-shaped splice (kai no guchi) which is to be assembled vertically (which is inconvenient for underpinning) and is, in a sense, similar to the tasuki kake watari ago shown on FiGURE 2.7d. Two opposite quadrants of a cross are hollowed, and the extremities of each quadrant exhibit a tenon-and-mortise pattern. This joint was used for prominent elements, [101]. This brief overview shows us the extent, in form and function, a skilled carpenter might reach when building complex joints. As we have just seen, this set is very rich but is ultimately limited by the manufacturing tools: saws and chisels can only cut straight edges. Thus, traditional joinery leaves unexplored a large range of design options. With modern digital fabrication technologies, such as CNC milling, robotic manipulation, laser cutting and additive manufacturing, the space of manufacturable assemblies get much broader. The will to explore this space has pushed numerous researchers to investigate various computational approaches to design interlocking puzzles as well as robotic assemblies. SECTiON 2.3.2 presents a review of the scientific literature on this subject.

COMPUTATIONAL DESIGN OF INTERLOCKING ASSEMBLY

Designing interlocking assemblies

Interlocking assemblies are defined by Song et al. in [89] as an assembly of rigid parts such that only one of them, the key, is movable while any other part or subset of parts are immobilised relative to one another.

The literature on the subject is rich with, for instance, [117] who designed furniture joinery and study the stability of the structure, [53] who introduces a remarkable software to design wood joints with a special focus on fabricability, or [105] who builds a framework aimed at generating novel assemblies and presents examples of voxelised puzzles. These approaches can be categorised into two families: they are cataloguebased, meaning that possible joints are predefined in some catalogue (or similarly that the user is supposed to already have some knowledge of the geometry of the joint) or voxel-based which limits the space of accessible shapes for a given voxel resolution.

Catalogue-based designs:

As recalled by [107], there mainly are three kinds of integral joints3 , shown on FiGURE 2.10, and numerous the authors who derived assemblies whose joints are of one of these types. The simplest of all, planar contact joint 2.10a, is typically used in masonry modelling, be it to procedurally model historically-inspired buildings [111] stable under self-weight (see FiGURE 2.11a), puzzles [29] 2.11b or, a rather rich field of research, to design topological interlocking assemblies. In [28] Estrin and coauthors define "a topological interlocking is a design principle by which elements (blocks) of special shape are arranged in such a way that the whole structure can be held together by a global peripheral constraint, while locally the elements are kept in place by kinematic constraints imposed through the shape and mutual arrangement of the elements". To the best of our knowledge, the first recorded example of such assembly is Abeille's flat vault, [32] 2.11c, patented in 1699, which consists in the geometric arrangement of a single repeated truncated tetrahedron.

Two faces of the block are supported by two adjacent blocks while two others faces carry two neighbouring blocks. The structure assumes a fixed surrounding frame. This geometrical finding was further extended in numerous works, with for instance [56] (2.11d) or [108] (2.11e) who, by slightly modifying the geometry of each convex part, find a stable (under gravity) topologically interlocked design approaching a free-form goal surface. In [109], Weizmann and coauthors study the mechanical behaviour of floors made of various types of topological interlocked blocks. They found that it led to an increase in material consumption compared to more traditional flooring techniques and finish their article by applying topology optimisation on a block already possessing the interlocking qualities in order to reduce its mass. Wang et al. [108] also developed an optimisation scheme, but this time to make a topological interlocking structure stable under a given amount of lateral loading. The mechanical behaviour of such Abeille's type bound has also been studied extensively in for instance [17] and, in a nutshell, the results are that in addition to the ease of (dis)assembling such structures, they exhibit large energy absorption capacity, high resistance to crack propagation and tolerance to local failures [28].

The second class of integral joint is the curved contact, shown on FiGURE 2.10b. Quite interestingly, according to J. Gallon in [33], father S. Truchet was dissatisfied with the inverted-pyramidal hole left in the extrados of Abeille's surface (see FiGURE 2.11c). As a consequence, he developed right after Abeille a non- Abeille's vault, from [33]. b) -osteomorphic blocks from [27]. c) and d) 3D tile components, respectively from [94] and [START_REF] Akleman | Generalized Abeille tiles: Topologically interlocked space-filling shapes generated based on fabric symmetries[END_REF].

convex element so that both the intrados and extrados of the surface would be filled, see FiGURE 2.12a. The principle stays the same: a repeated element carries two neighbours and is supported by two others. Extension to this work were made in [27] with the so-called osteomorphic block (2.12b), in [28] or recently in [START_REF] Akleman | Generalized Abeille Tiles: Topologically Interlocked Space-Filling Shapes Generated Based on Fabric Symmetries[END_REF].

The mechanics of curved topological interlocking assemblies are studied in [26]. In a different spirit, curved assemblies are also used to tile 3D-space with Delaunay lofts [94], 2.12c, or bi-axial generalised Abeille's tiles [START_REF] Akleman | Generalized Abeille tiles: Topologically interlocked space-filling shapes generated based on fabric symmetries[END_REF], 2.12d. Wang et al. built a tool in [106] aimed at creating curved cone joints between user-given parts. Their work is hybrid: while a joint is always modelled by a cubic spline (or a discretised counterpart)

and thus their method qualifies as catalogue-based, the specific shape of each joint is optimised, taking into account the geometrical features of the other parts and some stability measure, thus making each joint different from the others.

The third and last kind of integral joints listed in the survey [107] are conventional, or traditional, joints.

Significant work has been made to automatically generate assemblies made of parts chosen in a catalogue of such conventional joints: several authors [20,44,87], investigated the creation of 3d assemblies made of planar pieces that are laser cut. The joint is always a notch in at least one of the two parts in contact.

Testuz and coauthors [99] build hollow 3D shapes using a finite set of Lego bricks, which are mortise and tenon. Lo et al. [55] create 3D puzzles by meshing a given surface using quads, extruding them to give the puzzle some depth and merging adjacent quads to create polynomios (Tetris-like shapes). Careful consideration of the motion space for each polynomio gives an assembly direction and thus the orientation of the tenons and mortises assembling two parts. Xin et al.,[115], explore the partitioning of 3D shapes into a set of 6-parts burr puzzles, consisting of notched sticks, much like what is shown on FiGURE 2.7a and c; Fu and coauthors [30] developed a method aimed at creating global interlocking furniture assembly from a model of orthogonally intersecting 3D shapes and generated the joints from a lookup table containing, among others, different kind of dovetails and mortise and tenon joints. In a different spirit, Luo et al.,[57], partition a 3D shape into printable parts and assembles them through mortise and tenon kind of joints and Yang et al.

[116] present a material-aware algorithm to modify the overall shape of a structure but connects parts with mortise and tenon joints.

The interested reader is referred to the survey [107], which thoroughly reviews the literature on several aspects, unexplored in this manuscript, regarding assemblies with rigid parts: structural stability of an assembly, packing efficiency, fabrication aware assembly (3d printing, CNC machining), or reconfigurable assemblies.

Voxel-based designs:

Most of the other methods available in the literature to generate interlocking puzzles are voxel-based which restrict the assembling motions to the three canonical orthogonal directions of R 3 : [89] focuses on recursive interlocking puzzles where at each step of the assembly sliding sequences of 3 parts are tightly interlocked.

Thus only one assembling sequence is possible. This work was later refined in [90] who carefully subdivides an input mesh into a set of voxelised parts such that every K ≥ 3 parts are tightly interlocked, FiGURE 2.13a. Yao et al. [117] implemented a tool that asks the user for the exterior appearance of the joints between structural components and automatically computes the internal solid geometry needed to connect and assemble the parts. Remarkably they were able to rediscover many traditional Japanese joints with intricate geometry. The main drawback of their approach is that the assembling motions are restricted to a set of 26 directions of translation in 3D (8 in 2D).

A compelling study has recently been made by the authors of [53]: their work about the design of wood joints is both voxel-based and catalogue-based (but supports adaptation to non-orthogonal and non-square joints by linearly deforming the grid of voxels) and primarily focuses on interaction with the human user, fabrication and mechanical relevance. An example of a built joint obtained through their method is presented on FiGURE 2.13b.

Aharoni et al. wrote an elegant paper [START_REF] Aharoni | Topology optimization of rigid interlocking assemblies[END_REF] that does not fit in any of the above categories. They generate multi-part interlocking assemblies through a density-based topology optimisation scheme taking into account both the assembling (which must be as easy as possible) and the interlock level (as high as possible). A prominent feature of their work is the fact that the structural behaviour of the parts is considered and guides the optimisation. The main drawback is that the user must specify in advance which parts are in contact, and what motion should each part block with respect to its neighbours. As such it is a tool for optimisation rather than exploration, more suitable in later design phases. We shall focus on an earlier stage, where the user inputs less information and thus enjoy a greater design freedom, but where no structural optimisation is performed.

Disassembly planning

Assembly planning (or its pendant disassembly planning) refers to the problem of finding a sequence to fully (dis)assemble the parts constituting an assemblage, [48]. Several methods were developed and are thoroughly reviewed by [52], [107]. An interesting approach, on which we put an emphasis, was first proposed in [113]: given an assembly made of various parts, the authors introduced the concept of Non Directional Blocking Graph (NDBG) to encode blocking relations between the parts in directed graphs. By analysing these graphs the authors are able to find, for each step of the (dis)assembly process, which set of parts to move and what motion to follow to perform the task. While the method works theoretically both for translation and rotation, in practice they implemented an algorithm that "considers all pure translations plus some suggested generalised motions" without adding more details. Their method, for translation only, was later improved in [85] which makes further use of local contact information between parts. Wang and coauthors in [105] were the first to leverage the kind of graph analysis introduced in [113] to automatically generate voxel-based interlocking assemblies. They designed an efficient puzzle generator that can be assembled along orthogonal translations. Even though they restrict themselves to voxelised structures, the authors fully explore the accessible design space and successfully manage to generate globally interlocking pieces without much computational effort, see FiGURE 2.13c. Their work serves as the basis of ours.

ROBOTIC ASSEMBLY

Among many possible solutions, a route worth exploring to assemble in practice the assemblies involves robots helping skilled human workers to assemble reversible structures. Several national and international initiatives are already undertaken in this direction, DFab at ETH Zurich, the Cluster of Excellence in Stuttgart, and the DiXite project in France, of which this thesis is a part.

In an environmental stance akin to ours Kunic and colleagues [51] developed a set of 13 timber elements that can be assembled pairwise in numerous ways; the discrete design space has a size combinatorial in the number of base elements, similar to a Lego kit. In a seamless workflow, a stress-optimised structure is assembled by a robotic arm working collaboratively with a human through reversible bolts and nuts assemblies. The human is made necessary by the build-up of errors and tolerances along the construction of the structure. Individual elements can therefore be extracted at the end of the lifetime of the structure, and their versatility makes them suitable for being assembled in a different geometry. Apolinarska et al. further automatised the assembly process in [START_REF] Apolinarska | Robotic assembly of timber joints using reinforcement learning[END_REF]. They used reinforcement learning to have a robot learn to assemble beams through integral lap joints subjected to tolerance, by leveraging contact information between the parts, see FiGURE 2.15a. In their book [START_REF] Bock | Robot-Oriented Design: Design and Management Tools for the Deployment of Automation and Robotics in Construction[END_REF] (chapter 6) Bock and Linner argue that tolerances and accuracy are of major importance in robotic fabrication give guidelines to improve the construction design: the overall number of joints should be low, the joining mechanism should be simple (riveting instead of screwing for instance), and the joining system should be standardized. They also introduce the idea of compliant design to help for the self-adjustment and self-fixation of the parts of the assembly, see FiGURE 2.14, where the edges of the separating surfaces between the parts are bevelled so that when assembling, any error on the locations of the parts can be corrected by sliding. In this context of toleranced assembly, the geometrical features of the parts guide the assembling agent. In the course of this work (SECTiON 4.3.4) special care is taken to robustly optimise the assemblies generated through our method to ease the (dis)assembling process. The use of cooperative robots has also been extended to build non-planar structures. In [70] Parascho and coauthors used two robotic arms to sequentially built a structure made of triangulated discrete steel tubes. The robots switch their roles iteratively, alternating between a placing and supporting role: the first robot manipulates a steel tube to its position in the structure, maintains it while a human welds it to other tubes, and then acts as temporary support to hold the unstable structure. The second robot then becomes the manipulator of another tube before becoming in turn the support, which frees the first robot to go back to being a manipulator. This alternate process goes on until the completion of the structure. A prominent challenge with this approach lies in the fact that the robots must be carefully coordinated to avoid collisions.

Yet, aside from making scaffolding obsolete, this method has the great advantage of increasing the space of topologically and geometrically feasible structures, compared to using only one robot. This process was later refined in [71,72] where a masonry vault is built in tandem by two brick-laying robots: first, a central arch is built by both robots, and then each completes half of the structure. On top of the cooperation needed to address such a challenge, this research also used the full payload capacity of the robots, for them to support the self-weight of the bricks, see FiGURE 2.15c and d. Yet there are two problems with this method:

when supporting a brick of the central arch out-of-plane motions arise due to an offset support point, which forbids the scalability of this method to larger structures. To circumvent this issue, the authors had the idea to use a mortar (epoxy) between the bricks, so that a few consecutive bricks could support their self-weight in tension, letting the supporting robot only grip the bricks in the line of thrust of the arch, which prevents bending moments. Yet again, this method is not scalable for larger structures due to the time needed for the mortar to take, so the researchers envisioned adding a third robot to the process. An optimisation program is executed at each step to select the brick that should be gripped by the third robot to optimise various construction-related metrics. Again, the three robots alternatively switch roles. Finally, on the subject of human-robot cooperation, an exciting paper [18] was recently written by Bruun and coauthors. From the observation that in the aforementioned papers (and others) robots are always used as performers following a predefined execution plan but never as designers, the authors proposed an original design process where a duo of robots and a human operator communicate on the design while it is being constructed, allowing it to change dynamically during the erection process; neither the robots nor the human know in advance the structure. In concrete terms, a discrete sphere structure is incrementally built by two robots in tandem along the aforementioned process support-then-place, see FiGURE 2.15b. At each step, the location of a new sphere is randomly decided. If the placing robot evaluates it to be reachable, the location is then proposed to the human who validates it based on arbitrary criteria (aesthetics for instance). The central place the authors give to randomness ensures that the geometrical and topological spaces are thoroughly searched, which is also something we put an emphasis on in our work. The evaluation made by the robot reduces this broad space to the smaller feasible one, while the evaluation made by the human further bias this space to the desirable one.

PROBLEM STATEMENT

Generating interlocking assemblies is a difficult geometric challenge ([89]) and the methods reviewed in the literature attempt to simplify the problem by making strong assumptions on the shape of the assembly and the (dis)assembling motions which negatively impact the freedom needed to design novel assemblies. We argue that these assumptions ultimately stem from the fact that designing interlocking assemblies is essentially a wicked problem: each problem is unique, can be approached by many different methods, infinitely many designs are solutions to it, and because of competing goals (ease of fabrication, of assembly, mechanical relevance, etc.) no solution is best, one can only say that some designs are better than others. More formally, as for any structural object, the quality of an interlocking assembly strongly depends on the interaction of the five axes of design proposed by [START_REF] Bagneris | Structural Morphology Issues in Conceptual Design of Double Curved Systems[END_REF], namely form, force, structure, material, and technology. This conceptual approach is exemplified on the work of Larsson et al.,[53], on the inset.

On this example, while delivering stunning results, the authors had to assume an assembly (structure) made of wood (material), carrying most probably bending moments (force), milled with a 3-axis CNC machine (technology), with a grid of voxel as a design space (form), as well as additional assumptions such as a cube as a design domain and a single axis of assembly. Any change in those premises, for instance switching to a 5-axis CNC machine, greatly impacts the space of solutions and requires another algorithm to search it. More generally a good approach to designing assemblies, shown in FiGURE 2.17, would be through a multi-criteria optimisation where several designs are proposed to the designer who makes the final choice as to orient her work. These criteria (choice of material, technology, etc) are problem-dependent and could therefore be implemented a posteriori to curate the space of solutions, once the user knows how to navigate and explore the space of possible assemblies. As an example, for timber assemblies, the milling technology (3 to 5 axes, size of milling tools) and mechanical performance (governed by the strong anisotropy of wood) are obvious practical constraints that will dictate the performance of the assembly and, thus, the subset of suitable assembly shapes. Other technologies and material, like 3d-printed steel nodes [68] FiGURE 2.16, would come with different sets of feasibility constraints which would be met by different geometries of assembly.

PROBLEM STATEMENT

Our aim is to build design tools that fit in with the design for (dis)assembly movement. We want to explore the feasible design space rather than to optimise a single solution (FiGURE 2.17), and generate novel assemblies with the minimum of user inputs, and avoid a local optimum. To that end randomness plays a central role in our approach.

Given a design domain and an ordered list of N motions for disassembling (translations and/or rotations in 2D, generalised motions in 3D), the aim of this work is to partition the domain into N + 1 parts forming a sequential assembly A = {P 0 , P 1 , ..., P N }. Two parts play a special role: part P 0 is the reference part: it is held in place throughout the (dis)assembly sequence to prevent any ambiguity where the whole assembly may obey a rigid body motion; part P 1 is the key -as long as P 1 has not been removed from the assembly, no other part can move -and as such the assembly is interlocked. While the reference part P 0 is fixed, each P i , i ≥ 1, can only move along its prescribed motion in an infinitesimal sense, meaning that a motion of arbitrarily small magnitude does not lead a part to collide with any other. The puzzle created should not be recursively interlocking: P 1 shall be a key such as when not moved the entire assembly is blocked, but as soon as P 1 is removed, P 2 , P 3 , ..., P N can be removed as well. The only criterion that will be imposed is that the disassembling sequence "remove P 1 , then P 2 , ..., then P N " always exists (as illustrated on FiGURE 2.18), possibly among others.

A word of caution: the fact that the assemblies created and studied in this manuscript have parts that can only obey an infinitesimal motion may lead to degenerate cases where a part does obey an infinitesimal motion but will collide with another part for a motion of finite magnitude, and as such making the assembly deadlocked 4 for any practical purpose, see FiGURE 2.19. A clarification is needed concerning the definition of "interlocking". Some authors, [108], say that a structure made of multiple parts is interlocked when, assuming that one part is fixed in place (to prevent global rigid body motion of the whole structure), it is in equilibrium under any arbitrary set of external forces (i.e. the interaction forces between the parts match the external forces applied on the assembly). In other words, by applying any (possibly different) motion(s) to any subassembly, nothing moves. This is typically the case for an Abeille's flat vault, FiGURE 2.11c.

On the contrary, an assembly is not interlocked when by applying a motion along one or many directions of translation to a subassembly some parts move, with an example given on FiGURE 2.20.

Figure 2.20|

An example of a non interlocked assembly: by applying simultaneously a motion along the directions depicted by red arrows, the puzzle can be disassembled. Inspired by Julien Glath's work, [START_REF] Glath | Thinking and Designing Reversible Structures with Non-sequential Assemblies[END_REF].

That being said, in this manuscript an assembly is said to be interlocked when, given a fixed key, every part or set of parts is immobilised for all possible motions applied on each part, once a a time. Once the key is removed, the other parts may be taken off one at a time, such as illustrated on FiGURE 2.18. More details are given SECTiON 3.1.3.

CONTRIBUTIONS

The aim of this dissertation is to contribute to the research effort on the field of generating assemblies mainly along the following points:

■ With the notable, recent, exception of [START_REF] Aharoni | Topology optimization of rigid interlocking assemblies[END_REF] which has the drawback of specifying which parts are in contact, the literature so far only considers either catalogue-based joints, which do not explore at all the space of possible joins, or voxel-based, which explores only a very limited subset of this space. The first aim of this document is to fully explore the space of interlocking assemblies.

■

To the best of our knowledge, no research has ever been conducted on the generation of assemblies whose parts are to be (dis)assembled along rotational motions in 2D, or generalised 3D motions. The second aim of this document is therefore to unveil this blind spot.

■

While actual robotic manipulation was not a part of this PhD, extensive statistical studies of the role played by imperfections (on the geometry of the assembly and/or on the location of the actuator manipulating it) were conducted as to give guidelines and heuristics to better optimise assemblies and to control the amount of freedom given to the operator (human or robot) tasked with (dis)assembling them. To our knowledge, it is the first time that this type of robust geometrical optimisation has been conducted on assemblies.

DEFINITIONS

Using the terminology presented in [107], we restrict our study to interlocking sequential assemblies made of rigid polygonal parts in two dimensions (2D), and polyhedral parts in three dimensions (3D), obeying infinitesimal motions. Several terms need to be explained and clarified using [41]:

■ Workspace: In this study, the workspace refers to the physical space in which the assembly is. It is modelled either by R 2 or R 3 .

■

Design domain:

The design domain is a rigid body, modelled by a finite compact manifold, which is partitioned into parts forming an assembly. Throughout this manuscript, unless specified otherwise, the design domain will be a square or a cube. ■ A part obeys an infinitesimal motion: Given two parts P i and P j in contact (i.e. a subset of each of their boundary overlaps), P i obeys an infinitesimal motion if, at the end of a trajectory of arbitrarily small length along that motion, no point in P i belongs to the interior of P j . Otherwise, P i does not obey that motion and the two parts collide. By extension, we will also say that an assembly obeys a set of motions if and only if each of its constitutive parts obeys an infinitesimal motion from that set.

NON DIRECTIONAL BLOCKING GRAPH

BLOCKING RELATIONSHIP IN ASSEMBLIES

For this exposition to be self-contained we recall some elementary facts about blocking relationships in assemblies. Additional details and proofs can be found in [113].

The aim of this chapter is, given a 2D assembly A = {P 0 , P 1 , ..., P N }, to explain how to check whether it is interlocked and which set of motions each part may obey. To that end, SECTiON 3.1.1 explores the relationship between a given 2D assembly A = {P 0 , P 1 } and the set of motions P 1 can obey, SECTiON 3.1.2 explains how, given an assembly and a motion (translation or rotation), one can assess the blocking relationships between the parts for that motion, and SECTiON 3.1.3 investigates how, given an assembly, its interlocking for all directions of motion is determined only by the interlocking of a small discrete set of motions.

CONE OF INFINITESIMAL FREEDOM OF MOTION IN 2D

Translation

For the sake of simplicity and illustrative purposes, we begin this study by only considering 2D assemblies obeying translations.

A formal way to represent a direction of translation in 2D is by the mean of a vector x t ∈ R 2 (subscript t for translation). As we consider infinitesimal motions only, what matters to us is the direction and not the magnitude of x t . As such we can, without loss of generality, scale x t to be a unit vector: ||x t || = 1. Vector

x t can be reinterpreted as being a point in R 2 . Because this point is at a distance 1 from the origin, it lies on the unit circle. This being true for any unit x t ∈ R 2 we denote the locus of all directions of translation in R 2 by the unit circle S 1 . In other words, any point on the 2D unit circle S 1 is a direction of translation. This section aims to understand the relationship between a given 2-parts assembly A = {P 0 , P 1 } and the set of translational motions P 1 can obey. The simplest polygonal assembly A = {P 0 , P 1 } we can think of is such that the separating curve between P 0 and P 1 is simply a line segment. On FiGURE 3.2, the design domain is the square on the left, the separating curve between the two parts is the line segment highlighted in blue and the green arrows represent several valid directions of translation such that P 1 can obey them. The red ones depict invalid directions of translation as moving P 1 along them will lead the two parts to intersect. The set of all valid translations constitutes a so-called half-space of motion. On FiGURE 3.2, let n be the unit normal vector of the separating curve oriented from P 0 to P 1 (the black arrow). Then we can state that P 1 may obey a direction x t ∈ R 2 if and only if n • x t ≥ 0, that is to say if x t belongs to the blue semi-circle oriented by n, on the right of the figure. A somewhat more complex result can be obtained by analysing a separating curve made of two line segments. On FiGURE 3.3 each line segment of the separating curve defines a half-space of motion. P 1 can obey any x t that is in both half-spaces of motion i.e. any x t such that n A • x t ≥ 0 and n B • x t ≥ 0. We call cone of translational freedom the cone resulting from the intersection of the half-spaces of motion defined by the normal of each line segment of the separating curve. More generally, for a polyline made of k line segments, any vector x t in the cone of translational freedom is a solution to the linear system

         n 1 • x t ≥ 0 . . . n k • x t ≥ 0 3.1
Note that when two half-spaces of motion are antipodal (meaning there exists two normals n p and n q negative of each other, n p = -n q , and n q • x t = 0), the resulting cone of freedom reduces to a single direction, as depicted on FiGURE 3.4. Observe that given two parts in contact P i and P j , the cone of freedom of P j Figure 3.4| By intersecting half-spaces of motion, the cone of translational freedom of P1 can be defined. Note that this cone may be reduced to a single direction as highlighted in the example on the right.

relative to P i is exactly the antipodal cone of P i relative to P j : indeed if P i is able to translate along a given

x t ∈ R 2 while P j is held in place, then P j can translate along -x t while P i is fixtured, [113]. In that sense, we can focus on only one half of the total set of directions of translation (so only one semicircle of the locus of all directions of translation in 2D) as the other half conveys the same information. That is why only the cone of freedom of one part relative to the other will be represented as the antipodal cone does not add to the sum of information available. SYSTEM (3.1) can be rewritten in a matrix form:

A t x t ≥ 0 3.2
Where the subscript t stands for translation, and:

A t =       . . . . . . y i -y i+1 x i+1 -x i . . . . . .       ∈ R k×2
Using this formalism, the cone of translational freedom is the set

C t = {x ∈ S 1 , A t x ≥ 0} 3.3 3.1.1.2 Rotation
The mathematical formula that finds, given a 2-parts assembly, the cone of translational freedom of P 1 is quite straightforward to derive. When considering rotational motions, things are almost as forthright, especially thanks to the infinitesimal motion hypothesis.

In a general setting, the point p = (x, ŷ) T obtained by rotating a point p = (x, y) T by an angle ψ around a centre point x r = (x r , y r ) (subscript r for rotation) is given by:

  x ŷ  =   cos ψ -sin ψ sin ψ cos ψ     x -x r y -y r   +   x r y r  
Because we restrict this study to infinitesimal motions, we assume |ψ| 1 and a first-order Taylor expansion yields

  x ŷ  =   x y   + ψ   y r -y x -x r   3.4
EQUATiON (3.4) states that an infinitesimal rotation of p around x r is the same as an infinitesimal translation of p along the vector (y r -y, x -x r ) T .

Let the vector-valued function

m : R 2 × R 2 -→ R 2   p =   x y   , x r =   x r y r     →   y r -y x -x r   3.5
We call m(p, x r ) the instantaneous direction of motion of point p relative to x r , abbreviated m p when the location of x r has been specified and is not ambiguous. Note that this vector is orthogonal to the line going through x r and p. These quantities are illustrated on FiGURE 3.5. A necessary and sufficient condition for the part P 1 to obey a (counterclockwise) rotation around a given centre x r is to have the instantaneous directions of motion of all points p on the boundary of P 1 not pointing towards the interior of P 0 . Indeed if there is one point p on the boundary of P 1 such that m p points towards the interior of P 0 then an infinitesimal rotation around x r will send that point to collide with P 0 which exactly means that P 1 does not obey x r . Moreover, since we focus on infinitesimal motions, we only need to study the points on the boundary of both P 0 and P 1 . In other words the fact that P 1 obeys x r depends only on the geometry of the separating curve between P 0 and P 1 .

On the assembly depicted on FiGURE 3.5, the separating curve between the two parts is the line segment

[p A , p B ] of normal n.
Having the instantaneous direction of motion, m p , of each point p of the line segment to be pointing inside P 1 means that ∀p ∈ [p A , p B ] m p • n ≥ 0 . Thus, one has the equivalences:

P 1 obeys a rotation around x r ⇐⇒ ∀p ∈ [p A , p B ] m p • n ≥ 0 3.6 ⇐⇒ ∀p ∈ [p A , p B ] ∃t ∈ [0, 1]          p = (1 -t)p A + tp B   y r -((1 -t)y A + ty B ) (1 -t)x A + tx B -x r   • n ≥ 0 3.7 ⇐⇒ ∀t ∈ [0, 1] ((1 -t)m p A + tm p B ) • n ≥ 0 3.8 ⇐⇒    m p A • n ≥ 0 m p B • n ≥ 0 3.9
With ∆x = x A -x B and ∆y = y A -y B , EQUATiON (3.9) can be rewritten as a matrix inequality:

EQUATiON (3.9) ⇐⇒   ∆x ∆y ∆x ∆y     x r y r   ≥   x A ∆x + y A ∆y x B ∆x + y B ∆y   3.10
EQUATiON (3.10) reveals the geometrical meaning of the equations: it states that for P 1 to obey a rotation around x r then x r must lie in the intersection of two half-planes whose respective boundaries are lines orthogonal to the segment [p A , p B ] and going through p A and p B , such as illustrated on the left of FiGURE 3.6.

Note that one can readily find the half-plane containing points around which P 1 obeys a clockwise rotation by inverting the inequality in EQUATiON (3.10), as illustrated on the right part of FiGURE 3.6.

To sum up, given the simplest 2D polygonal assembly where the separating curve is the segment

[p A , p B ],
the plane R 2 can be partitioned in 3 semi-infinite regions:

■    x ∈ R 2 ,    m(p A , x) • n ≥ 0 m(p B , x) • n ≥ 0   
and P 1 obeys a counterclockwise rotation around any point in that set. On FiGURE 3.7, this set is the half-plane "above" the blue line.

■    x ∈ R 2 ,    m(p A , x) • n < 0 m(p B , x) • n ≥ 0   
and P 1 cannot obey a rotation around any point in that set. On FiGURE 3.7, this set lies "between" the blue and red lines.

■    x ∈ R 2 ,    m(p A , x) • n < 0 m(p B , x) • n < 0   
and P 1 obeys a clockwise rotation around any point in that set.

On FiGURE 3.7, this set is the half-plane "below" the red line.

Obeys a counterclockwise rotation Obeys a clockwise rotation Obeys no rotation

Stereographic projection

For illustrative purposes, it may be easier not to manipulate these semi-infinite planes but rather their projection on S 2 , the unit sphere embedded in R 3 . Indeed, as the whole plane is mapped to the sphere, such half planes are mapped to spherical caps, making the illustration much more compact and often more readable. The interested reader is referred to APPENDiX A for a rigorous definition of the stereographic projection used in this manuscript. On FiGURE 3.8, the (inverse) stereographic projection maps the half-planes cor- responding to the set of counterclockwise and clockwise centres of rotation to two spherical caps. These caps are termed caps of counterclockwise (or clockwise) rotational freedom. The infinite stripe separating the half-planes (in white on the left of FiGURE 3.8) is mapped to the grey area on the sphere. These three regions are tangent at the north pole (the projection point, (0, 0, 1) T in the usual cartesian frame): indeed as the north pole on S 2 is mapped to infinity on R 2 , and a rotation with a centre at infinity is the same as a translation, the fact that the north pole belongs simultaneously to the three regions (to both caps, as well as to the remaining, grey, region), simply means that, for this assembly, one can find directions of translation that could be obeyed (for instance a translation to the right, on FiGURE 3.8), or not (translation upwards), by

P 1 .
In the remainder of this manuscript, when dealing with 2D rotations, x r will refer indistinctively to a centre of rotation x r ∈ R 2 or its projection x r ∈ S 2 . Any ambiguity can be removed by simply moving back and forth between these two representations.

Let's further our understanding of the set of valid centres of rotation. If the separating curve is made of two line segments between points p 1 , p 2 and p 3 , of normal vectors n 12 and n 23 oriented from P 0 to P 1 , the set of possible centres of rotation is given as the solution to the system of unknown x r ∈ R 2 :

               m(p 1 , x r ) • n 12 ⋆ 0 m(p 2 , x r ) • n 12 ⋆ 0 m(p 2 , x r ) • n 23 ⋆ 0 m(p 3 , x r ) • n 23 ⋆ 0 3.11
where operator ⋆ stands for ≥ to find the set of centres of counterclockwise rotation or ≤ to find the set of clockwise centres. Geometrically, this set is found by intersecting the relevant half-planes in R 2 , or, equivalently, the relevant caps on S 2 , as depicted on FiGURE 3.9. Once projected on the sphere S 2 , such a set can be seen as a cone, hence the name cone of rotational freedom.

=

Figure 3.9| Given an assembly of two parts, whose separating curve is made of two line segments, the cones of rotational freedom are obtained by intersecting the caps built with each line segment.

More generally, for a polyline made of k line segments, linking points p 1 , ..., p k+1 , with normal vectors n 1 , ..., n k , the cone of rotational freedom is the set of points solution to the system of unknown x ∈ R 2 :

                           m(p 1 , x r ) • n 1 ⋆ 0 m(p 2 , x r ) • n 1 ⋆ 0 m(p 2 , x r ) • n 2 ⋆ 0 . . . m(p k , x r ) • n k ⋆ 0 m(p k+1 , x r ) • n k ⋆ 0 ⇐⇒ ∀i ∈ 1, k ,    m(p i , x r ) • n i ⋆ 0 m(p i+1 , x r ) • n i ⋆ 0 3.12
For instance, on FiGURE 3.10, given the assembly on the left, there only exists the cone of clockwise rotation:

no counterclockwise rotation (and no translation since the north pole does not belong to the set) can be obeyed by P 1 . The cone of rotation may also be reduced to a single point, as depicted on FiGURE 3.10, right. SYSTEM (3.12) can be written in matrix form:

A r x r ⋆ b 3.13
Where subscript r stands for rotation, and:

A r =                   x 2 -x 1 y 2 -y 1 x 2 -x 1 y 2 -y 1 x 3 -x 2 y 3 -y 2 x 3 -x 2 y 3 -y 2 . . . . . . x k+1 -x k y k+1 -y k x k+1 -x k y k+1 -y k                   ∈ R 2k×2 b =                   (x 2 -x 1 )x 1 + (y 2 -y 1 )y 1 (x 2 -x 1 )x 2 + (y 2 -y 1 )y 2 (x 3 -x 2 )x 2 + (y 3 -y 2 )y 2 (x 3 -x 2 )x 3 + (y 3 -y 2 )y 3 . . . (x k+1 -x k )x k + (y k+1 -y k )y k (x k+1 -x k )x k+1 + (y k+1 -y k )y k+1                   ∈ R 2k
With this formalism, the cones of rotational freedom (be it counterclockwise or clockwise) are the sets:

C ccw r = {x ∈ R 2 , A r x ≥ b} C cw r = {x ∈ R 2 , A r x ≤ b} 3.14a 3.14b
Where superscript ccw (resp. cw ) stands for counterclockwise (resp. clockwise).

Translation and rotation

As hinted on FiGURE 3.9, when a cone of freedom extends to the north pole of S 2 (the projection point), then the part obeys a translation (as a rotation around a centre at infinity is the same as a translation). Given a polyline, one only needs to build the matrices A t , A r and vector b and compute the sets C t , C ccw r and C cw r given by SYSTEMS (3.3) and (3.14), see FiGURE 3.11.

Note that, quite surprisingly, it is possible to find assemblies obeying rotations but whose translation cone is reduced to a single direction, as shown in FiGURE 3.12. In this case, the centres of rotations are aligned.

DIRECTIONAL BLOCKING GRAPH -DBG

Should the reader be unfamiliar with graph theory, and particularly with the notion of strong connectedness, a quick introduction to this area of mathematics is given in APPENDiX B. The (counterclockwise) rotational cone is reduced to an arc, implying that the translational cone is reduced to a unique direction.

Definition

A Directional Blocking Graph (DBG), defined by Wilson and Latombe in [113], of an assembly A for a motion

x is a directed graph G(x, A) whose vertices P i correspond to each of the N +1 parts in the assembly A and an arc from vertex P i to vertex P j means that part P i is blocked by part P j in A for an infinitesimal motion of part P i along motion x while holding part P j in place.

For instance, referring to FiGURE 3.13, the DBGs G(x, A) for different motions x are given. Let us first take a look at the behaviour in translation of the assembly (the rightmost part of the figure). The cone of translational freedom C t is depicted in blue, and for any x ∈ C t (on FiGURE 3.13 one such x, in blue, is taken in the interior of the cone and another one on its extremity), then by definition of C t , P 1 obeys this x, that is to say that P 1 is not blocked by P 0 . On the other hand, P 0 is blocked by P 1 along such translation. Thus, the DBG G(x, A) contains only one arc, e 0→1 (from P 0 to P 1 ), stating that P 0 is blocked by P 1 for a translation along x. Conversely, as the arc e 1→0 (from P 1 to P 0 ) does not exist, the graph encodes the fact that P 1 obeys x. If

x is taken outside of the cone of translational freedom of P 1 (but not inside the antipodal cone), as figured by the two x in black, then neither P 1 nor P 0 obey x. This blocking relationship is encoded in the relevant G(x, A) by two arcs, from P 1 to P 0 and vice-versa. Finally, because the relation P i is locally free to translate along x relative to P j implies that P j is locally free to translate along the opposite direction -x relative to P i the DBG G(-x, A) can be deduced from G(x, A) by simply reversing the orientation of the arcs in the latter graph, [113].

The same principles apply to build a DBG in rotation: on (shown in black) neither P 0 nor P 1 can obey a rotation around x and thus both arcs e 1→0 and e 0→1 exist in

G(x, A).

A useful property of a DBG G(x, A) is that we can easily deduce whether the assembly A is interlocked for x by checking the strong-connectedness assembly is deadlocked for x 2 (an upwards motion of translation). In short, these two DBGs say that A may be disassembled by moving P 1 along x 1 , but it is impossible to disassemble A by moving any part P i along

x 2 .
On the bottom row of FiGURE 3.14 part P 1 has been removed and the assembly is now made of two parts {P 0 , P 2 }. G(x 1 , A) is strongly connected, meaning that one cannot move any part along x 1 , and the one associated to the upwards translation, G(x 2 , A) has two strongly connected components, namely {P 0 } (blue)

and {P 2 } (red). Moreover, since no edge starts from P 2 , the latter is not blocked by P 0 for that upwards direction x 2 : it can obey such x 2 and as such A can be disassembled.

Note that identifying the strongly connected components of a graph can be solved by polynomial algorithms, [START_REF] Tarjan | Depth-First Search and Linear Graph Algorithms[END_REF], and thus, from a computational point of view, it is a cheap operation.

Computation

The computation of a DBG for a given motion x is straightforward. Let A = {P 0 , ..., P N } an assembly made of N +1 polygonal parts. To build the DBG G(x, A), the parts are looped upon, and the DBG is built incrementally, starting from a graph with no edge, by considering every pair of parts in contact.

Let P i and P j , j < i, be two parts in contact and let S denote the set of line segments shared by both parts.

Assume the normal vectors n k of the segments s k ∈ S to be pointing towards P i .

Translation

If the motion considered in the DBG is a translation along a given vector x t ∈ S 1 , then P i is blocked by P j if at least one segment in S has its normal vector pointing away from x t :

∃s k ∈ S, n k • x < 0 ⇐⇒ P i is blocked by P j
And edge e i→j is added to the graph G(x t , A). Conversely

∃s k ∈ S, n k • x t > 0 ⇐⇒ P j is blocked by P i
And edge e j→i is added to the graph G(x t , A).

Rotation

The motion is a counterclockwise rotation around a given centre x r ∈ R 2 . For each segment

s k = [p k , p k+1 ] ∈
S, the instantaneous directions of motion of the endpoints, m p k and m p k+1 , are calculated. Part P i is blocked by P j if the instantaneous direction of motion of a point on the boundary is pointing inside P j :

∃s k ∈ S, m p k • n k < 0 or m p k+1 • n k < 0 ⇐⇒ P i is blocked by P j
And edge e i→j is added to the graph G(x, A). Conversely

∃s k ∈ S, m p k • n k > 0 or m p k+1 • n k > 0 ⇐⇒ P j is blocked by P i
And edge e j→i is added to the graph G(x, A). Had we considered a clockwise rotation, the role played by < and > in the two equivalences above would have been switched. Such cells are illustrated on FiGURE 3.15: each part P i , i ∈ {1, 2, 3}, defines cones C t,i , C ccw r,i and C cw r,i that partition S 1 or S 2 into cells of dimension 0, represented by dots of colours, dimension 1, depicted by the arcs between two dots, and in the case of the rotational cones on S 2 , cells of dimension 2 (patches of surface between arcs). Note that the intersections of cones C ccw r,1 and C ccw r,3 defines cells of dimension 0, 1 and 2, as exemplified in the zoomed-in portion of the figure.

The DBGs over a given cell are regular meaning that the directed graphs remain constant when x varies over it, [113]. Hence one can associate each cell (be it of dimension 0, 1 or 2) with a unique DBG. The NDBG of an assembly A can therefore be defined as the locus of motions (S 1 in translation, S 2 seen as the inverse stereographic projection of R 2 in the case of rotation) partitioned into cells along with the DBGs associated to each cell. Wilson and Latombe in [113] also show that for a given cell, a subassembly S of A is locally free to translate/rotate if and only if there is no arc connecting S to A ∖ S in G(x, A) for a x taken in that cell.

Worded differently, if G(x, A) is strongly connected, then no subassembly can move along x; if there is at least one strongly connected component (that is not the full graph) in G(x, A) without any outgoing arc then the corresponding subassembly is free to translate along x. What makes NDBG a powerful tool to compute the relative motions of parts is that one needs only to look for strong connectedness in its constitutive DBGs to find the interlocking state of an assembly. Also, in [START_REF] Wilson | Partitioning An Assembly For Infinitesimal Motions In Translation And Rotation[END_REF] Wilson and Matsui state the following property:

Property:

For any two cells f 1 and f 2 such as f 1 is on the boundary of f 2 , if there exists an arc from P i to P j in G(f 1 ), this arc also exists in G(f 2 ).

Where G(f ) denotes the DBG of cell f . What this property means is that if there is an arc in the DBG of a cell of a given dimension, then this arc also exists in the DBG of neighbouring cells of higher dimensions. This This property proves to be extremely useful: as we have already understood, the DBGs associated with each cell state whether a part may obey any motion in that cell. Yet, as the DBG of a cell of higher dimension can be deduced from the DBGs of neighbouring cells of lower dimensions, one notices that to fully characterise the interlocking state of an assembly, i.e. to build the NDBG, it is sufficient to calculate only the DBGs associated to cells of dimension 0, which are in finite (relatively low) number! Following the definition of [105], we call these DBGs the base DBGs of the assembly. If all such base DBGs are strongly connected, but the one associated with the motion of the key P 1 which must have 2 strongly connected components (one being reduced to vertex P 1 , the other being all other vertices), then, using the property, the DBGs for every other motion are also strongly connected, and thus the assembly is interlocked.

We would like to insist on the definition of "interlock" in this dissertation. By definition, a DBG treats only the motion of one part relative to another one. It does not convey any information on the blocking relationship between a part and other ones when applying a motion to many parts at once. In that sense, a DBG does not carry enough information to say whether an assembly is interlocked. That being said, even though we should say that an assembly A is weakly interlocked for a given x when the associated DBG G(x, A) is strongly connected, we will, in the remainder of this manuscript, use in its place the word interlock, for simplicity. For instance, regarding translation only, the assembly of FiGURE 3.17 has a DBG (regular over all S 1 ) whose graph is strongly connected, meaning that by applying a translation x t ∈ S 1 to every single part, once at a time, the puzzle cannot be disassembled. Yet, as seen in this figure, it is not interlocked as simultaneous motions along specific directions allow the disassembling of the assembly.

CONCLUSION

This short chapter aimed at recalling a few basic facts about 2D interlocking assemblies. SECTiON 3.1.1

showed that given a separating polyline (p i ) i∈ 1,k , the cone of freedom of motion, i.e the set of motion it can obeys is given in translation by the set C t and in rotation by the cones C ccw r and C cw r . These sets are built using inequalities of the form n i •y ≥ 0 where y stands for either the instantaneous direction of motion of the end points of the segment i with respect to a centre of rotation, or a direction of translation (which is remarked to be essentially the same thing as an instantaneous direction of motion, thus unifying the concepts in translation and rotation).

Introducing these inequalities helped us understand how the Directional Blocking Graph of an assembly is built for a given motion x, as seen in SECTiON 3.1.2. Once the graph is available, its edges (or lack of) teaches us about the blocking relationships in the assembly along x. In particular, we understood that if a DBG G(x, A) is strongly connected, then the assembly is interlocked for motion x.

The Non Directional Blocking Graph (NDBG), presented in SECTiON 3.1.3, is built upon the notion of DBG and fully assess the interlocking of an assembly for all directions of motion. Only a discrete and finite set of base DBGs needs to be calculated for the interlocking to be fully known. Moreover the base DBGs give all the disassembly sequences (and thus, by reversing the order, all the assembly sequences). Indeed at each disassembling step, the strong-connectedness of the DBGs are calculated. When one DBG is not strongly connected, the part(s) associated to one of the strongly connected component can be removed along the motion associated with that DBG. The corresponding vertex (or vertices) and adjacent edges are removed from all other graphs and the next disassembling step may start, and such algorithm goes on until we are left with part P 0 .

While the theory behind the NDBG completely works for 3D assemblies, we have not explained how 3D motions are encoded, and thus we cannot explain which set of motion, which cone, a 3D part may obey.

Unit dual quaternions will be introduced in SECTiON 5.1, and following that the computation of the cone of freedom of motion for a 3D part will be explained in SECTiON 5.2. As for now we leave aside the 3D world, and CHAPTER 4 focuses on reverse-engineering the knowledge gained in this chapter so it can be used to generate 2D interlocking assemblies. CHAPTER 4

2-D ASSEMBLIES

CREATING AN ASSEMBLY

In SECTiON 3.1.1, we have understood how the cones of freedom of motion can be calculated given an assembly. The aim of this chapter is to reverse-engineer this relationship: how, given an ordered list of desired cones of translational freedom and centres of rotation, a 2D assembly obeying these motions can be automatically generated. We will first investigate how shall the first part P 1 , the key, be created, or equivalently how to create a 2-parts assembly. Two approaches are explored: the first one, described SECTiON 4.1.1, calls to basic and intuitive concepts but becomes cumbersome to implement when it comes to a part obeying a rotation. Still, it seems to be a good and easy way to first discover the issue we are trying to solve. The second one, described SECTiON 4.1.2, is much more mathematically-inclined, but has the advantage of keeping things simple in rotation and is readily scalable in 3D. Once the key is created, SECTiON 4.1.3 focuses on how the rest of the parts shall be created.

Let us first start this study by creating a 2-parts assembly.

At the most fundamental level, generating such an assembly boils down to drawing a separating curve linking two points on the boundary of the design domain. A first part is created by the geometry on one side of the curve, and a second part by the geometry on the other side.

CREATING A 2-PARTS ASSEMBLY WITH TURTLE GRAPHICS AND A MARKOV PROCESS

While this section goes into greater details, most of the results presented here are taken from our article [START_REF] Gilibert | Rule-based generative design of translational and rotational interlocking assemblies[END_REF].

Definitions

Turtle graphics is a popular way to introduce children to the basics of coding: a virtual Turtle is displayed on the screen of the computer and moves in the 2D plane according to instructions given by the user while leaving a trace on its path. These instructions are of the form "Walk by l unit"; "Rotate by θ radians". The children are then tasked to find and code a sequence of instructions that lead the Turtle to draw some objective design: a square, a star of David, or any more complex shape. For instance the sequence of instructions: In a spirit similar to [START_REF] Oval | Feature-based Topology Finding of Patterns for Shell Structures[END_REF], in this first approach we will use such Turtle as an agent that draws the polylines partitioning the design domain into parts constituting our assembly.

■ walk 1 ■ rotate 90 • ■ walk 1 ■ rotate 90 • ■ walk 1 2-D assemblies
In probability theory, a Markov process, or Markov chain, ( [31]) is a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event (it is memoryless). A state is said absorbing if once entered the probability to leave it is 0. More specifically a discrete-time Markov process is a Markov chain with a countable number of states and the chain iteratively transitions between states at discrete time steps according to some probabilistic rules.

In the present study, we introduce a discrete-time Markov chain with a finite number of states and one absorbing state, herein referred to simply as Markov chain, to play the role of children in Turtle graphics as the one making up the sequence of orders to move the Turtle with.

Overview

Formally speaking, such a Markov process M is defined as a tuple (V, P) where ■ V is the set of possible states that the chain will transition between. In our case V = {start, rotate, walk, snap, end}.

■

State end is absorbing: once M reaches this state it cannot leave it. ■ P is the set of probabilistic rules specifying which transitions are available as well as their weights. It defines mappings p : V → V. We provide here a succinct description of the rules emitted by the chain M and how they are interpreted by the Turtle . More details are given below. Seven rules are defined in P:

0. start → rotate
The Turtle is randomly initialised on the boundary of the design domain and this order simply tells it to choose a random orientation parameterised by angle θ.

rotate → walk

The Turtle has already chosen an orientation and must now walk forwards by a random amount.

rotate → end

The Turtle has already chosen an orientation and walks forward until meeting an edge of the design domain. These strings are iteratively composed into a random sentence, for instance on FiGURE 4.3 the full sequence

emitted by M is start → rotate → walk → snap → walk → rotate → walk → rotate → walk → rotate → walk → snap → walk → rotate → walk → rotate → end.
At each iteration of the algorithm, the Turtle receives one of these five strings and acts accordingly. Since a sequence of the form [rotate or snap] → walk defines a segment and a polyline is simply constituted of concatenated line segments, this Markov process M is sufficient to draw a polygonal assembly. We do not need to add rules of the kind rotate → rotate as the final orientation could very well be obtained after a single rotate order. Similarly a walk → walk can be obtained with the sequence walk → rotate → walk where the Turtle happens to keep the same orientation before and after the rotate order. We will prove below that the Markov chain M aided by the Turtle can reach the full search space of polygonal assembly.

We propose to define a Markov process M that will instruct a Turtle so that the latter draws a polyline dividing the design domain into two parts, one of which obeying a user-prescribed motion x.

Generating a part obeying a translation

Let us first describe how to create a 2-parts assembly obeying a translation.

The user decides on two vectors of translation x A 1 and x B 1 bounding the cone of translational freedom of the would-be part P 1 . Enforcing x A 1 = x B 1 leads to the special case where the cone is reduced to a single vector that is to say where P 1 must translate along one direction only. Then a Markov chain M emits the start order which initialises a Turtle randomly on the boundary of the design domain. In subsequent iterations, M tells the Turtle whether to orient itself or to move. To comply with a walk order, the length l by which the Turtle moves is randomly picked in a user-defined interval [l min , l max ] (to have consistent step size, or edge length). To obey a rotate order, the rotation angle θ is randomly chosen in an interval such that the normal vector n of the line segment is such that n • x A 1 ≥ 0 and n • x B 1 ≥ 0. The reader's attention is drawn to the fact that this constraint on θ is enough to prevent the Turtle from crossing its path.

If the sequence of orders and random values leads the Turtle to wander outside of the design domain, a backtracking procedure is executed to replace it inside. At the end of an iteration, M randomly applies a production rule on the latest order it gave to get the one for the next iteration. Finally, when M emits the end order, the Turtle walks until meeting an edge of the design domain. Letting the Turtle move like this is likely to yield appalling results for two obvious reasons: ■ First, if the Turtle cannot cross its own path, nothing prevents it from drawing very fine details (where the angle between two successive line segments is close to π), which are impossible to manufacture and would anyway be very brittle. To prevent that, the Turtle is instructed to keep away from the previously drawn segment, by the mean of a user-chosen maximal angle between two successive segments.

■

Second, and more importantly, the random separating polyline obtained at the end will be such that the actual cone of translational freedom of P 1 strictly includes the user-prescribed cone bounded by x A 1 and x B 1 . As an extreme example, imagine that the user specified a vector x A 1 = x B 1 ≡ x 1 = (1, 0) T aligned with the x axis (meaning that the user wants P 1 to translate along the horizontal axis only) and the Turtle drew a single line segment, as illustrated on the top row of FiGURE 4.4. Even though P 1 does obey x 1 it also obeys a full half-space of motion which is undesirable behaviour. To reduce the actual cone of translational freedom of P 1 to the user-prescribed one, the Markov chain M is enriched by a special state that we call snap: it forces the parameter θ to be chosen such that the Turtle

is oriented either along ±x A 1 or ∓x B 1 .
The signs ±1 and ∓1 are randomly chosen at the initialisation of the Turtle . This ensures that when the Turtle snaps it draws a line segment whose unit normal vector n is such that either n • x A 1 = 0 and n • x B 1 ≥ 0 or vice-versa by switching the superscripts A and B . As such, the Turtle draws a valid polyline (i.e., such that the cone of translational freedom of P 1 exactly matches the user-prescribed cone) if and only if it snapped at least twice, once along ±x A 1 and once along ∓x B 1 , see FiGURE 4.4 bottom row, which gives a computationally light manner to check whether a polyline is valid.

Surjectivity of the Markov process M

We justify here that the Markov process M associated with the Turtle are sufficient to reach any polygonal assembly, i.e the mapping from the set made of M and the space of the Turtle 's parameters (l and θ) to the space of polygonal assembly is surjective.

Any polyline separating two parts must fit in the design domain. This observation gives an obvious upper bound on the value of l max , which could be the length of the diagonal of the bounding square of the design domain. In addition, setting l min = 0 ensures that the Turtle can draw infinitely small line segments and as such the full space of polygonal parts can be reached. But the mapping is not injective: for instance it is possible, although unlikely, that the magnitudes to walk or rotate by chosen by the Turtle for the sequence rotate → walk → rotate → walk on the one hand and rotate → walk on the other lead the same line segment, see FiGURE 4.5. As such two identical polylines can be obtained through two different sequences of orders and the mapping is not injective. Moreover, from a practical point of view, letting the Turtle draw infinitely small segments might not be desirable and the user may want to reduce the search space to the subset of polylines having a minimal segment length l min > 0. The upper bound l max can also be reduced to some smaller value as any polyline with a segment length greater than l max can still be reached by walking several times in the same direction. Thus the mapping to this subset is still surjective. Note that this mapping can be made injective by reducing a sequence emitted by M to the smallest possible word by tracking the times where the Turtle rotated by 0 rad (or snapped consecutively) and replacing instructions "rotate(θ i ) → walk(l i ) → rotate(0) → walk(l i+1 )" with "rotate(θ i ) → walk(l i + l i+1 )". direction by a magnitude l 2 or once by a magnitude l, for some l ∈ [lmin, lmax], and thus the map is not injective.

Generating a part obeying a rotation

The process to create a 2-parts assembly obeying a rotation is basically identical to the one creating an assembly obeying a translation: the user specifies a centre of rotation x r ∈ R 2 ( r for rotation) and the Markov process M successively tells the Turtle to walk, snap or rotate until the end is reached. The only key difference is in the choice of the angle θ to orient the Turtle . Indeed, in translation, the cone given by the bounding directions x A t and x B t is chosen once by the user and stays fixed. It is thus easy to calculate the bounds in which θ i must lie for the normal n i of the i th line segment to lie in the cone and thus for this segment to obey the translation. When drawing a polyline obeying a rotation, the angle θ i depends on the location of the Turtle with respect to the location of the centre of rotation x r as well as the step size l i . Let us explore this relationship.

Notations: let p i = (x i , y i ) T ∈ R 2 be the current position of the Turtle , and let θ i and l i be the orientation and length of the segment drawn by the Turtle between p i and its next position

p i+1 = (x i+1 , y i+1 ) T = p i + l i (cos θ i , sin θ i ) T ,
as shown on the inset. The goal of this section is to find in which set shall θ i and l i be chosen so that the line segment [p i , p i+1 ] may obey a rotation around a given centre point x r = (x r , y r ) T ∈ R 2 . Assuming p i = x r (a very reasonable assumption stating that the Turtle is not exactly on the centre of rotation) we can define the instantaneous directions of motion of point p i , p i+1 with respect to x r , m(p i , x r ) and m(p i+1 , x r ), abbreviated m pi and m pi+1 .

Referring to SYSTEM (3.12), one has (with n i = (-sin θ i , cos θ i ) T the unit normal vector of segment

[p i , p i+1 ]) [p i , p i+1 ] obeys a rotation around x r ⇐⇒    n i • m pi ⋆ 0 n i • m pi+1 ⋆ 0 4.1
With ⋆ standing for ≥ if the rotation is counterclockwise, ≤ if clockwise. Let us introduce a sign s = +1 if the rotation is counterclockwise, -1 otherwise. Then SYSTEM (4.1) is rewritten:

[p i , p i+1 ] obeys a rotation around x r ⇐⇒    sn i • m pi ≥ 0 sn i • m pi+1 ≥ 0 4.2 ⇐⇒                s   -sin θ i cos θ i   • m pi ≥ 0 s   -sin θ i cos θ i   •   m pi + l i   -sin θ i cos θ i     ≥ 0 4.3
With

m pi+1 = m pi + l i (-sin θ i , cos θ i ) T .
For notational convenience let, in this section, ∆x = x i -x r and ∆y = y i -y r . APPENDiX C.1 carries out the calculations leading to the angles defined below. When the right hand side is defined let:

               θ ⊖ 12 = 2 arctan ∆y-||xi-xr|| ∆x θ ⊕ 12 = 2 arctan ∆y+||xi-xr|| ∆x θ ⊖ 34 = 2 arctan -∆y- √ ||xi-xr|| 2 -l 2 i li-∆x θ ⊕ 34 = 2 arctan -∆y+ √ ||xi-xr|| 2 -l 2 i li-∆x                      θ 0 = 2 arctan -li ∆y θ 1 = min(θ ⊖ 12 , θ ⊕ 12 ) θ 2 = max(θ ⊖ 12 , θ ⊕ 12 ) θ 3 = min(θ ⊖ 34 , θ ⊕ 34 ) θ 4 = max(θ ⊖ 34 , θ ⊕ 34 )
A few calculations, developed in APPENDiX C.3, provide the enumeration of cases one need to look at to solve for θ i , presented below.

1. If ∆x = l i (a) If ∆y = 0: ■ If s = -1: θ i ∈ ∅, no solution. ■ If s = +1: θ i ∈ [θ 1 , θ 2 ] (b) If ∆y = 0: ■ If s = +1: θ i ∈ [θ 1 , θ 2 ] ■ Else: - If ∆y > 0: θ i ∈ [-π, θ 0 ] - If ∆y < 0: θ i ∈ [θ 0 , π] 2. Else if ||p i -x|| < l i (a) If s = -1: θ i ∈ ∅, no solution. (b) If s = +1: ■ If ∆x = 0: - If ∆y < 0: θ i ∈ [-π, 0] - If ∆y > 0: θ i ∈ [0, π] ■ If ∆x > 0: θ i ∈ [θ 1 , θ 2 ] ■ If ∆x < 0: θ i ∈ [-π, θ 1 ] ∪ [θ 2 , π] 3. Else if ||p i -x|| ≥ l i (a) If ∆x = 0: ■ If s = -1: θ i ∈ [θ 3 , θ 4 ] ■ If s = +1: - If ∆y < 0: θ i ∈ [-π, 0] - If ∆y > 0: θ i ∈ [0, π] (b) If ∆x = 0: ■ If s(l i -∆x) < 0: - If s∆x > 0: θ i ∈ [max(θ 3 , θ 1 ), min(θ 4 , θ 2 )] - If s∆x < 0: θ i ∈ [θ 3 , θ 4 ] ■ If s(l i -∆x) > 0: - If s∆x > 0: θ i ∈ [θ 1 , θ 2 ] - If s∆x < 0: θ i ∈ [-π, min(θ 3 , θ 1 )] ∪ [max(θ 4 , θ 2 ), π]
Once this enumeration of if-else if -else conditions is implemented, the orientation of the Turtle is chosen in the corresponding interval, and we can be sure that the polyline drawn as such obeys a rotation around x r .

■

On the contrary, if s = +1 (one wants a counterclockwise rotation) then x r becomes repulsive:

||p i+1 - x r || > ||p i -x r ||.
To further our understanding of the Turtle , several other properties may be proven:

■ We state that θ 2 -θ 1 = π: Proof. Since x → arctan(x) takes value in ] -π 2 , π 2 [ and on this interval cosine is positive, one has for x ∈ R: cos arctan(x) = 1 √ 1+x 2 . Moreover sin arctan(x) = x √ 1+x 2 . Let a 1,2 be such that θ 1,2 = 2 arctan(a 1,2 ). cos θ 2 -θ 1 2 = cos θ 2 2 cos θ 1 2 + sin θ 2 2 sin θ 1 2 = 1 1 + a 2 2 1 1 + a 2 1 + a 2 1 + a 2 2 a 1 1 + a 2 1 = 1 + a 1 a 2 1 + a 2 1 1 + a 2 2
And:

1 + a 1 a 2 = 1 + ∆ y -||p i -x|| ∆ x ∆ y + ||p i -x|| ∆ x = ∆ 2 x + ∆ 2 y -||p i -x|| 2 ∆ 2 x = 0
We have proven that cos θ2-θ1 2 = 0 and hence (since

θ 2 ≥ θ 1 ) that θ 2 -θ 1 = π.
It means that when the the orientation of the Turtle must be either

θ ∈ [θ 1 , θ 2 ] or θ ∈ [-π, θ 1 ] ∪ [θ 2 ,
π] then angle θ points in the half-plane whose bounding line crosses p i and is orthogonal to the vector p i -x r .

■

A careful examination of the enumeration of cases above, as well as APPENDiX C.3, shows that when s = +1 angles θ 3 and θ 4 do not appear: the Turtle must choose its orientation θ either in the interval

[θ 1 , θ 2 ] or [-π, θ 1 ]∪[θ 2 , π].
Bearing in mind the previous remark, we see that when s = +1, the Turtle must orient itself in a half-plane pointing away from the centre x r . These properties are illustrated on FiGURE 4.6: the current position of the Turtle is p i at (0.12, 0.12) T from the centre x r . On the left of this figure, for a given l i = 0.07, angles θ i , i ∈ 1, 4 are calculated using the enumeration given above. The Turtle will have to move to its next position p i+1 either in the range of positions in blue if s = -1 or in red if s = +1. On the right of FiGURE 4.6 l i is left variable in the range l min = 0.01 and l max = 0.1; as such it allows to see the region on which the Turtle shall go. FiGURE 4.7 shows the same data but for multiple Turtle 's position p i , arranged in a square grid centred on x r on the left, along a spiral around x r on the right. Positions p i are shown using small black dots while the centre x r is depicted as the biggest black dot. On the left, we can confirm that, if s = +1 the Turtle shall move in a half-plane opposite to where the centre x r lies, and there is no relationship between the angle θ i and the step length l i (the red semi-disks are pointing away from x r ). The blue cones show that, when s = -1, the Turtle shall only move towards x r , and the set of possible positions is highly non-linear in l i , θ i , ∆x and ∆y. On the right of FiGURE 4.7, only the regions of possible positions for s = -1 is shown. This zoomed-in view illustrates again the non-linearity of these sets, and also shows that if p i is too close to x r and l i is too large, no solution can be found, the Turtle is stuck. given l i , the same angle θ i , i ∈ {3, 4} (resp. i ∈ {1, 2}) was chosen as to maximise (resp. minimise) the ratio ||pi+1-xr|| ||pi-xr|| at each successive iteration. The starting position of the Turtle is depicted by the cartoon image of a turtle. In literary words, it is as if the Turtle was trying as much as possible not to go near x r when s = -1 (resp. not to move away from x r when s = +1). Yet, as seen in this figure, when s = -1 the Turtle is inescapably drawn to the centre x r , acting like a black hole, while when s = -1 the Turtle can do nothing but drift away from x. This attractiveness of x r happens to be quite problematic: if x r is inside the design domain and s = +1

then the Turtle may get closer and closer to x r up to the point where ||p i -x r || < l i and no solution exists:

it will be unable to draw a valid partitioning curve. Such situation is illustrated on FiGURE 4.9.

A BETTER APPROACH TO CREATE A 2-PARTS ASSEMBLY: GUIDED PROJECTION ALGO-RITHM

The approach combining a Markov process and Turtle graphics turns out to be problematic for three reasons:

■ As explained at the end of the previous section and shown on FiGURE 4.9, it may happen that the Turtle gets stuck when s = +1 and the centre of rotation is ill-placed. This property is highly undesirable, as one can only start again the algorithm from scratch when it happens, thus wasting both time and computational resources.

■ Secondly, while this approach ensures that the whole space of separating polyline is explored, it leaves very little control to the user: one can, at most, only specify the starting point of the Turtle and the range [l min , l max ] of the step length to guide the design. This lack of control can lead to the creation of degenerate designs that are of no interest for any practical use.

■

Finally, this approach does not seem to be scalable to 3D: we could not find any way in which a Turtle (or several) flying in space would generate a 3D assembly.

That being said, it is still possible to generate interlocking assemblies with the Turtle . Our article [START_REF] Gilibert | Rule-based generative design of translational and rotational interlocking assemblies[END_REF], as well as our video [START_REF] Pierre | Rule-based generative design of translational and rotational interlocking assemblies[END_REF] show built assemblies with novel shapes that are interlocking. Some examples are shown in FiGURE 4.10.

The desire to do better led to an approach that solves these three points while still leaving the possibility to explore the full space of polygonal assembly. It is derived from the guided projection algorithm (GPA), presented by Tang and coauthors in [START_REF] Tang | Form-Finding with Polyhedral Meshes Made Simple[END_REF]. Their paper is briefly summed up hereunder.

This article is part of the field of computational geometry for architectural design. It develops a framework for fast, interactive, form-finding of physically stable polyhedral meshes through a constrained iterative optimisation scheme. The authors pay special attention to several constraints, such as boundary interpolation, planarity of faces, statics, panel size and shape or enclosed volume, but their approach can easily be adapted to handle other constraints. The problem to solve is simplified by introducing auxiliary variables and equations to ensure that the constraints are at most quadratic. The gradient is therefore easy to calculate and takes part in an iterative, Newton-type, optimisation program. Successive solutions are biased (projected) towards both low-energy of a fairness metric and low distance to the previous solution.

This summary may feel quite abstract, so let's dig into the specifics of the framework by solving a toy problem.

Toy example

Assume we want to solve the following cubic equation:

x 3 -2x 2 -x + 2 = 0 4.4
Whose roots trivially are 1, -1 and 2. The method described in [START_REF] Tang | Form-Finding with Polyhedral Meshes Made Simple[END_REF] shall find one of these roots. The first step is to introduce as many variables as needed to make the problem at most quadratic. Here we only need to introduce one variable y = x 2 :

EQUATiON (4.4) ⇐⇒    xy -2y -x + 2 = 0 x 2 -y = 0 4.5
The unknowns x and y are stored in a vector

X =   x y   . SYSTEM (4.5) is written in the standard form ϕ i (X) = 1 2 X T H i X + b T i X + c i = 0, i ∈ {1
, 2} (as we only have two equations) with H i a symmetric matrix, b i a column vector and c i as scalar. Here:

H 1 =   0 1 1 0   b 1 =   -1 -2   c 1 = 2 H 2 =   2 0 0 0   b 2 =   0 -1   c 2 = 0
The goal is to find a solution X ⋆ such that for i ∈ {1, 2}, ϕ i (X ⋆ ) = 0. At iteration n we have an instance of an almost-solution X n . Using a first-order Taylor expansion one gets:

ϕ i (X ⋆ ) = 0 ϕ i (X ⋆ ) ϕ i (X n ) + ∇ϕ i (X n ) T (X ⋆ -X n ) 4.6
Where ∇ϕ i (X n ) is the gradient of ϕ i evaluated at point X n :

∇ϕ i (X n ) = H i X n + b i
By setting EQUATiON (4.6) to 0 one gets:

∀i, ϕ i (X n ) + ∇ϕ i (X n ) T (X -X n ) = 0 ⇐⇒ HX = r 4.7 With H =       . . . ∇ϕ i (X n ) T . . .       r =       . . . -ϕ i (X n ) + ∇ϕ i (X n ) T X n . . .      
In our specific example:

H =   y n -1 x n -2 2x n -1   r =   x n y n -2 x 2 n  
While in our example H happens to be square and invertible for most values of (x n , y n ), it is typically not the case in a general setting. The linear system HX = r is often underdetermined, and the space it maps to is ill-conditioned, making this system unsuitable for further computation. The trick used in [START_REF] Tang | Form-Finding with Polyhedral Meshes Made Simple[END_REF] is to solve this system in the least-square sense by using the distance from the previous solution X n as a regularizer1 ;

the solution obtained is denoted by X n+1 :

||HX n+1 -r|| 2 + ϵ 2 ||X n+1 -X n || 2 → min 4.8
Where ϵ is a small value (typically ϵ = 0.001); the larger ϵ, the closer X n+1 to X n . EQUATiON (4.8) is quadratic and has thus only one minimum, found by differentiation:

(H T H + ϵ 2 I)X n+1 = H T r + ϵ 2 X n 4.9
X n+1 is computed from SYSTEM (4.9) by Cholesky factorization. The additive term ϵ 2 I is of importance: while in theory H T H has non negative eigenvalues, in practice it is often near singular and numerical imprecision may shift one eigenvalue below or equal to 0. Adding this diagonal of small values ensures that the matrix (H T H + ϵ 2 I) is symmetric definite positive. This process is known as the Tikhonov regularization. 11 bottom row shows the absolute error of successive solutions x i , starting at x 0 = -3, with respect to the root -1: the convergence is quadratic, as expected for such method. Finally, one notices that the algorithm could not converge for x 0 = -0.2 (no curve starts from that value on the top graph): this is to be expected with Newton's method, it can be unstable.

On the generation of a 2-parts assembly obeying a translation using the Guided Projection Algorithm

This section aims to optimise, through the guided projection algorithm (GPA), the geometry of a polyline so that it obeys a translation.

We want to partition the design domain into two parts such that one of them obeys a direction of translation

x ∈ S 1 . In SECTiON 3.1.1.1 we understood that given a polyline whose constitutive points are p 1 , ..., p k , of coordinates p i = (x i , y i ) T , it obeys x if and only if

A t x ≥ 0 A t =       . . . . . . y i -y i+1 x i+1 -x i . . . . . .       ∈ R k×2
Constraining the polyline to obey a translation

In SECTiON 3.1.1.1 the polyline was given, and the set of linear inequalities A t x t ≥ 0, of unknown x t , gives the cone of translational freedom of the polyline. In this section, we reverse our point of view: the cone of translational freedom is fixed, decided upon by the user (and for simplicity, we first assume the cone to be reduced to a single direction x t ∈ S 1 ), and we want to find a polyline obeying it: in A t x t ≥ 0, matrix A t is now the variable, and x t is now the parameter. To use the GPA, we have to transform the set of linear

inequalities A t x t ≥ 0 into a set of at most quadratic equations ϕ i (X) = 1 2 X T H i X + b T i X + c i = 0. Let x t = (x, y) T . A t x t ≥ 0 ⇐⇒ ∀i ∈ 1, k -1 , (y i -y i+1 )x + (x i+1 -x i )y ≥ 0 ⇐⇒ ∀i ∈ 1, k -1 ∃α i ∈ R, (y i -y i+1 )x + (x i+1 -x i )y = α 2 i ⇐⇒ ∀i ∈ 1, k -1 ∃α i ∈ R, -α 2 i + -y x y -x         x i y i x i+1 y i+1         = 0 Notation Let M = (m i,j ) ∈ R n×n a symmetric matrix and v = (v i ) ∈ R n for some n ∈ N. The notations M =   a b b c   ← i ← j v =   d e   ← k ← l
means that M is filled with 0, except at then entries crossing indices i and j: m i,i = a, m i,j = m j,i = b and m j,j = c. Similarly, v has 0 coefficients everywhere, except v k = d and v l = e. In the following definitions H i is a symmetric matrix of size the dimension of vector X.

Let o = 2k be the index such that X

[o + i] maps to α i . Let X =                         x 1 y 1 x 2 . . . y k α 1 α 2 . . . α k-1                         H i = -2 ← o + i b i =         -y x y -x         ← 2i ← 2i + 1 ← 2i + 2 ← 2i + 3 c i = 0
Thus, one has:

A t x ≥ 0 ⇐⇒ ∀i ∈ 1, k -1 , 1 2 X T H i X + b T i X + c i = 0
Then, as explained in SECTiON 4.1.2.1, the gradients of each

ϕ i are calculated, ∇ϕ i (X) = H i X + b i
and stacked in a matrix H. Similarly, scalars -ϕ i (X) + ∇ϕ i (X) T X are stored in a vector r, and the next almost-solution is solution to the system

(H T H + ϵ 2 I)X n+1 = H T r + ϵ 2 X n .
The first instance X 0 is initialised as follows: the user inputs a polyline and the coordinates x i , y i of each point p i are stored at the appropriate location (2i and 2i

+ 1) in X 0 . Regarding α i , if (y i -y i+1 )x + (x i+1 -x i )y ≥ 0, meaning that the segment [p i , p i+1 ] obeys the direction of translation x t , then α i = (y i -y i+1 )x + (x i+1 -x i )y; otherwise α i = 0. α i is then stored at index 2k + i in X 0 .
Note that had we wanted the polyline to obey a cone bounded by two vectors x A t and x B t instead of a single direction x t , one should only double the number of constraints ϕ i → ϕ A i , ϕ B i and the number of

variables α i → α A i , α B i .
FiGURE 4.12 shows a polyline before and after a single step of the optimisation (the optimisation was stopped after X 1 being calculated). The direction of translation is horizontal: x t = (1, 0) T . On the left, the provided polyline is not compatible with this direction, one clearly sees line segments whose normal vectors are pointing away from x t . On the contrary, after a GPA step, the polyline on the right shows that all its segments have their normal vectors n i compatible with x t :

n i • x t ≥ 0.
With the given constraints ϕ i , we can only make a polyline floating in the plane obey a translation. Yet to generate a 2-parts assembly, several additional constraints must be implemented:

■

The endpoints of the polyline shall precisely lie on the edges of the design domain.

■

To prevent too fine details:

-The length of each line segment should be greater than some threshold l min .

-The curvature at each vertex of the polyline should not be too high, so as to avoid thin tines. Thus the angle between two successive segments should be greater than some threshold.

the so-called interior points of the polyline (all the points but the endpoints) should not be too close to the edges of the design domain, so as to avoid bottleneck-like features.

■

Obviously, all the polyline points should be inside the design domain.

■

A counterpart of the snap order should be implemented, to make sure that the actual cone of freedom of the polyline precisely matches the user-given ones. The following paragraphs address these points.

Constraint on the minimal length of the segments

Two constraints must be implemented: one that calculates the length of the segment, the other that compares it to the user-given threshold l min .

1. Constraint to calculate the length l i of a segment:

For a segment i ∈ 1, k -1 its length l i is given by l

2 i = (x i+1 -x i ) 2 + (y i+1 -y i ) 2 .
Let the integer o be the index such that X[o + i] stores the value of l i . With:

H i =            2 0 -2 0 0 0 2 0 -2 0 -2 0 2 0 0 0 -2 0 2 0 0 0 0 0 -2            ← 2i ← 2i + 1 ← 2i + 2 ← 2i + 3 ← o + i b i = 0 c i = 0
One has

(x i+1 -x i ) 2 + (y i+1 -y i ) 2 -l 2 i = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0 2. Constraint imposing l i ≥ l min : Note that l i ≥ l min ⇐⇒ l 2 i -l 2 min -µ 2 i = 0 for some µ i . Let o l (resp. o m ) be the index such that X[o l + i] (resp. X[o m + i]) maps to l i (resp. µ i ). With: H i =   2 0 0 -2   ← o l + i ← o m + i b i = 0 c i = -l 2 min
One has

l 2 i -l 2 min -µ 2 i = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0

Constraint on the minimal angle between two successive segments

To prevent thin tines (such as the one in red on the left of the inset) a constraint is implemented to ensure that the angle between two successive segments is greater than some threshold θ lim . Such angle is given by θ = arccos(-n i • n i+1 ) where n j is the unit normal vector of segment [p j , p j+1 ]. Thus the constraint to implement is

n i • n i+1 + cos θ lim ≥ 0 ⇐⇒ n i • n i+1 + cos θ lim -ϵ 2 i = 0 for some ϵ i ∈ R.
As the unit normal vectors are needed to express this constraint, several steps (related to the computation of the normal) are required before implementing it.

1. Constraint to compute a (non-unit) normal vector:

The two coordinates n ix , n iy of the normal vector n i are introduced as variables. To constrain this vector to be orthogonal to the segment, one implements

n i • (p i+1 -p i ) = 0 ⇔ -n ix x i -n iy y i + n ix x i+1 + n iy y i+1 = 0. Let o be the index such that X[o + 2i] and X[o + 2i + 1] map to n ix and n iy . H i =               0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 1 -1 0 1 0 0 0 0 -1 0 1 0 0               ← 2i ← 2i + 1 ← 2i + 2 ← 2i + 3 ← o + 2i ← o + 2i + 1 b i = 0 c i = 0
And:

n i • (p i+1 -p i ) = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0
2. Constraint to consistently calculate the normal vector:

As the normal vector can be ambiguous (if n i is a normal vector, then so is -n i ), a constraint is implemented to consistently define the normal vector to be positively collinear with a π 2 counterclockwise rotation of the tangent vector p i+1 -p i . Mathematically speaking, one wants

(p i+1 -p i ) × n i ≥ 0 i.e. (p i+1 -p i ) × n i -δ 2 i = 0 for some δ i ∈ R. Let o n be the index such that X[o n + 2i] and X[o n + 2i + 1] map to n ix and n iy , and o d such that X[o d + i] maps to δ i . H i =                   0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 1 0 -1 0 0 0 -1 0 1 0 0 0 0 0 0 0 0 0 0 -2                   ← 2i ← 2i + 1 ← 2i + 2 ← 2i + 3 ← o n + 2i ← o n + 2i + 1 ← o d + i b i = 0 c i = 0
And:

(p i+1 -p i ) × n i -δ 2 i = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0

Constraint to unitise the normal vector:

To calculate the angle between two segments, each normal vector must be of unit length, implemented as

||n i || 2 -1 = 0. Let o be the index such that X[o + 2i] and X[o + 2i + 1] map to n ix and n iy .   2 0 0 2   ← o + 2i ← o + 2i + 1 b i = 0 c i = -1
And:

||n i || 2 -1 = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0
4. Constraint on the angle between two successive segments:

The constraint

n i • n i+1 + cos θ lim -ϵ 2 i = 0 can now be implemented. Let o n be the index such that X[o n + 2i], X[o n + 2i + 1], X[o n + 2i + 2] and X[o n + 2i + 3] respectively map to n ix , n iy , n i+1x
and n i+1y . Let also o e be the index such that X[oe + i] maps to ϵ i .

H i =            0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 -2            ← o n + 2i ← o n + 2i + 1 ← o n + 2i + 2 ← o n + 2i + 3 ← o e + i b i = 0 c i = cos(θ lim )
And:

n i • n i+1 + cos θ lim -ϵ 2 i = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0
All the aforementioned constrained exhibit matrices H i , vectors b i and scalars c i which are constant: their values do not depend on the actual locations of points p i , i ∈ 1, k . They only depend on the ordering of the p i , i.e. on the topology of the polyline. As such, assuming the polyline to not change its topology, these constraints can be computed once at the beginning of the optimisation, and they are thus computationally cheap. They are referred to as topological constraints.

On the contrary, the following constraints depend on the locations of the polyline points, i.e. on the geometry of the polyline. Because the whole point of the optimisation is to move around the p i , their values change at each iteration and thus they have to be recalculated at each iteration, making them computationally more expensive. They are referred to as geometrical constraints.

Constraint requiring the endpoints of the polyline to slide on the edges of the design domain Following [START_REF] Tang | Form-Finding with Polyhedral Meshes Made Simple[END_REF], this constraint is implemented as (p i -q i ) × t Π(pi) = 0 where ■ p i refers to the endpoints of the polyline: i ∈ {1, k}. ■ Π(p i ) refers to the projection of point p i onto the edges of the design domain; it is the closest point to p i on the design domain.

■ q i is one of the two points defining the segment of the design domain on which Π(p i ) is.

■ t Π(pi) = (t ix , t iy ) T refers to the tangent of the edge of the design domain on which p i is projected through Π.

It constrains the vector p i -q i to be collinear to the edge of the design domain, effectively pushing p i to slide on the edge. To prevent numerical instabilities, among the two possible locations of point q i , it is selected as the one the farthest away from p i . For i ∈ {1, k} let:

H i = 0 b i =   t iy -t ix   ← 2i ← 2i + 1 c i = -q i × t Π(p)
And:

(p i -q i ) × t Π(pi) = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0
Constraint requiring the interior points to be inside the design domain, but preventing them from being too close to the edges of the design domain

To prevent bottleneck-like features, a constraint is implemented to ensure that each of the interior points of the polyline stays at a distance larger than some predefined ∆ from the edges of the design domain. Also, to prevent interior points from wandering outside of the design domain, a constraint must be implemented to ensure they stay inside it. Fortunately, a single equation can handle both constraints. As shown on the inset, each interior point p i is projected onto the edges of the design domain Π(p i ). The unit normal vector (pointing inside the design domain) of the edge containing Π(p i ) is called n Π(pi) of coordinates

(n Π(pi)x , n Π(pi)y ) T . Point Π(p i ) is translated to get q i = Π(p i ) + ∆n Π(pi) . The constraint is then implemented as: n Π(pi) • (p i -q i ) ≥ 0 ⇐⇒ n Π(pi) • (p i -q i ) -ζ 2 i = 0 for some ζ i ∈ R. Let o be the index such that X[o + i] maps to ζ i . For i ∈ 2, k -2 , let:
H i = -2 ← o + i b i =   n Π(pi)x n Π(pi)y   ← 2i ← 2i + 1 c i = -n Π(pi) • q i
And:

n Π(pi) • (p i -q i ) -ζ 2 i = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0

Constraint requiring segments to snap

To ensure that the polyline obeys exactly the direction of translation x t , we saw in SECTiON 4.1.1.3 that at least two segments must snap: the segments should have opposite orientation and their normal vectors should be orthogonal to x t . To model that using a quadratic equation ϕ i (X) = 0, assume that the indices And:

I ⊂ 1, k -1 of
H i = 0 b i =   x y   ← o + 2i ← o + 2i + 1 c i = 0
n i • x = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0
Even though the coefficients in b i are constant, this is a geometrical constraint as the set I depends on the geometry of the polyline.

Had we wanted the polyline to obey a cone bounded by x A and x B , we would just have had to distinguish between I A and I B , and nothing else would have changed.

Once all these topology and geometry constraints are taken into account, one can easily generate a 2parts assembly obeying a translation. The algorithm is given below: Algorithm 1: OptimisePolyline() Input: inputPolyline: An ordered list of polyline points well oriented with respect to the direction x, some of them having snapped (in red).

1 Start: 2 X = ComputeVectorX(inputPolyline) 3 H g , b g , c g = ComputeGeometryConstraints(X)
(H T H + ϵ 2 I)X n+1 = H t r + ϵ 2 Xn 8 H g , b g , c g = ComputeGeometryConstraints(X) 9 H s , b s , c s = Stack(H g , H t ), Stack(b g , b t ), Stack(c g , c t ) 10 residual = ComputeResidual(X, H s , b s , c s ) //

4.1.2.3

On the generation of a 2-parts assembly obeying a rotation using the Guided Projection Algorithm

Let x r = (x, y) T ∈ R 2 be a centre of rotation. This section aims to formulate the constraints ϕ i so that a polyline is optimised to obey a rotation around x r . As stated by SYSTEM (3.12), a polyline (p i ), i ∈ 1, k obeys a rotation around x r if and only if:

∀i ∈ 1, k -1 ,    sm(p i , x r ) • n i ≥ 0 sm(p i+1 , x r ) • n i ≥ 0 4.10
Where s = ±1 stipulates whether the rotation is counterclockwise or clockwise, as understood in SECTiON 4.1.1.5. The task at hand is straightforward: a first constraint shall calculate the instantaneous directions of motion m pi while a second constraint ensure that SYSTEM (4.10) is met.

Constraint to calculate the instantaneous direction of motion m pi

Recall that

m pi =   y -y i x i -x  
. By introducing the coordinates (m ix , m iy ) of vector m pi , one needs to implement two equations: m ix -y + y i = 0 and m iy -

x i + x = 0. Let o be the index such that X[o + 2i]
and

X[o + 2i + 1] map to m ix and m iy . For i ∈ 1, k -1 H 2i = 0 b 2i =   1 1   ← o + 2i ← 2i + 1 c 2i = -y H 2i+1 = 0 b 2i+1 =   1 -1   ← o + 2i + 1 ← 2i c 2i+1 = x
And thus:

m ix -y + y i = 0 ⇐⇒ 1 2 X T H 2i X + b T 2i X + c 2i = 0 m iy -x i + x = 0 ⇐⇒ 1 2 X T H 2i+1 X + b T 2i+1 X + c 2i+1 = 0
Note that this is a topological constraint.

Constraint requiring the polyline to obey a rotation

The constraints to implement are and X[o n + 2i + 1] map to n ix and n iy . For i ∈ 1, k -1 :

sm pj • n i ≥ 0 ⇐⇒ sm jx n ix + sm jy n iy -η 2 2i = 0 for j ∈ {i, i + 1}. Let o e be the index such that X[o e + 2i]
H 2i =            0 0 s 0 0 0 0 0 s 0 s 0 0 0 0 0 s 0 0 0 0 0 0 0 -2            ← o n + 2i ← o n + 2i + 1 ← o m + 2i ← o m + 2i + 1 ← o e + 2i b 2i = 0 c 2i = 0 H 2i+1 =            0 0 s 0 0 0 0 0 s 0 s 0 0 0 0 0 s 0 0 0 0 0 0 0 -2            ← o n + 2i + 2 ← o n + 2i + 3 ← o m + 2i ← o m + 2i + 1 ← o e + 2i b 2i+1 = 0 c 2i+1 = 0
And:

sm pi • n i -η 2 2i = 0 ⇐⇒ 1 2 X T H 2i X + b T 2i X + c 2i = 0 sm pi • n i -η 2 2i+1 = 0 ⇐⇒ 1 2 X T H 2i+1 X + b T 2i+1 X + c 2i+1 = 0
It is also a topological constraint.

Constraint requiring segments to snap

Very similar to the case in translation: given a set of indices And exactly underneath the centre of rotation x r = (0, 1) T (the design domain being centered at 0). As such, for these points, the instantaneous direction of motion m pi is collinear with the horizontal axis, which happens to be the prescribed direction of translation x t = (1, 0) T . Thus these three segments, being aligned with x t , simultaneously snap in translation as n i • x t = 0, and in rotation as

I ⊂ 1, k -1 , the constraint is implemented as m pi • n i = 0, for i ∈ I.
H i =         0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0         ← o n + 2i ← o n + 2i + 1 ← o m + 2i ← o m + 2i + 1 b i = 0 c i = 0
m pi • n i = 0 ⇐⇒ 1 2 X T H i X + b T i X + c i = 0
m pi ∝ x t =⇒ n i • m pi = 0.
A word of caution: special care should be taken by the user when choosing the direction of translation

x t and the centre of rotation x r : one cannot ask for a polyline to simultaneously obey a rotation that would lift it up while obeying a translation pointing downwards.

Results

X n ) = (ϕ 1 (X n ), . . . , ϕ i (X n ), . . .) T
be the vector obtained by stacking the residuals ϕ i (X n ) at each iteration n. We can also display the residuals of each constraint (in blue on FiGURE 4.17), as well as the associated weight (in red). While Tang and colleagues [START_REF] Tang | Form-Finding with Polyhedral Meshes Made Simple[END_REF] talk about smoothly varying weights, here we adopt a more brutal approach where the weights are binary, in {0, 1}. These graphs clearly show when the sliding endpoints and snap constraints are activated. It is also noticeable that the length constraint (weight constantly equal to 1) was met throughout the execution with a 0 residual. It is also the case for the "assemblability-

Translation" (stating that n i • x t ≥ 0) but here it is simply because we optimised the polyline to obey a pure rotation, and thus this weight has been constantly set to 0. On FiGURE 4.17 some constraints ("repelSegments" for instance) are shown but are not described in this dissertation as they are of minor importance.

Using the optimised separating polyline to partition the design domain into two parts

The last step of creating a 2-parts assembly is to actually create the parts. The goal of this section is to explain how given a polyline and a design domain, the latter can be partitioned into two parts P 0 and P 1 , with P 1 obeying the prescribed motion.

Before the GPA optimisation is run, the input polyline is oriented so that its normal vectors point towards what will be the part to move P 1 . In layman's words, given the ordering of the point (p i ) 1≤i≤k , we must check whether this ordering leads to the normal vectors being somewhat in the direction of translation (and thus pointing towards P 1 ). If not, then the reversed ordering (p k-i+1 ) shall be considered.

Translation

Should the optimised polyline obey a translation x t ∈ S 1 , then to check whether the input polyline is well oriented is straightforward: the algorithm loops over each initial segment [p i , p i+1 ] and compute its normal

vector n i by rotating its unit tangent by π 2 counterclockwise. Depending on the sign of n i • x t , a positive or negative counter is incremented. At the end of the loop a majority rule is adopted: if the positive counter is greater than the negative, then the ordering (p i ) is kept. Otherwise the polyline is flipped and the points are ordered (p k-i+1 ). This ensures that most of the segments have their normal such that n i • x t ≥ 0.

Rotation

Should the polyline obey a rotation around x r ∈ R 2 , then a simple trick is implemented: the rotation shall be approximated by a translation, to return to the previous case. Let o denote the centroid of the design domain. If s = +1 (counterclockwise rotation), then the centre of rotation is projected at infinity along vector x r -o. Indeed, the further away is x r from o the more collinear are the instantaneous directions of motion m pi . At the limit they all are orthogonal to x r -o. This is illustrated on FiGURE 4.18: the square is centered at the origin and, on the left, x r = (0, 1) T and the instantaneous direction of motion m pi are depicted using red arrows. In the middle x r (not shown) is moved vertically by a finite amount (to (0, 3)); it can already be noticed that the m pi are more aligned with each other. At the limit where x r is moved upwards towards infinity, all m pi are collinear with the direction x t = (1, 0) T . Effectively, in such a case, the polyline is tasked to obey the translation x t . Had s been negative, x r would have been moved to infinity using the opposite vector -(x r -o).

This trick gives us a direction of translation x t such that the instantaneous direction of motion (collinear to x t ) are somewhat close to m(p i , x r ). The ordering of the points (p i ) 1≤i≤k is kept or flipped according to the aforementioned algorithm in translation.

The polyline now being well oriented, it is optimised using the GPA. The design domain is ordered in a counterclockwise fashion so that the normal vectors of its edges point inside it. At the end of the optimisation, the edge of the design domain on which the last point p k of the polyline is recorded. Starting from the endpoint of that edge, the vertices of the design domain are added in a list in order until arriving at the edge where the start point p 1 is. There the polyline points p 1 , ..., p k are added in that order. This list contains all the points of the part P 1 .

To create part P 0 the same algorithm is used but the ordering of the polyline vertices is flipped. The first task is now complete! We have now understood how to create a 2-parts assembly A = {P 0 , P 1 }, such that P 1 , thanks to the snap segments, obeys precisely a given direction of translation x t ∈ S 1 (or, with little work, a cone bounded by two vectors x A t and x B t ), and/or a rotation around a centre x r ∈ R 2 . We can get on to the next task consisting in generating a N +1-parts assembly, with N > 1.

ON THE CREATION OF THE FOLLOWING PARTS

The process to create each of the following parts P i , i > 1 is the same as the one used to create a 2-parts assembly described in SECTiON 4.1.2. What is part P 0 at the end of iteration i becomes the design domain at the beginning of iteration i + 1. Thus, 2-parts assemblies keep being created in a design domain that gets smaller and smaller, this process is illustrated on FiGURE 4.20 for a 3+1 parts assembly. As such, creating a N +1-parts assembly is straightforward. The difficulty lies in creating an assembly that is interlocked, i.e. whose sole part that can be removed without colliding with any other is the key P 1 .

Assessing the interlocking of an assembly

As explained on SECTiON 3.1.3, the Non Directional Blocking Graph (NDBG) of an assembly encodes all the information necessary to assess the blocking relationships between its constitutive parts. Thus, to ensure that the assembly is interlocked, at the end of the creation of each part P i , i > 1, the NDBG is calculated: (but the one(s) associated to P 1 that must have two strongly connected components, one being reduced to P 1 the other being the other parts) then the assembly consisting of parts {P 0 , ..., P i } is interlocked and the creation of the next part can start. Else, the assembly is not interlocked and the next iterations will not make it interlocked. Indeed, in this case, some other part(s) than the key can move and (since the successive parts will be created inside the current P 0 ) the further partitioning of P 0 will not change that fact. Thus, the latest polyline is deemed invalid and must be optimised again from scratch, using a different input polyline.

Therefore, if a polyline is invalid and the optimisation must be run again, the input polyline must change (otherwise the optimisation will deliver the same result). A first possibility is to ask the user to manually input another polyline. A second option is to automatically generate a polyline using, for instance, the couple Turtle and Markov process: the Turtle draws an initial polyline that is then optimised using GPA. To avoid falling into the pitfalls listed at the beginning of SECTiON 4.1.2, the Turtle shall only generate a part obeying a translation; if a rotation is imposed by the user, then the Turtle draws a polyline obeying the pseudo-translation obtained by moving the centre of rotation to infinity, along the same process as the one described SECTiON 4.1.2.6. This first instance of a solution is, in general, good enough for the GPA to take over. Moreover, the user can specify goal points for the endpoints of the polyline: p 1 and p k should be within a given radius from two specified points on the edge of the design domain. Such a constraint must, of course, be implemented within the GPA framework. If this choice is made, it gives back to the user more control over the polyline.

The outline of the algorithm is as follows:

1. Take the part P 0 obtained at the end of the previous iteration, and consider it to be the design domain.

2.

Either the user inputs a polyline or the Turtle is tasked with drawing one. In either case, an input polyline is available. Goal points can optionally be specified.

3.

Run the GPA to optimise the polyline and compute the newest part P i as well as the remaining part P 0 .

4.

Compute the NDBG associated with the current assembly. If it says the assembly is indeed interlocked, then this iteration is finished. Else, go back to STEP 2. This outline is illustrated on FiGURE 4.21 for the creation of an assembly of 4+1 parts; parts P i , i ∈ 1, 2, 3 obey a rotation around x i r and part P 4 obeys a translation along x t 4 . The top two rows show the input and the successive iterations, as well as the fact that the NDBG is calculated from iteration 2, and as long as it is not valid, the problematic part keeps being recreated. In the end, the design domain is partitioned into 5 parts, and the NDBG, on the bottom row, show that all base DBGs are strongly connected, except for the DBG associated with the key which states that P 1 is free to rotate around x 4.1.3.2 Further details and trick to increase the odd of an assembly to be interlocked An important detail concerning the implementation of the GPA is that not all constraints ϕ i are used simultaneously: as some are conflicting with each other, the GPA would sometimes get stuck, oscillating between solutions that alternatively increase and decrease a given constraint. For instance, the goal points constraint and the constraint requiring the endpoints to slide on the edges of the design domain were found to be often at odd with each other: the former, trying to minimise the distance between the endpoints and the goal points, would try to make the endpoints move directly towards the goal points; the latter would force the endpoints to follow the direction of the edges, leading to poor results (often slow convergence, sometimes no convergence at all) when the edges are not oriented towards the goal points. To prevent conflicting situations like this, an on-off iterative approach is used, where constraints are alternatively switched on and off, to aid the convergence (at the end, of course, all constraints are switched on). In our example, the slidingendpoints constraint is first switched off while the goal points constraint is on: this leads the endpoints of the polyline to move quickly close to the goal points without taking into account the design domain edges.

Once they are close enough, the sliding-endpoints constraint is switched on, resulting in the endpoints being projected onto the edges of the design domain, close to the goal. This on-off approach helps the solver find solutions faster.

In practice, all constraints are at first on, except the sliding-endpoints and snap ones. When a first stable solution is found, the sliding-endpoints constraint is activated. Once a new solution is found, the snap constraint is switched on, until the final convergence of the algorithm.

There are numerous ways to choose the snap segments, but we found two, in particular, to be well-suited to the generation of an assembly:

1. The user specifies that n ≥ 2 segments must snap. When the snap constraint is activated then a list L of snap segments is initialised and:

■ if the polyline must obey a translation: its segments are ranked by how close they already are from their snap position, i.e. how close their normal is from being orthogonal to the prescribed direction of translation x t (or one of the two directions x A t and x B t bounding the prescribed cone). Let t i denotes the unit tangent of segment [p i , p i+1 ] (oriented from p i to p i+1 ); the larger

|t i • x t |

2.

The second method is a trick to increase the odds of interlocking. While the first method works well for high values of n, for low values of n it may lead to designing parts that are hard to interlock with successive ones. For instance, on FiGURE 4.22, for n = 2, it is absolutely impossible to create an 2+1 parts interlocking assembly on the left: the geometry of P 1 makes it impossible for P 2 to be blocked.

Even if the polyline separating P 2 from P 0 started in the small recess at the bottom of the boundary of P 1 , one could still lift P 1 and P 2 up simultaneously, making the assembly not interlocked. On the right, the polyline bounding P 1 snapped in the opposite directions. Unless the polyline of P 2 starts at the top or bottom vertical segments (small probability, assuming it may start uniformly anywhere), the assembly will always be interlocked. Therefore, FiGURE 4.22 illustrate the importance of the directions of the snaps for low value of n. This second method simply ensures that exactly two snaps are made, in the directions that increase the odds of the interlocking. To select the two segments that should go into the list L, the segments are weighted according to how close to the extremities of the polyline they are (i.e. how close their index is close to 2 or k -2, k being the number of polyline points) and how close to a snap in the correct direction they already are (similar to the first method). Segments 1 and k -1 are left out as snapping them is often undesirable as it may lead a segment to be contained in an edge of the design domain, as would be the case in the figure. By modulating the importance given to the weights, one reaches the full spectrum between the first method for n = 2 and the certain snapping of segments 2 and k -2 in the directions that maximise the interlocking (as P 1 on the right of FiGURE 4.22).

This second method becomes useless if the user manually inputs a polyline and makes sure that two segments are already close to a snap in the correct directions at the correct positions on the polyline. Still, it proved to be useful when the input polyline was generated by the Turtle .

Conclusion

The task of generating an interlocking assembly made of N + 1 parts obeying translation and/or rotation is surprisingly fast once one knows how to generate a 2-parts assembly. As understood, the same algorithm (generating a 2-parts assembly) is run on the successive remaining parts labelled as P 0 . At each iteration i > 1, the remaining part becomes the design domain and is partitioned into a P i and a new P 0 . Following this step, the NDBG is calculated. If it says that the assembly is not interlocked, the latest optimised polyline is discarded and either the user or the Turtle provides a new input for the GPA. If the assembly is interlocked, then P 0 becomes the design domain at the next iteration i + 1.

MECHANICAL PROPERTIES OF A GENERATED ASSEMBLY

LITERATURE REVIEW

While this manuscript is based on the observation that new manufacturing technologies can fabricate assemblies with geometrical features inaccessible to more traditional methods, and therefore it becomes interesting to explore the space of interlocking assemblies, we have to show that the generated assemblies, with their strange-looking features, are relevant from a mechanical perspective. The literature on the mechanical analysis of self-fitting joints is plentiful but mostly focuses on indirect assemblies using dowels (or similar intermediary bodies). Seldom are the papers focusing on self-fitting carpentry joints. For instance, Parisi et al., [START_REF] Parisi | Mechanics of Plain and Retrofitted Traditional Timber Connections[END_REF], studied a specific joint, used to build roofs around the Mediterranean and the Alps, the birdsmouth joint. They provide an experimental and numerical analysis of such joints and compare options to retrofit them. In exactly the same vein, Branco et al. [START_REF] Manuel Branco | Experimental evaluation of different strengthening techniques of traditional timber connections[END_REF] further studies this joint to evaluate different strengthening techniques. In [START_REF] Branco | Analysis and strengthening of carpentry joints[END_REF], Branco and coauthors sum up the technique consisting of modelling joints as equivalent springs to perform a semi-rigid analysis and give various recommendations regarding the design and reinforcement of various traditional joints (tenon, lap, scarf). Quite recently, Braun et al., [16],

build a numerical model performing linear (thus fast) analysis of single-and double-step joints under compression. The model is calibrated using experimental data. Moradei et al.,[START_REF] Moradei | Structural Characterization of Traditional Moment-Resisting Timber Joinery[END_REF], also used numerical models to assess the behaviour of traditional Chinese and Japanese assemblies subjected to bending moments.

What the literature lacks is a unified approach to model joint geometries, but as put by Branco "because of the wide variety of carpentry joint geometries in existence, studying them with an exhaustive approach is [not] realistic". Indeed, all the aforementioned papers used the geometrical features of each joint they focused on to propose simplifying assumptions or to calibrate their model. Such an approach is entirely out of reach in this PhD as the goal is to automatically generate new joints, and thus no two joints are alike. It would be impossible to dedicate enough time to precisely model each joint, even less when taking into account the material (if wood, the study is even more complex due to the anisotropy of the material) as was done in the cited papers.

OVERVIEW

As a model both precise and versatile is still an active research topic well beyond the scope of this manuscript, a more qualitative approach is needed. The goal is to build a numerical model that, for two given assemblies A 1 and A 2 , if A 1 is said to perform better than A 2 for some metric, it would not be far-fetched to say that a more sophisticated model, or even the built assemblies in real life, would arrive to the same conclusion, namely that A 1 performs better than A 2 on that metric. In other words, we are not interested in the absolute values of the model (be it the stress, strain, displacements etc.) but rather in the partial ordering of these values when comparing two assemblies. The model should only be simple enough that extrapolating the results to reality would not change their ordering.

This section aims to find a generated assembly that performs better, for some relevant metric, than a handdrawn, tradition-inspired, assembly. If so, then it is not impossible that in real life, the former is also better than the latter, which justifies the point of this manuscript, namely the exploration of the design space of interlocking assemblies to discover novel, relevant, assemblies.

Two phenomena must absolutely be taken into account when modelling an assembly. For two parts in contact:

■

The interface cannot transmit tensile force but can carry compression forces: if tension arises between the two parts, they would simply move away from each other. However, if in compression, one part simply pushes on the other, the contact is not broken. These two non-linearities can be summed up in one observation: if the resulting force at a point of the interface is not in the cone of friction, equilibrium is out of reach and disassembly occurs. A 2-parts assembly A = {P 0 , P 1 } is modelled as follows: the separating curve is offset by a small amount along the normal vectors of its segments, as shown on FiGURE 4.23a. Part P 0 is created using the original curve, P 1 using the offset one; thus there is a gap between these two parts. Crosses are created in the gap, their geometry being defined on FiGURE 4.23b in blue. These crosses are made of two elements, that we call links: links orthogonal to the interface (the short ones) and diagonal links (the long ones). The interiors of the parts are meshed using triangular shell elements, as shown on FiGURE 4.23c, and the links are modelled using standard beam elements. Special care is taken to connect the endpoints of the links to the shell elements of the parts, 4.23d.

Links are grouped three by three: each orthogonal link is grouped with the two diagonal links whose common endpoint is on P 0 . Such a group is highlighted in blue in FiGURE 4.24a. The beam elements associated with the links are pinned at both ends. Thus, they can only transmit axial forces, be it tensile or compressive, see 4.24b. The resulting force is calculated at the point common to the three links. For this point to be in equilibrium, this force must lie in a friction cone parametrised by an angle α, see 4.24c.

For the remaining of this section part P 0 will always be on the left of part P 1 , we can thus use words like "left", "top" etc. As for the boundary condition and load distribution, the leftmost edge of part P 0 is clamped, the rightmost edge of P 1 cannot move in the horizontal direction and a downwards nodal force F is applied on the top edge of P 1 , exactly above the rightmost point of the separating curve, see FiGURE 4.24d for an illustration of these concepts.

As of yet, the model is far from modelling contact between two parts. Indeed, if an analysis is carried out, an equilibrium is likely to be found where most of the resulting forces are not contained in the friction cone. To perfect the model, an iterative algorithm is implemented. Each link is modelled as a tube with a given diameter ϕ. At iteration n, a finite element analysis using linear theory is conducted and gives the axial forces in each link, from which the resultant forces can easily be calculated. There are two non-excluding possibilities:

1. A link carries a tensile force. Then its diameter is set to an extremely small value ϕ = ϕ min (in this study ϕ min = 1e -08 unit), see FiGURE 4.25a. As such, the link is prevented from transmitting a significant amount of force, effectively cutting it from the study. This step models the fact that a link in tension is synonymous with parts breaking contact: they cannot transmit force. unit; as a side note, the thickness of a tube is always set to be a hundredth of its diameter. A link that was once in tension (and thus having its diameter ϕ ≤ ϕ min ) is not completely deleted from the study: if an analysis concludes that it is now transmitting (a small amount of) compression, its diameter is brought back to ϕ = ϕ max , as shown on 4.25c. This small algorithm outputs two kinds of results:

■

The diameter of an orthogonal link is either ϕ = ϕ max or ϕ ≤ ϕ min .

■

The diameter of a diagonal link lives in the range ϕ ∈]0, ϕ max ] (it can be smaller than ϕ min as if a link is in tension its diameter is set to ϕ = ϕ min and if the resultant force is not in the cone, it is further multiplied by β < 1: ϕ = βϕ min ).

Thus, if the resultant force is outside the friction cone, the diameters of the diagonal links are reduced while the diameter of the orthogonal one stays constant, which diminishes the contribution of the tangential force compared to the normal one, hence bringing the resultant closer to the friction cone. If a link is in tension, its diameter becomes negligible: the tensile component disappears from the resultant, bringing it closer to the friction cone. These new diameters are used to create the beam elements at the beginning of the next iteration. This iterative algorithm reaches convergence when all resultant forces are either negligible or in the friction cone.

The geometry is handled in Grasshopper®, an add-on of the software Rhinoceros®. Finite element analysis was performed with the plugin Karamba3d and the loop (necessary for the iterative algorithm) was coded using components from the Anemone library.

CHOICE OF METRIC AND JUSTIFICATION

Once a stable solution is found by the algorithm, we use a measure of the maximal internal stress (calculated as the sum of the two principal stresses) in the parts as the metric to compare assemblies between them.

Yet, because of the unpredictability of the shape of the generated designs, it proved to be impossible to craft an algorithm that could generate a quality mesh for all designs: at a point of high curvature of the separating polyline, for instance, i.e a point of stress concentration, it happens that a bad triangle leads to extremely high maximal stress while a slightly different mesh would yield much lower maximal stress in P 0 . In addition, the point where the nodal force is applied on P 1 is where the maximum stress is reached, yet it is not an interesting point to study. The calculation of the maximal stress per se being too mesh-dependent for P 0 and uninteresting for P 1 , the choice was made to consider the 95% stress: stresses at the calculation points are ranked according to their increasing value and the one indexed at 95% of the length of the list is kept. This value often occurs either near the separating polyline or close to the boundaries of the mesh, and is still representative of the high stresses in the mesh, while being completely mesh-independent, as shown on FiGURE 4.26. In this figure, three designs are studied: the top one is hand drawn and takes inspiration from a traditional mortise and tenon assembly. The middle one has been automatically generated and obeys a translation to the right. The bottom one has also been automatically generated and obeys a rotation. The mesh constituting the parts has been gradually refined, up to adding about 75% additional faces, from approximately 9500 faces to 17500 faces (the exact number varies with the assembly). For each mesh, the aforementioned algorithm was executed and the 95% stresses were recorded in each part. These graphs show that the 95% stresses do not change significantly with mesh variations, thus proving that it is a stable metric that we can use to quantitatively compare assemblies with.

Aside from the mesh quality, the aspect ratio of the crosses bridging the gap between P 0 and P 1 , calculated as the ratio between the length of a diagonal link and the length of an orthogonal link, is a parameter whose influence is of interest. FiGURE 4.27 shows a variation of the 95% stress with regards to the cross aspect ratio; it is argued that the larger the aspect ratio, the fewer the crosses that can be fitted along the separating curve, and thus the higher the force transmitted per link, which modifies the distribution of stresses, especially near points of high curvature. That being said, the net variation does not exceed 10% of the reference value, implying that the choice of the aspect ratio is not too influential on the stress result. In the following, the aspect ratio is fixed to √ 10 3.2 (see FiGURE 4.24 for a visual representation of the crosses), as it seems to be a value around which the 95% stress does not change much. Last but not least, the friction angle α plays a significant role in the algorithm outlined above. Its influence on the 95% stress is thus studied, by having it varying in the range [10 • , 45 • ], see FiGURE 4.28. Unsurprisingly, the higher α the lower the 95% stress. Indeed, as α increases, the interface between the parts can carry more and more tangential loads, thus distributing more evenly the forces and reducing the stresses.

As such the value of α does not change the ordering of the 95% stress of two assemblies. Moreover, it has been visually verified that α does not influence much the qualitative distribution of forces at the interface of the part. Hence its specific value is of no importance for our needs and is fixed to α = 30 • .

This small study shows that our choice of metric behaves nicely with the variation of key parameters, hence comforting us in this choice. Yet, to further test the quality of the model and of the algorithm a qualitative comparison with real-life assemblies is conducted.

IMAGE CORRELATION AND QUALITATIVE COMPARISON

In addition to the 95% stress, it is possible to extract from the model the resulting force at the endpoint on P 0 of each orthogonal link. As the resulting forces can only be compressive, they inform of how much a part is pushing onto the other. In real life, this would lead to points on either side of the interface getting closer and closer. Such behaviour can be captured and quantified using digital image correlation, and compared to the results of the numerical model. As a consequence, several assemblies were laser cut and loaded as to closely mimic the boundary conditions and load distribution presented on FiGURE 4.24d; see FiGURE 4.29.

This study (the making of the laser-cut specimens, the experimental apparatus, as well as the image correlation) was done by Antoine Bayard during his internship at Navier laboratory in the summer of 2022. The image correlation was done using the software GOM Correlate. and any translation that is both horizontal and in the plane of the assembly. The two metal rods in the middle prevent out-of-plane motion. These rods as well as the clamping planks are held together using a rope, tightly enough to ensure contact between the parts and the supporting frame, but sufficiently loose to prevent compression forces in the assembly. Thus the boundary conditions of the physically built assembly match the ones of our numerical model, presented on FiGURE 4.24d. As for the load distribution, the nodal force is enacted by the means of weights (16 kg of weights + 0.3kg of the basket) that are suspended with a string to a point on the top edge of P 1 that is slightly offset to the right of the rightmost point of the assembly (it is not precisely directly above it, because the string would prevent from seeing well the interface, hindering the quality of the images). The scene is lit using a projector, and a camera (not shown in the picture as it was used to take it) is placed on a fixed table next to the projector. The basket is loaded 2kg by 2kg, and each time weight is added, a picture is taken. The set of pictures is then loaded in the software GOM Correlate to perform the image correlation.

On FiGURE 4.30 and FiGURE 4.31, the snapshots from the image correlation show only the vertical deformation ϵ y , calculated using the standard formula ϵ y = ∆l l . ϵ x is not shown as it is not the main deformation and values are lower making thus the noise higher, and images are often less readable. Each snapshot can be considered as 3-colours coded: the interior body of the parts is in green, meaning that vertical deformation is close to 0, showing that the interiors of the parts move as rigid bodies. Colours red and blue are respectively used to encode the distance between points expanding and narrowing. The deeper the blue or brighter the red, the more significant the corresponding phenomenon. The interface is regularly tagged and the values of the deformation ϵ y of the associated points are written.

On the left of each image, the resultant (magnitude and direction) of each assembly analysed by Karamba is shown in blue. A first obvious remark is that the image correlation captures the widening of the gap of the interface (in red), which is completely missed by our model: because these regions of the interface work in tension, our model can only output a binary answer, namely whether it is in tension or not. That being said, the results in compression can be compared, and one sees on FiGURE 4.30 a perfect match between the location of the points in compression predicted by our model and the points on both sides getting closer on the image correlation (in blue). Better, the magnitude of the compression, calculated by our model and displayed on the image correlation, seems to be in line with each other: the longer the vector on the left, the deeper the blue colour on the right. Again, our approach is purely qualitative, so we do not compare values, we just want to see if our model agrees with the image correlation. As far as the assembly on FiGURE 4.30 is concerned, our model fully fulfill our requirements.

Things degrade a bit when looking at the results on FiGURE 4.31. Indeed, while in most cases the two approaches show the same points in compression, our model sometimes finds an equilibrium that does not fully correspond to the observation of the image correlation. For instance, on 4.31a and d, our model does not find that the segments circled in red are in compression whereas the image correlation does; 4.31c shows another perfect match between our model and experimental data. FiGURE 4.31b shows the surprising and interesting case of a mismatch, a colour swap: focusing on the bottom two segments of the polyline, our model predicts that the top one is in compression and the bottom one in tension. The image displays the opposite, which does not seem to make sense. Indeed, when looking at the somewhat horizontal segments in the middle of the polyline, one sees that both approaches agree in saying that they are in compression.

The fact that the correlation says that the bottom segment is also in compression implies that the bottom half of the assembly is squished, which cannot be explained given the boundary conditions and the location of the nodal force. Moreover, the geometry of the polyline on 4.31d is close to the one on 4.31b (both were obtained using the same input polyline, one was optimised in translation, the other in traction), but on the former, the image correlation shows that the bottom segment is in tension, which contradicts the results of the latter. Finally, physical manipulation of the assembly shows that, on 4.31b, our model is closer to reality than the image correlation. There are multiple possible explanations to account for this mismatch. A first explanation is that in the software GOM Correlate, to our knowledge, the mesh used to carry the calculations is hidden from the user.

Therefore, one cannot specify that there is an interface between two parts where the mesh shall be refined.

Hence, it is certain that elements of the mesh were laid over the interface, and results are to be taken with suspicion. In other words, it would just be bad luck that several such elements were all around the bottom segments. A second, and we think quite likely, explanation is as follows: the software is highly sensitive to the black speckles on the specimen, a sensitivity that led to conundrums: on two successive images, with necessarily the very same speckles distribution, the software would deem the first image has to have excellent distribution and the next one as having a poor one making the calculations difficult. It is thus entirely possible that for the last image, the software considered the area around the bottom segments as having a bad distribution, and the results are thus unpredictable. The final, maybe most likely, explanation is simply an error in the boundary conditions during this specific experiment. This seems however surprising as experiments were all done in a row, and this experiment is the only one showing an issue.

We took care of explaining where this mismatch potentially comes from to highlight the following point:

the aim of comparing our model with the image correlation approach is to qualitatively assess their differences, and to better calibrate our model using experimental data. Yet, as we saw, these images may provide the wrong data, preventing us from further improving our model.

Nevertheless, the agreement between the two approaches is good enough for us to deem our model well suited for our needs: being both numerically stable as justified on SECTiON 4.2.3, as well as mostly in line with experimental data as seen in the current section, it is fit for comparing automatically generated assemblies between them consistently and reliably, which is the focus of the next section.

COMPARISON OF AUTOMATICALLY GENERATED ASSEMBLIES

This section aims to find automatically generated designs of 2parts assemblies that have a lower 95% stress in both P 0 and P 1 than a human-designed, tradition-inspired, assembly. To prevent stress concentration at the point of application of the nodal force, the load is now distributed along a vertical line, at a constant distance to the right from the rightmost point of the polyline. A tenon and mortise-like assembly A r ( r for reference) has been created by hand, and the height of the tenon was optimised as to minimise the 95% stress calculated in both parts, see the inset. Our algorithm was run 50 independent times to generate as many designs constrained to have exactly two snap segments, like the reference assembly. The 95% stresses in both parts of each generated design have been calculated and compared with the results for A r . Of those 50 designs (that were generated in a couple of seconds) 29 dominate the reference A r , meaning that they are calculated as having lower 95% stresses in both parts than A r . On with the stress measure improved in one part but degraded in the other. This figure hints at a seemingly pleasing feature of the design space of 2-parts assemblies: a random walk in this space seems likely to yield assemblies that are relevant with regards to our numerical analysis. However, of course, not all such random designs are good: FiGURE 4.32 shows that for some designs, stress was multiplied by as much as 2.6.

The design problem with the point load (see FiGURE 4.24d) was also investigated, though the results are not shown as they are very close to the ones above: out of 50 designs, 23 performed better than the reference, which again hints that a random walk gives useful results.

For a hand-drawn assembly more carefully designed, with four snap segments to distribute more evenly the forces at the interface, results are similar. Out of 99 generated designs, 39 dominated the reference, as shown on FiGURE 4.33. This hints that a random search in the design space of 2-parts assemblies is powerful enough to find novel designs performing better than human ones. But the evaluation takes time: while generating the designs took a couple of seconds, the iterative mechanical analysis is slow, taking approximately half a minute per design. This is mostly due to the use of tools that are not intended to be used in the way we did (Grasshopper does not support loop, the plugin Anemone bypasses this, but at the cost of slowness), and to create the meshes, components performing more calculation than necessary were used. A custom implementation would certainly speed up the process, making such a search must more tractable.

CONCLUSION

Time was spent building a finite-element computational tool that can consistently and reliably analyse any kind of 2-parts assembly. Numerical stability and agreement with another method were studied, and this section culminates in SECTiON 4.2.5, which, albeit quite short, shows a key feature of the design space of polygonal assemblies and helps in justifying why this manuscript bother in exploring it. Indeed, it turns out to be quite easy to find assemblies performing better than reference ones, by simply randomly walking in the design space. A promising route for further research would be, given designs performing better than or close to the reference, to execute a local optimisation search, where polyline vertices are moved in ways that improve the stresses. A naive algorithm can be outlined: each vertex is randomly moved in a small disk centred at its location. Whenever such a motion improves the stress in the parts, the direction in which the vertex moved is used to bias further its further displacement (akin to a "gradient direction"). The stress measure is not expected to dramatically improve with such a naive algorithm, but it surely leads to better designs. x belongs to the interior of C cw r

STUDIES RELATED TO THE CONES OF ROTATIONAL FREEDOM

A BETTER UNDERSTANDING OF THE CONES OF ROTATIONAL FREEDOM

In such a case there are no critical points, and all points on the boundary move away from it.

We emphasize the study of these three cases to highlight a phenomenon that may ease the (dis)assembling process: much like we use sensory inputs when we put a key into a lock (does it slide ? is it stuck ?) a (dis)assembling agent -be it a robot or human -could greatly benefit from contact information between the part to move (P 1 ) and the part remaining (P 0 ) to perform the task. To that end rotating about a point x on the boundary of the cone C i r , i ∈ {cw, ccw} seems to be a better heuristic than rotating about a point in the interior of the cone. Indeed at least one point stays on the boundary of the fixtured part for infinitesimal motions and can thus inform the agent of the relative location of the parts. The most advantageous from that point of view would be to rotate around the prescribed x r as it is defined by at least two snaps, i.e. there are at least two contact points (and potentially many more, on FiGURE 4.34 four segments have snapped) between the parts.

NUMBER OF SNAP SEGMENTS AND CONES OF ROTATIONAL FREEDOM

Contrary to the translation case where two opposite snap segments completely close the cone of translation freedom C t to the user-prescribed cone, as explained in SECTiON 3.1.1.1, in rotation the cones C ccw r and C cw r are often not reduced to the user prescribed centre x r : instead, they sometimes extend to infinity (meaning that the part obeys a translation as well), which may very well be an undesirable feature of the polyline, if only because for a multi-parts assembly, these cones may intersect, thus increasing the number of cells of dimension 0 of the NDBG and hence increasing the number of base DBGs that must be calculated to assess the interlocking of the assembly. It turns out that the user has indirect control over the cones C ccw r and C cw r by the means of the number of snap segments: the more snap segments, the narrower the cone. Thus, should the user wants the cones of rotational freedom to be small, or even one reduced to {x r } the other empty if he/she only wants the part to obey a specific rotation in one direction, two strategies coexist:

1. The user asks for a large number of snap segments.

2.

Once the polyline is optimised, the user asks for the introduction of new points on the snap segments and runs the optimisation again by specifying that these new, smaller, segments must snap.

The second strategy was implemented to generate the 4+1 parts assembly on FiGURE 4.21, to ensure that only four DBGs had to be calculated. Understanding why more snaps implies a narrower cone is straightforward: recall that the cones C ccw r and C cw r are calculated by solving SYSTEM (3.14), in the form A r x ⋆ b, ⋆ standing for ≥ and ≤. The second strategy creates more segments on the polyline, thus more constraints in A r : the more constraints, the less likely a point is to meet all of them, and thus the narrower the cone. The first strategy does not change the number of rows in the system but ensures that a greater number of them are equations instead of inequalities: a greater number of half-planes have their boundary intersecting precisely on the prescribed centre x r , thus narrowing the cone. To accurately measure the "closing" of cones that may be infinite (see FiGURE 3.11 where the cone extends to infinity), the spherical area and perimeter of its stereographic projection onto the unit sphere are measured. The perimeter is used as an additional measure to take into account the cases where the cone is reduced to an infinite half-line, as shown on FiG-URE 3.12. In this case, indeed, the stereographic projection of the half-line is circular arc, of zero area but a finite perimeter. On FiGURE 4.36 twelve assemblies are displayed. The same input polyline was optimised to obey a counterclockwise rotation four independent times for an increasing number n ∈ {2, 3, 4, 5} of snap segments (strategy 1, vertical axis). For each design with n snap segments, the snap segments were subdivided from zero to two times (strategy 2, horizontal axis). Hence, for instance, the design at row indexed by 3 and the columns indexed by 0 means that the input polyline was prescribed to snap 3 times, but no subdivision was required. The one at (row 3, column 1) took each of the 3 snap segments and subdivided them once by introducing a vertex in the middle. The polyline was optimised again to snap these 6 (smaller) segments. The design in (row 3, column 2) took each of the 6 previous snap segments and subdivided them again, totalling 12 snap segments that were optimised to snap. The design at (row i, column j) has i2 j snap segments. As such, the design with the smaller amount of snap segments is at (row 2, column 0) with two snap segments, the one with the greatest at (row 5, column 2) with twenty snap segments.

The cones of rotational freedom C ccw r and C cw r are calculated and are displayed on the sphere, in blue and red respectively. The area and perimeter of each such spherical surface are displayed as coloured circles whose radii are proportional to their values: in light blue the area of C ccw r ; in dark blue the perimeter of C ccw r . In light and dark red respectively the area and perimeter of C cw r . One sees that the more snap segments the narrower the cones. The assembly at (3 vertical, 1 horizontal) shows the noticeable case where

C cw r = {∅} and C ccw r
is almost reduced to a line of zero area. When no coloured circles are displayed, it means that the counterclockwise cone is reduced to the prescribed x r and the clockwise cone is empty.

As a side note, FiGURE 4.36 also shows the range of possible designs that are accessible given the same input polyline.

ON FABRICATION IMPERFECTIONS AND MOTION TOLERANCE

What follows is a study aimed at mimicking the behaviour of a real-life assembly which calls into question the very possibility of obeying a rotation around the prescribed centre x r . In this section, C r refers to both C ccw r and C cw r , the direction of the rotation is of no matter; ⋆ refers to ≥ and ≤; ∂C r refers to the boundary of the cone, i.e. the set of vertices and edges defining the cone and Cr defines the interior of the cone. We will conclude that in practice the rotation about x r is the one of the least likely to happen among all the rotations around points in C r . To understand why we must consider two uncertainties: one on the location of the centre of rotation x r and one on the location of the points (p i ) i∈ 1,k constituting the separating polyline.

Uncertainty on the location of the centre of rotation

For ϵ 1 let x ∈ C r and let

x ϵ ∼ x + N (0, ϵ 2 )
be the centre of rotation of a part taking into account some imprecision on its location. This could model the fact that a (dis)assembling robot is ill-calibrated or that it vibrates around the mean position x. Then, obviously if x ∈ ∂C r there is a chance that x ϵ / ∈ C r : if x is on an open edge between two vertices, then the probability that x ϵ / ∈ C r is 1 2 ; if x is a vertex of C r (which is the case for x r ) then the probability that x ϵ / ∈ C r is even higher. For that reason obeying a rotation about x r is less likely than obeying a rotation about any x ∈ Cr . Yet the main reason that explains why the rotation about x r is less likely than the one about any other x ∈ C r is more subtle and comes from taking into consideration uncertainties on the position of the vertices (p i ) i∈ 1,k of the separating polyline.

Uncertainty on the location of the points of the separating polyline

Let

∀i ∈ 1, k p ϵ i ∼ p i + N (0, ϵ 2 ) Such (p ϵ i ) i∈ 1,
k models the tolerance of fabrication of a part: each point p ϵ i is randomly shifted around its expected position p i by a random variable following a Gaussian law with an ϵ 1 variance. This modelling of imperfections might be rightly deemed as quite crude, but more sophisticated models would not change the heart of the conclusion we will arrive to.

By construction of our algorithm, at least two segments of the polyline snapped for the assembly to obey

A ϵ Ix r x r -b ϵ Ix r = 0
Geometrically, the lines defined by A ϵ Ix r and b ϵ Ix r are randomly shifted and tilted compared to their counterparts defined by A Ix r and b Ix r . This means that they do not all intersect in x r ; in all generality, they do not even all intersect at the same point. So unless the point x r ∈ C ϵ r (where

C ϵ r = {x ∈ R 2 | A ϵ r x-b ϵ ⋆0
) the rotation around x r will be impossible.

The probability of the event x r ∈ C ϵ r is easily quantified. For j ∈ I xr let a j and b j be respectively the row of A r and the entry of b indexed by j. Similarly we define a ϵ j and b ϵ j . As said above, in all generality one has a ϵ j x r -b ϵ j = 0, and because the mapping (a j , b j ) → (a ϵ j , b ϵ j ) is random, there is a 50-50 chance that a ϵ j x c -b ϵ j > 0. Geometrically and in layman terms, since x r is on the line defined by a j and b j and since the line defined by a ϵ j and b ϵ j is randomly shifted and tilted, then there is as much chance for x r to be "above" this shifted line (i.e. a ϵ j x r -b ϵ j ≥ 0) than "underneath" (a ϵ j x r -b ϵ j ≤ 0). At this step of the study, one would conclude that the probability the x r ∈ C ϵ r is P(x c ∈ C ϵ r ) = 1 2 |Ix c | . We can go further in this study. It is possible, especially for a thin C r , that a line j bounding the cone C r but not indexed by I xr , i.e. not going through x r (e.g. the upper line bounding C cw r on FiGURE 4.34) shifts on the other side of x r after the random transformation (A r , b) → (A ϵ r , b ϵ ). In other words, if one has a j x r > b j one could get, for a transformation of sufficiently high magnitude, a ϵ j x r < b ϵ j . As this could happen for any line not indexed in I xr , and even if we are lucky and all lines indexed by I xr are randomly moved on the "right side" of x r (A ϵ Ix r x r ⋆ b ϵ Ix r ) with a probability of exactly 1 2 |Ix r | ), we arrive at the conclusion that:

P(x r ∈ C ϵ r ) ≤ 1 2 |Ix r |
The key takeaway is that the more snap segments (i.e., the greater |I xr |) the less likely an imperfect part is to obey the prescribed centre x r . In the best-case scenario, there is a 1 4 probability that it happens. Had we modelled the imperfections in a more sophisticated fashion, the exact value of this probability would certainly have changed, but not the fact that x r is the least likely point of C r to be obeyed. This property is illustrated on FiGURE 4.37: the same initial polyline has been optimised ten times, for prescribed snap numbers varying from 0 to 9. For each of such ten optimised polyline (p i ) i∈ 1,k , 200 imperfects designs (p ϵ i ) i∈ 1,k were generated by slightly moving the polyline's vertices (with ϵ = 0.001). We kept track of the number of times an imperfect polyline obeys the prescribed centre x r to estimate the probability of obedience P(x r ∈ C ϵ r ) (sampled mean). FiGURE 4.37 clearly shows that this (estimated) probability is capped by This study naturally raises the question "Given a class of imperfect parts (p ϵ i ) i∈ 1,k , what is the probability of a point x ∈ R 2 to actually be obeyed to ?" 4.3.3.3 Likelihood of a point to be obeyed by a class of imperfect assemblies. Given a polyline (p i ) i∈ 1,k and a law to model the imperfections (p ϵ i ) i∈ 1,k , a numerical study can swiftly be executed to find the set of points likely to be obeyed by the part. For instance, on FiGURE 4.38, the separating polyline was perturbed using ϵ = 0.002 in p ϵ i ∼ p i + N (0, ϵ 2 ) (for reference, the length of the diagonal of the design domain is 1). For each of such imperfect polylines, cone C cw r was calculated. The results are averaged over 1000 imperfect designs. The point in red is x r : one sees that it does not belong to the set of points likely to be obeyed. The curve in black shows the isoline 99: it encloses points having a probability greater than 0.99 of being obeyed by an imperfect polyline. The highlighted black point was found to be amongst the most likely to be obeyed (out of the 1000 designs, all obey it). This numerical study confirms that, given the modelling of imperfections, the prescribed centre x r is extremely unlikely to be obeyed.

To get a better idea of the set of points likely to be obeyed, the same study has been repeated for varying values of ϵ, see FiGURE 4.39: the box on the top right of each subfigure shows the estimated probability P(x r ∈ C ϵ r ). The obedient set gracefully degrades, and one sees a subset (in yellow on all figures) that constantly has a high probability of being obeyed, no matter the magnitude of the imperfection. FiGURE 4.39 gives a choice to the user: if the location of the actual centre of rotation is not a hard constraint, then such heatmaps give the set of points with a high probability of being obeyed, thus letting the user choose a posteriori what the centre should be. On the other hand, if the location of the actual centre of rotation must be precisely the prescribed x r , then one should modify the separating polyline for it to robustly obey x r , even given the presence of some imperfection. Increasing the robustness of the separating polyline to some imperfection is what we call the opening of the cone of rotational freedom. It is the focus of the next section.

ROBUSTNESS TO IMPERFECTION

We see two manners in which one can perform the so-called opening of the cone of rotational freedom, for it to contain the prescribed centre x r , even in the presence of some imperfection. The first method consists of taking the separating polyline at the end of the GPA optimisation, and optimise it again by implementing a constraint of the form

sn i • m pi ≥ α
for some α ∈ R + . The greater α, the more open the cone and the more x r is in the interior of C r . In this section α = 0.1. Of course, in such a case, the snap constraint must be deactivated, as it is incompatible with this constraint. The inset shows the input polyline in blue (so the one obtained at the end of the first round of GPA optimisation is the same as the one shown on FiGURE 4.34) and the output in red, where the snap constraint has been deactivated.

The same numerical study is conducted, and is presented FiGURE 4.40. The probability P(x r ∈ C ϵ r ) is estimated on 1000 imperfect designs, for various magnitude ϵ, and displayed in each subfigures. For small enough ϵ, this probability is 1 or close to 1, meaning that the polyline is now robust to small imperfections.

Obviously, the greater ϵ the smaller P(x r ∈ C ϵ r ), but even for a relatively large magnitude ϵ = 0.01, there is still more than a fourth of a chance for the assembly to obey x r . The downside of this method is that it is very likely to increase the area of the cone C r .

The second method consists of implementing a fake prescribed centre x f , so that the centre wanted, x r , belongs to the interior of the cone of freedom calculated for x f . This supposes having an idea of where to put x f , thus one should know how the heatmap degrades with ϵ. On FiGURE 4.39 one sees that the set of points most likely to be obeyed is up to x r , slightly to the right. So one should set x f to be below x r , slightly to the left. On FiGURE 4.41, the fake centre x f is shown in light blue, while the centre x r is depicted in red. Similar to the previous methods, one sees that the probability P(x r ∈ C ϵ r ) is much higher. The main drawback of this method is that several trials must be done before arriving at a satisfying result. of the cone are critical centres of rotation such that, when performing an infinitesimal rotation around one of them, a vertex of the polyline slides on the interface between the parts. The more constraints meet at a vertex of a cone, the more vertices of the polyline slide. With this in mind, much like we use sensory inputs when inserting a key in a lock, the operator tasked with (dis)assembling two parts, human or robot, greatly benefits from contact information at their interface, if only to further guide the motion. As such, rotating around a vertex of the cone is a relevant heuristic, as at least two vertices of the polyline stay in contact with the other part, the most critical vertex being the user-given centre of rotation x r , as the number of constraints meeting there is at least equal to the number of snap prescribed by the user.

CONCLUSION -ROBUST OPTIMISATION

In SECTiON 4.3.2 we saw that the greater the number of snaps, the smaller the cone of rotational freedom C r . It provides a cheap method to shrink the cone to the user-given rotation centre x r , and thus gives the user the same amount of control as in translation, where shrinking the cone C t to the user given x t is immediate given exactly two well-oriented snap segments. Since, in addition, we have seen in SECTiON 3.1.3 that to assess the interlocking of a multi-parts assembly we must compute the DBGs of the cells of dimension 0 bounding and/or resulting from the intersection of different cones, we see that, because shrinking the cone to C r = {x r } for all parts required to rotate ensures that no intersection is possible with any other cone, the number of cells of dimension 0 is minimal, namely equal to the number of parts having to rotate around their prescribed centres (and the DBGs in translation must be checked). Finally and quite importantly, from a practical point of view shrinking C r decreases the odds of accidental disassembly as fewer points are valid centres of rotation.

At this step shrinking C r to {x r } by increasing the number of snaps seems an excellent idea: by increasing the number of constraints meeting at x r , one multiplies the points giving contact information at the interface between the parts on one hand, and on the other, it reduces the complexity of assessing the interlocking of the assembly. Yet, in SECTiON 4.3.3 we understood that if we factor in uncertainties, be it on the location of x ϵ r or on the geometry of the separating polyline (p ϵ i ) i∈ 1,k , the more snap segments, the less likely is the part to obey x r . Indeed, because the snap constraints coincide in x r , any random change dramatically decreases the odd of x r meeting all of them, making the assembly highly unlikely to obey its prescribed rotation.

To increase the odds of obedience, two strategies were presented in SECTiON 4.3.4: either we forget about the snap constraint and, for some α > 0 we impose that for all segment i sn i • m j ≥ α (for j ∈ {i, i + 1}), but then we lose control on the shape of the cone C r , or we introduce a fake centre of rotation, located such that the actual centre x r lies deep in the region of a high probability of obedience, but this require many trials and errors. Whichever the strategy, they are likely to adversely affect the area of the cone C r , which may increase the number of base DBGs to calculate, but also means that the separating polyline obeys more rotations: it is less robust to parasitic rotations.

In this concluding section, we offer guidelines to keep the number of DBGs tractable while ensuring that x r stays likely to be obeyed, even after the introduction of imperfections. We simply mix what we summed up above. First, we increase the number of snap segments until we get C r = {x r }. Then we take the polyline resulting from this GPA optimisation (in the lightest shade of blue in the inset), and we feed it as input to a new round of GPA optimisation where the snap constraint is deactivated, and the segments are constrained to sn i • m j ≥ α, for some α > 0. Since we started from a situation where constraints were met by x r , (i.e. for some indices we had n i • m j = 0), this new optimisation pushes the boundaries of the corresponding half-planes encoded in A r x ⋆ b away from x r . Because all other constraints are already met by the input polyline, this round of optimisation stops as soon as sn i • m j ≥ α for all i, thus the polyline is only slightly modified, especially for small α: on the inset the darker a polyline, the bigger the corresponding α. The values of α are given FiGURE 4.42. Parameter α is the minimal distance at which the boundaries are pushed from x r , it provides thus an indirect tool to manipulate the shape of the cone of freedom C r .

On FiGURE 4.42, the imperfect cones of freedom C ϵ r are superimposed for various values of α. In this figure, the standard deviation of the normal law is ϵ = 0.002. Four segments snapped on the initial polyline, thus we have P(x r ∈ C ϵ r ) ≤ 1 16 , which is consistent with the observed sampled mean of about 0.04 on the top left subfigure, for α = 0. Then, for increasing values of α, the cones C ϵ r gets broader and broader and P(x r ∈ C ϵ r ) soon reaches high values. In this figure, it seems that a good balance between the size of the cone and the probability that x r is obeyed is obtained for α = 0.03 (and for the estimation of the probability, ϵ = 0.002).

In a nutshell, while ideally we want C r = {x r }, imperfections impose to have a broader cone. Yet to avoid having too many base DBGs to calculate, a small cone is desirable. Parameter α permits to indirectly manipulate the shape of C r , thus adjusting its size. We can outline a very simple algorithm, should the user wants all the cone C r of the different parts of the assembly to have similar areas, between two thresholds A min and A max : at each iteration, when a polyline is optimised (using the snap constraint, and α = 0), the second round of optimisation for α > 0 is executed several times, to get to a cone area A min ≤ A ≤ A max by dichotomy: if the area is too great decrease α; else if too small increase it. By placing the centres of rotation of the different parts sufficiently away from each other, such an algorithm ensures that no two cones intersect, keeping the number of base DBGs low. Worst case scenario, if there is indeed an intersection, simply diminish the value of α for the corresponding polylines until their cones do not touch anymore.

Imperfections on a polyline obeying a translation are much more simple to address: it suffices to slightly increase the angular opening of the cone C t to give room to the polyline to giggle while keeping x t (or x A t and x B t ) inside the perturbed cone C ϵ t . It can be done at the first round of GPA optimisation, by simply directly prescribing this slightly bigger cone. Moreover, as intersecting such cones of dimension 1 does not result in more cells of dimension 0 (they keep being the endpoints of the cones) we do not need to give particular care to the DBGs associated with directions of translation. The downside is the same as in rotation: the cone being greater, the assembly obeys more motions, and is therefore less robust to parasitic rotations: it may become quite easy to disassemble. The user should thus use α to increase the size of the cones of freedom, but not too much as otherwise the assembly would easily break apart.

BACKLASHES IN ASSEMBLIES

OVERVIEW

A backlash between two imperfect parts refers to the gap between them in the assembled position. Backlashes are a necessity for any real assembly as it is impossible to make parts with perfect geometry.

In the present study, the hypothesis of infinitesimal motion makes it impossible to finely study the consequences of a backlash between two parts. On FiGURE 4.43 three assemblies are shown. On the left column the backlash between the parts is exemplified by the white space between the red part P 0 and the blue part P 1 . While the gap is much larger than any realistic backlash, we will understand that because of the infinitesimal motion hypothesis, the actual width of the gap matters not. The middle column shows the parts in an assembled state: part P 1 is translated to the left until touching P 0 . As one can see, even in this state, gaps still exist on the upper and lower part of the tenon. On the right, the so-called perfect cones C t , C ccw r and C cw r are the cones of freedom associated with a perfect assembly, with no backlash. The so-called backlash cones are calculated taking into account the backlashes on the upper and lower segments of the tenon: because any infinitesimal motion of P 1 cannot lead it to collide with such segments on P 0 (as they are at a finite distance from it), any translation and/or rotation can be obeyed by these segments. As a consequence, the cones of freedom can only be calculated with the segments of the interface touching each other. In each of the three cases presented on FiGURE 4.43, only the three vertical segments of the interface can be considered. This leads to backlash cones of freedom of motion much larger than the perfect ones.

Following this theoretical study, backlashes seem to be a major impediment to our work: since any real assembly has backlash leading to large cones of freedom of infinitesimal motion, should our work not be obsolete? Fortunately these theoretical results are of negligible consequences in real life: in a laser cutter the order of magnitude of the kerf (the width of the groove burned by the laser) is 0.1mm = 10 -4 m. The side of the square design domain of the built assemblies is of about 10cm=10 -1 m. For such a backlash ratio of about 10 -3 we find that the physical manipulation of the assembly is coherent with the perfect numerical model (without backlash): for most assemblies the backlash is not perceptible at all, and for a few we can feel that small motions other than the prescribed ones are possible, but as soon as there is an additional contact between the parts, the geometry of the interface naturally guides the motion towards the prescribed one.

In translation, when the cone C t is bounded by two distinct vectors x A t , x B t (by opposition to being reduced to a single direction x t ) we observe that in a tenon-and-mortise like assembly, it is possible to have the backlash cone equals to the perfect one by having the tenon slightly larger than the mortise. Assuming the angle difference to be greater than the width of the backlash, the two parts will be in contact at exactly two points, ensuring that the backlash and perfect cones match, as show on FiGURE 4.44. The cost of this operation is the stress concentration happening at the contact points.

NUMERICAL STUDY OF THE KINEMATICS OF AN ASSEMBLY WITH BACKLASH

Yet, the fact that built assemblies behave well in practice does not mean that the theoretical kinematics of assemblies with backlash should not be investigated. We present below a succinct study of the cone of freedom of a 2-parts assembly with backlash obeying a finite rotation. It is the only time in this manuscript that we stray away from the infinitesimal motion hypothesis.

In this section, we call the polyline of P i , i ∈ {0, 1}, the portion of the boundary of P i that would have been the separating polyline between the parts had they been perfect, with no backlash. Let (p i ) i∈ 1,k be the polyline of P 1 . The original position of a point on the polyline of P 1 refers to its position before any rotation is done: it is p i . Once the rotation is done, the new position of this point is denoted by pi .

Constant width backlash

The goal of this section is to find the set of centres of rotation such that a finite rotation around any point in that set does not lead P 1 to collide with P 0 . We make two simplifying hypotheses:

■

We assume that each point of the polyline of P 1 moves at a constant distance r > 0 from its original position while rotating around a given centre x. This is a strong assumption: in reality, the length of the trajectory of a point is proportional to its distance to the centre of rotation, and the closer the centre to a point, the more spread the lengths of trajectories of the other points of the polyline. Thus this assumption only becomes reasonable when looking at centres of rotation far away from the polyline.

■

While in reality, the trajectory done by a point is a circular arc, we model it by a line segment, tangent to the trajectory at the original position of the point. Mathematically speaking, given a centre of rotation

x each point p i moves along the instantaneous direction of motion m(p i , x). Being a first-order Taylor expansion of the trajectory, this is a reasonable assumption as in practice the width of the gap between two parts is small compared to the radius of the trajectory and the error made by considering a line segment instead of a circular arc is minute.

To insist on the fact that the motion we model is not a proper rotation (it is not a rigid motion), we will refer to it as "rotation". These two hypotheses mean that given a centre x, each point p i of the polyline of P 1 is moved at

pi = p i + r m(p i , x) ||m(p i , x)||
and denote by P1 the part after the "rotation" is done. Our goal is thus to find the region: R δ = {x ∈ R 2 , P1 does not collide with P 0 } Parameter δ will be introduced hereunder. Assume in this section that the backlash is of constant width, denoted by ∆. For our "rotation" to possibly lead to a collision with P 0 , we must have r > ∆.

C iδ = ∅ to ¡ C iδ is constituted of several cones.
Thus, we want to find the set of points x such that none of the (m(p i , x)) i∈ 1,k lie in a cone ¡ C iδ . This is therefore given by: nex. But recall that our first assumption (all p i move by a constant value r = δ∆) is highly unrealistic near the polyline of P 1 ; thus, the shape of each region R δ in the vicinity of the separating polyline should be taken with a grain of salt. Far away from the polyline, R δ becomes much more realistic and means that during the disassembling process, the operator (robot or human) can rotate P 1 around any centre of rotation x ∈ R δ by an angle θ r ||pi-x|| , assuming x to be sufficiently far from the (p i ) i∈ 1,k so that the distances ||p i -x|| are all close to each other.

R δ = R 2 \ k i=1 ¡ C iδ Sets R δ ,
The pendant map obtained for clockwise rotations (the rotation to obtain the forbidden cones is clockwise and not counterclockwise) would show the region of the plane compatible with a finite rotation aimed at assembling the parts. Such maps may be useful in the context of a cluttered assembling space where the operator would benefit from choosing the centre of rotation to operate from.

Varying width backlash

In the previous section, we assumed the gap between the part to be of constant width ∆. In practice, in the absence of contact information, it seems nearly impossible to neatly place the parts as such. In this section, we take a more realistic stance by randomly moving P 0 by a small amount so that the width of the gap is not constant, as illustrated on the inset. The goal is now to find the set R δ of points likely to be obeyed given the imprecision on the location and orientation of one part with respect to the other.

The process is the same as before: we find the set of forbidden cones and deduce R δ by excluding them from R 2 . FiGURE 4.48 shows the probability heatmap of a point to be obeyed for a finite rotation given imprecise respective placements of the part. In bright yellow, the probability is 1, and in deep purple 0.

Rotating around points highlighted in yellow means that P 1 is very likely not to collide with P 0 for a finite "rotation". Again, the closer a possible centre of rotation to the polyline, the less accurate the heatmap.

INTERPOLATION BETWEEN 2-PARTS ASSEMBLIES

We leave the study of imperfections, backlashes and robust optimisation to enter the realm of smooth interpolation between assemblies. Given two generated assemblies, the aim is to find the set of assemblies bearing varying amount of resemblance to either of the two.

THEORY OF ELASTIC DEFORMATION OF OPEN PLANAR CURVES

This section aims at briefly summing up theory of elastic deformation of open planar curves, presented in [START_REF] Srivastava | Shape Analysis of Elastic Curves in Euclidean Spaces[END_REF], and developed in extenso in the book [START_REF] Srivastava | Functional and Shape Data Analysis[END_REF], especially in chapters 4 and 5 to which the curious reader is referred for more in-depth explanations. Indeed, technical explanations will be glossed over as we focus more on conveying the main ideas of the approach, taking close inspiration from [START_REF] Bharath | Analysis of shape data: From landmarks to elastic curves[END_REF] who neatly synthesise the main results. The open curve assumption is important: the mathematical process is much more complex for closed polylines and is not presented here. Consider an open curve parametrised in the form:

β : [0, 1] -→ R 2 t →   x(t) y(t)  
As the parameter t varies in its domain, the point β(t) traces a path from β(0) to β( 1). This is called a parametrisation of β, it dictates the rate at which the curve is traced, [START_REF] Srivastava | Functional and Shape Data Analysis[END_REF]. More parametrisations are possible: any orientation-preserving (meaning γ > 0 on its domain) diffeomorphism γ : [0, 1] → [0, 1] defines a reparametrisation of β through the composition β • γ, see FiGURE 4.49. We are interested in the shape of the curve, thus the results should be invariant to shape-preserving transformations (rigid motions, scaling and reparametrisation). These nuisances are listed below:

■ its location in space; let R 2 denote the set of planar translations.

■ its orientation in space: let SO( 2) denote the set of planar rotations.

■ its scale; let R + * denote the set of scale parameters.

■ its parametrisation; let Γ = {γ : [0, 1] → [0, 1], γ is an orientation-preserving diffeomorphism}.

Let [β] be the orbit of β, i.e. the set of curves with the same shape as β but with different transformations in space: As our goal is to smoothly interpolate between two given curves β 1 and β 2 , it is necessary to know the distance between these curves. We can consider for instance the usual L 2 distance defined as:

[β] = σO(β • γ) + x, σ ∈ R + * , O ∈ SO(2), γ ∈ Γ, x ∈ R 2
d(β 1 , β 2 ) = 1 0 ||β 1 (t) -β 2 (t)|| 2 dt 1 2
Where || • || is the usual euclidean distance in R 2 , and we remark that in general

d(β 1 , β 2 ) = d(β 1 • γ, β 2 • γ),
making this metric not invariant to reparametrisation: we lose some information on the shape of the curves when using the L 2 distance to compare them. Srivastava and coauthors, [START_REF] Srivastava | Functional and Shape Data Analysis[END_REF][START_REF] Srivastava | Shape Analysis of Elastic Curves in Euclidean Spaces[END_REF], introduce the so-called square-root velocity function (SRVF) of a curve β as

q(t) = F ( β(t)) =    β(t) √ || β(t)|| if β(t) = 0 0 otherwise F being continuous, if β is continuous, then q is square-integrable, it belongs to the space L 2 ([0, 1], R 2 ).
Geometrically, it is a scaled velocity vector, tangent to the curve at each point. Curve β can be reconstructed (up to a translation) from q using β(t) = t 0 q(τ )||q(τ )||dτ , showing that the SRVF is translation invariant. For a given γ ∈ Γ, the SRVF of a parametrised curve β • γ is given by (q • γ) √ γ, and for two SRVFs

q 1 , q 2 ∈ L 2 ([0, 1], R 2 ) one can verify that d(q 1 , q 2 ) = d (q 1 • γ) γ, (q 2 • γ) γ
And the L 2 metric is invariant to reparametrisation. To remove the scaling variability, all curves β are rescaled to be of unit length; as one notices, one has

d(q, q) 2 = 1 0 ||q(t)|| 2 dt = 1 0 || β(t)||dt = 1
which means that the SRVF of a unit-length curve is an element of S, the unit sphere in the Hilbert manifold L 2 ([0, 1], R 2 ), which will prove to be quite handy to easily interpolate between curves. Being translation and scale invariant, one defines the orbit of q as:

[q] = O(q • γ) γ, O ∈ SO(2), γ ∈ Γ Given two SRVFs q 1 , q 2 ∈ L 2 ([0, 1], R 2 ), let ρ(q 1 , q 2 ) = arccos q 1 , q 2 = arccos 1 0 q 1 (t) • q 2 (t)dt
be the distance between q 1 and q 2 . It corresponds to the geodesic distance (angle) between the two points q 1 on q 2 on the sphere S; it is invariant to reparametrisation and rotation. The shortest distance between two shapes is given by finding the closest points on each orbit:

ρ s ([q 1 ], [q 2 ]) = min (O,γ)∈SO(2)×Γ arccos q 1 , O(q 2 • γ) γ Let q * 2 = O * (q 2 • γ * )
be the optimal point given by the minimisation above. Denoting ν = ρ(q 1 , q * 2 ) one defines the shortest arc between these two points using the standard formula for interpolating on a sphere:

α * (s) = 1 sin ν (q 1 sin (ν(1 -s)) + q * 2 sin(νs))
for 0 ≤ s ≤ 1. Details of the optimisation are given in [START_REF] Srivastava | Functional and Shape Data Analysis[END_REF]. We have been using the python package fdasrsf. 4.51 shows the decoding of regularly placed points on the geodesic α * , traced between the two end designs: one sees that the separating polyline is smoothly interpolated. But this figure hides that we cheated: because the interpolation is invariant to translation, we do not know where to put the polyline in the design domain. On FiGURE 4.51, the polylines were arbitrarily placed so that their first point is on the design domain above 0 (the design domain being centred in 0). But we cannot interpolate between polylines at different locations in space, without placing them arbitrarily in the design domain. The scale invariance is problematic too: for the interpolation to happen, all points must be on the unit sphere of

RESULTS

L 2 ([0, 1], R 2 ),
which means, as we saw earlier, that the curves must be of unit length. Obviously, on FiGURE 4.51, the two end polylines have very different lengths: they were scaled so that their endpoints lie on the edges of the design domain. Another issue occurs because of the invariance to rotation: as shown on FiGURE 4.52, top row, the interpolation between the two end polylines yielded the ones in red; they are obviously out of the design domain and cannot be considered as separating curves. On the bottom row, while all interpolated polylines do belong to the design domain, the invariance to rotation leads the penultimate (on the right, highlighted in red) to be at a different orientation from the last one, whereas the shapes of the polylines are almost identical. This leads to different assemblies, not only from the kinematic point of view as the penultimate one does not obey the same motion as the last one, but also from a mechanical point of view, as in this case the geometry but also the location and orientation in space of the separating polyline play an important role. Moreover, the interpolation is not constrained to meet the kinematic constraint of a separating curve: the motion prescribed by the user may not always be the one obeyed by an interpolated polyline. To correct that, the GPA optimisation must be executed, where each interpolated polyline is taken as the input of the algorithm. FiGURE 4.53 shows three interpolations between the end designs of each row. In blue is the output of the interpolation, and in red is the result of the GPA optimisation. One sees a close match between each pair of polylines, the main changes happening at the snap segments. It can also be noticed that the invariances in scale, rotation and translation are now taken care of, even before the GPA optimisation, which

shows that one can successfully interpolate between 2-parts assemblies. to the 95% stresses of the three designs at the end of the geodesics. Points in blue show the result for the interpolated designs. The polyline in blue is a circuit to help see the trajectory made by the stresses when one smoothly interpolates between the three designs. The 95% stresses of each interpolated design live closely to every other, which shows that we are able to populate the region of the stress plane dominating the reference. In other words, we can find novel designs with good mechanical behaviour in the vicinity of some given designs without much computational effort.

Another promising possibility of this interpolation method lies in the exploration of variations of existing traditional assemblies. For instance on FiGURE 4.55 the triangle consisting of a dovetail joint (top right), a gooseneck joint (bottom) and an abutted gooseneck joint (top left) is regularly interpolated.

While not implemented during the course of this PhD, we think it possible to interpolate between morethan-2-parts assemblies by taking inspiration from Wang et al. in [103] who, in particular, interpolate between models of plant roots seen as a collection of open curves with a constraint on the location of one of their endpoints, exactly like a multi-part polygonal assembly is nothing else but a collection of separating polylines each with at least one end constrained to be on another.

CONCLUSION

This section concludes what probably is the most important chapter of this manuscript. Indeed, this chapter dealt with the central concepts, tools and properties to automatically generate sequential interlocking assemblies. As we will see in CHAPTER 5, much of what we have used and created in this chapter to generate 2D assemblies is scalable to 3D without much effort. In SECTiON 4.1.3 we first talked about the Turtle and the Markov process to generate a polyline obeying user-given motions and explained that it ended up in a dead-end: cases happened where the Turtle was inescapably drawn to the centre of rotation x r until no more motion were possible, and the total lack of control on the overall shape of the polyline often led to degenerate designs. Yet, we decided to include this part of our research in this manuscript because we feel that it explains at an intuitive level the constraints that must be met by a polyline to obey a motion. A better approach was then introduced in SECTiON 4.1.2, in the form of the Guided Projection Algorithm (GPA).

This method let the user choose the amount of control he/she wants to impose on the final design, as it is relatively easy to add new constraints. The Turtle approach was not completely discarded as a simplified version may be used to generate the first instance of an almost-solution polyline. This approach proved to be powerful and can quickly generate a 2-parts assembly. SECTiON 4.1.3 explained that generating a multiparts assembly is easy, one needs only to successively generate a 2-parts assembly in the remaining part P 0 . What is more difficult is to generate an interlocking assembly.

While in this PhD we simply observed a simple heuristic to increase the odds of interlocking by judiciously placing two snap segments on the polyline, a weakness of our work lies in the lack of a more sophisticated method to ensure the interlocking. We can cite Wang et al. in [105] who, prior to the generation of a part P i , i > 1, builds the DBGs by introducing the vertex P i and finds the most favourable set of graph edges to ensure the interlocking across all graphs while minimising the shape complexity of the would-be part P i .

The creation of part P i is then guided by the blocking relationships encoded by the edge, and according to the author, this method successfully increases the odds of creating an interlocking assembly. As such, future work should try to add this kind of algorithm to our approach. Another route for future research would be to investigate the role of friction in the creation of the DBGs. Indeed, at this step the information encoded by each graph is binary: either P i is blocked by P j , or not, and all depends on the signs of the dot products of the normals n i and the instantaneous direction of motions, be it m pi in rotation or x t in translation. In real life, for assemblies we built, we find that sometimes a part P i may push P j out of the way, despite being blocked by it in theory: the segments of the polyline that are deemed to be blocking are oriented in such a way that in practice the parts may slide onto each other; there is not enough friction for the interlocking to happen in practice. To correct for that we suggest considering the standard Mohr-Coulomb law of friction when building the DBGs (see SECTiON 3.1.2.2): not only the sign but also the actual values of the dot products should be used: if all dot products of the same sign sum over a given threshold, then we can consider that the blocking happens in practice.

SECTiON 4.2 justifies why we bother at creating assemblies with novel, random, shapes. For the numerical mechanical model used, as well as for the choice of metric (the 95% stresses in both parts of a 2-parts assembly), we find indeed that a random sampling of the design space of polygonal assemblies very often yields designs strictly dominating human-drawn references, thus hinting at the potential of our approach for real-life assemblies. As studying the mechanical aspect of an assembly was not the primary goal of this PhD, it is obvious that many aspects of our work are to be improved from that point of view. In our opinion, future work shall be oriented in two ways. First, a more sophisticated (and faster!) numerical model should be implemented to better assess the mechanical properties of the assemblies. Second, an optimisation scheme should be found to modify the geometry of an assembly for it to behave better under loads. If a relationship can be established between some geometrical features of the polyline and good mechanical properties, then the GPA optimisation can be used with the additional constraints to create such features.

Another possibility would be to enrich the Markov process by adding a state such that the Turtle automatically draws at once these features.

In our opinion, SECTiON 4.3 deals with the most intriguing geometrical aspects of an assembly obeying rotations. After giving a better understanding of the cone of rotational freedom, this section shows that by playing with the number of snap segments, the user may reach the same amount of control on the cone of rotational freedom as he/she enjoys with the cone of translational freedom: for both motions, the cones may be shrunken precisely to the prescribed motions: C r = {x r } and C t = {x t } (or C t is precisely bounded by the vectors x A t and x B t if the user asks for a non-degenerate cone). Shrinking the cones to singletons is desirable for two reasons: it gives sensory feedback when (dis)assembling the pieces and dramatically reduces the number of base DBGs needed to be calculated to assess the interlocking of an assembly. Yet this comes at a significant cost: (dis)assembling may become impossible when introducing imperfections. This section concludes by giving guidelines for the polyline to have both a small cone C r and a high probability of obeying its prescribed centre x r in the presence of imperfections, by optimising first with the snap constraint on, then by ensuring that all sn i • m pj ≥ α, where α > 0 is the smallest distance between x r and the boundaries of the half-planes of the constraints. SECTiON 4.4 carries the modelling of imperfections in another direction: it investigates the consequences of a backlash between two parts in an assembly. We quickly reached the conclusion that one of our central hypothesis, the fact that all motions considered are infinitesimal, prevents us from inquiring further in a meaningful way: we saw that backlashes greatly expand the cones of freedom of motion, but also that in practice it does not seem to matter much. Yet, we tried to investigate the issue in a theoretical way by looking at finite motions, at the cost of making crude assumptions on the "rotation" considered. Bearing this in mind, we found regions of the plane that were likely to be obeyed for a finite "rotation", even when the parts are not precisely positioned with respect to each other. Considering finite motion is an active research subject, extending well beyond the scope of this PhD, and as such, we leave to future work the making of a more sophisticated model. This chapter finishes with SECTiON 4.5 where the theoretical background of the elastic deformation of a planar open curve is presented to explain how one may smoothly interpolate between two assemblies.

While interpolation helps in finding new designs with good mechanical properties, it has to be said that the main reason behind this section is simply because it is fun: it is extremely pleasing to trace geodesics in the L 2 ([0, 1], R 2 ) space, to observe the polylines getting morphed into one another and to understand the mathematical theory behind it (even if much more work needs to be done to fully master these concepts). CHAPTER 5 will be relatively brief: we will simply understand how to adapt the tools developed in this chapter for them to generate 3d assemblies. CHAPTER 5

3-D ASSEMBLIES

Let us now focus our attention on the creation of 3D assemblies. This chapter is organised as follows: SEC-TiON 5.1 introduces the mathematical object of dual quaternions. We will see indeed that any rigid body motion in 3D space can be unequivocally represented by a unit dual quaternion. Dual quaternions, therefore, encode rigid body motions in space, much like a 2D vector x t ∈ S 1 or a rotation centre x r ∈ R 2 respectively encode a translation and a rotation in the plane. SECTiON 5.1 is divided in two parts: the reader is kindly invited to read the first subsections, up to SECTiON 5.1.3 included, but may gloss over the remaining subsections as they go more in depth in the technicalities behind unit dual quaternions. The focus of SECTiON 5.2 is to define the cone of freedom of motion in 3D, in a similar fashion as what we did in translation and rotation in 2D in CHAPTER 3. SECTiON 5.4 describes how the guided projection algorithm is used to optimise a separating surface so that it obeys a given unit dual quaternion. SECTiON 5.5 explains how to create the successive parts of a N+1-parts assembly, in the same spirit as what was done in 2D in the previous chapter. Finally SECTiON 5.6 deals with the relationships between the cone of freedom and the snap face-vertex pairs (defined later); it also shows how to create 3D assemblies robust to imperfections.

DUAL QUATERNIONS

GOAL

In the context of 3D assemblies, the user may have a prior idea of the approximate shape of a part and the motion to disassemble it, but have no formal way to mathematically express this motion. In this case, knowing the assembled and disassembled poses of a part, we want to find a rotation and a translation mapping one to the other. It turns out that unit dual quaternions are extremely convenient at formally representing such a motion. To illustrate this, on FiGURE 5.1, the design domain is the cube and the user partitions it to get approximate shapes P 0 in blue and P 1 in red in the assembled position. We call these approximate parts pseudo-parts. Pseudo-part P 1 is then placed onto the desired disassembled pose consisting of a different location and orientation in space, in faint red. Our goal is to express mathematically the rigid motion mapping pseudo-P 1 in the assembled state (deep red) to pseudo-P 1 in the disassembled state (faint red). Here, this mapping is figured by the helical trajectory in red around the screw axis in black. We will understand in this section that such a screw motion is encoded by a unit dual quaternion. Put simply, this section aims at explaining how to find the rigid motion mapping two similar bodies with different locations and orientations in space using unit dual quaternions.

MOTIVATION

Our motivation for using dual quaternions to rigidly move 3D objects instead of the more common rotation matrices and vector algebra stems from the very reason quaternions and not matrices are used to rotate 3D objects in the computer graphics and spacecraft industries. Rotation matrices use the so-called Euler's angles to manipulate objects, typically noted ψ, β, ϕ and called the yaw, pitch and roll angles (not necessarily in that order, it seems to be author-dependent). These angles are defined in a pre-chosen arbitrary cartesian frame, and the ordering of the axes is of crucial importance as in general rotations do not commute. Thus each person using Euler's angles must unequivocally define the order in which the angles are to be composed and also the convention of the ordering of the cartesian axes. More than one student, and I can relate, had a headache figuring out which order should be used to achieve the desired result. All these conventions lead to a plethora of possibilities, making the comparison of the works of two distinct persons devilishly difficult. Even the name of the angles is a matter of convention: they can be α, β, γ. The dedicated Wikipedia page lists as many as 10 different conventions. From a code complexity point of view, the sine and cosine of each of these three angles must be calculated and composed using matrix multiplication, operations that are not cheap. Moreover, the interpolation between two orientations is convoluted due to the arbitrary nature of the rotation axes. Finally, and it is quite problematic for practical use, rotation matrices are subjected to gimbal lock when the determinant becomes zero: in robotic applications, this can lead to surprisingly fast and unpredictable motions, potentially dangerous for nearby humans.

By comparison quaternions, despite obeying seemingly more complex multiplicative rules, neatly encode a rotation: out of the four coordinates defining a quaternion, three correspond to the coordinates of the axis of rotation and the last encodes the angle of rotation. They are simple to compose and, by design, they are free from Gimbal locks. For these reasons, they are massively used in the computer graphics community.

Even the popular cross-platform game engine Unity uses them, even though it is targeted to hobbyist game creators without necessarily a deep mathematical background.

Since quaternions are more convenient to use, we made the choice of using them instead of rotation ma-trices. But as we are interested in generalised motions and not just rotations, we have to take into account translations. While vector algebra is suited for this task, it simply seems more practical to use in its place dual quaternions which encompass in a single well-defined theory both the translation and the rotation defining a 3D motion.

LONG STORY SHORT

We present here a succinct summary of the results developed hereunder. This subsection is intended for the hurried or not-so-mathematically-inclined reader who do not wish to dwell on the technicalities behind unit dual quaternions. Let DH denotes the set of dual quaternions. Any dual quaternion q ∈ DH can be written as:

q = cos θ 2 , û sin θ 2
with θ a dual scalar and û a dual vector:

θ = θ 0 + ϵθ ϵ θ 0 , θ ϵ ∈ R û = u 0 + ϵu ϵ u 0 , u ϵ ∈ R 3
ϵ is the so-called dual unit. It is a number such that:

ϵ = 0 ϵ 2 = 0
We are interested in unit dual quaternions, whose set is denoted U (DH). For q to be a unit dual quaternion, it must be such that:

||u 0 || = 1 u 0 • u ϵ = 0
In such a case, q encodes a screw motion:

■

The screw axis goes through the point u 0 × u ϵ ∈ R 3 .

■

The screw axis is oriented by u 0 .

■

The angle of the rotation is θ 0 .

■

The magnitude of the translation is θ ϵ .

The following subsections go into greater details to define and prove the aforementioned statements and properties. Yet they are not necessary to understand the remaining of this dissertation: one can can readily deem unit dual quaternions as a black box encoding rigid body motions in R 3 . As such the reader may gloss over the following subsections and start the reading at SECTiON 5.2.

QUATERNIONS

Before talking about dual quaternions, it may be convenient to introduce first the simpler quaternions, used in the aerospace or video games industries to rotate 3D objects. This SECTiON 5.1.4 provides a comprehensive introduction to quaternions, with the hope that anybody with a light mathematical background would be able to understand it. The interested reader is referred to [START_REF] Shoemake | Animating rotation with quaternion curves[END_REF] for a more concise (and, frankly, a quite pleasant and entertaining) introduction to quaternion and spherical interpolation.

Quaternions are an absolutely fascinating and often unappreciated area of mathematics. They are fourdimensional numbers that were first described by the Irish mathematician Hamilton on October the 16 th the vector part). They can be represented in many forms, among which but not exhaustively:

■ q = a + ib + jc + kd with a, b, c, d ∈ R ■ q =      a,      b c d           ■ q = [ρ cos θ, ρw sin θ]
where ρ = ||q|| is the norm of q (defined later) and [cos θ, w sin θ] is the unit quaternion pointing towards q with cos θ = a √ a 2 +b 2 +c 2 +d 2 and sin θ =

√ b 2 +c 2 +d 2 √ a 2 +b 2 +c 2 +d 2 . ■ q = [s, v]
where s = a is the scalar part and v = (b, c, d) T is the vector part.

The set of quaternions is denoted as H in homage to Hamilton.

Multiplication

In the first representation numbers 1, i, j and k are the quaternions units and follow a certain number of multiplicative rules that are summed up in TABLE 5.1. Note that the multiplication between two quaternions is not commutative : ij = ji.

× 1 i j k 1 1 i j k i i -1 k -j j j -k -1 i k k j -i -1
Table 5.1| Quaternion units multiplication rules (the multiplication order is row times column)

The additive rule is straight forward

q 1 + q 2 = (a 1 + ib 1 + jc 1 + kd 1 ) + (a 2 + ib 2 + jc 2 + kd 2 ) = a 1 + a 2 + i(b 1 + b 2 ) + j(c 1 + c 2 ) + k(d 1 + d 2 )
Given the two quaternions on the previous equation, their multiplication using TABLE 5.1 results in:

q 1 q 2 = (a 1 a 2 -(b 1 b 2 + c 1 c 2 + d 1 d 2 )) + i(a 1 b 2 + a 2 b 1 + c 1 d 2 -d 1 c 2 )+ j(a 1 c 2 + a 2 c 1 + d 1 b 2 -d 2 b 1 ) + k(a 1 d 2 + a 2 d 1 + b 1 c 2 -b 2 c 1 )
Computing quaternion multiplication using these rules can be quite cumbersome which might explain why quaternions are sometimes considered as a "positive evil of no inconsiderable magnitude" as Heaviside once put it. However the last representation q = [s, v] can neatly define multiplication using our modern vector algebra, namely the dot product (. • .) and cross product (. × .):

q 1 q 2 = [s 1 , v 1 ][s 2 , v 2 ] 5.1 = [(s 1 s 2 -v 1 • v 2 ), (s 1 v 2 + s 2 v 1 + v 1 × v 2 )]
5. 21 A headstone marks the bridge on which he was the moment when he got the idea.

132

3-D assemblies

The addition is also very simple:

q 1 + q 2 = [s 1 , v 1 ] + [s 2 , v 2 ] = [s 1 + s 2 , v 1 + v 2 ]
5. 1.4.2 The conjugate, norm and reciprocal of a quaternion

The definition of the conjugate of a quaternion is simply extended from the definition of the conjugate of a complex number. As a reminder let z = a + ib ∈ C be a complex number. Then the conjugate of z is

z * = a -ib.
The conjugate of the different representations given earlier are:

■ q = a + ib + jc + kd =⇒ q * = a -ib -jc -kd ■ q =      a,      b c d           =⇒ q * =      a,      -b -c -d           ■ q = [ρ cos θ, ρw sin θ] =⇒ q * = [ρ cos θ, -wρ sin θ] = [ρ cos (-θ), ρw sin (-θ)] . ■ q = [s, v] =⇒ q * = [s, -v].
The conjugate of the product of two quaternions is equal to the product of the conjugates computed in the reverse order: let

q 1 = [s 1 , v 1 ] and q 2 = [s 2 , v 2 ] q 1 q 2 * = [s 1 s 2 -v 1 • v 2 , s 1 v 2 + s 2 v 1 + v 1 × v 2 ] * = [s 1 s 2 -v 1 • v 2 , s 1 v 2 + s 2 v 1 + v 1 × v 2 ] = [s 1 s 2 -(-v 1 ) • (-v 2 ), s 1 (-v 2 ) + s 2 (-v 1 ) + (-v 2 × (-v 1 )] = [s 2 , -v 2 ][s 1 , -v 1 ] = q * 2 q * 1
Recall that the norm of a complex number z = a + ib ∈ C is the euclidean distance between the point represented by z and the origin of

C: ||z|| = √ a 2 + b 2 = √ zz * . The norm of a quaternion q = a + ib + jc + kd ∈ H is simply ||q|| = a 2 + b 2 + c 2 + d 2 = s 2 + v • v = √ qq * = √ q * q
which also corresponds to the euclidean distance between 0 and the point (a, b, c, d

) T ∈ R 4 .
A unit quaternion q is simply such that ||q|| = 1. Let U (H) = {q ∈ H, ||q|| = 1} denote the set of unit quaternions.

The reciprocal of a non zero quaternion q is by definition the quaternion q -1 such as qq -1 = q -1 q = [START_REF]C'est pas sorcier -France 3. C'est pas sorcier -Le Grand Palais épate la galerie[END_REF]0] where [START_REF]C'est pas sorcier -France 3. C'est pas sorcier -Le Grand Palais épate la galerie[END_REF]0] is the quaternion representing the real number 1. The conjugate of a complex number

z = a + ib is z -1 = z * zz * = a-ib ||z|| 2 .
This definition is extended for quaternions and:

q -1 = q * ||q|| 2
Note that for a unit quaternion q ∈ U (H), the conjugate is the reciprocal:

||q|| = 1 =⇒ q * = q -1 5.3

QUATERNIONS AND MULTIPLICATION

Just as complex (2D) numbers neatly define rotations in the plane, involving some scaling and rotating, quaternions are quite surprisingly very pragmatic tools to describe rotations in 3D. They are more efficient and less prone to numerical errors than other methods, including Euler angles and rotation matrices, to handle rotations in 3D.

Notations: Let p ∈ R 3 be a point and q = cos θ 2 , u sin θ 2 ∈ U (H) a unit quaternion. The quaternionic representation of point p is denoted as the quaternion p = [0, p] ∈ H. The result p of counterclockwise rotation of p around axis u by angle θ is given by: p = [0, p] = qpq -1 To make this dissertation more digest, the explanations and details of this formula are glossed over in this chapter. That being said, the interested reader is referred to APPENDiX D.1 which goes into great detail and tries to provide intuition on the why and how of this formula. Only the most salient results are stated hereunder.

Intuition

The computation of the product qpq -1 and the proof (see APPENDiX D.1) that it does the rotation wanted are quite cumbersome and do not let us really understand what is going on. Let's try to understand why defining q using half the angle we want to rotate θ 2 and multiplying on the right and on the left by q and q -1 = q * (recall that ||q|| = 1, see EQUATiON ( 5 This rotation happens in R 4 and any projection into the workspace R 3 leads to distortions: the dot product is not preserved by this projection, hence neither are the angles nor the distances between points, which means that the transformation is not rigid and thus the product rs (or sr) cannot be considered as encoding a 3D rotation.

Let's zoom in the construction of p r = qpq * where q = [cos θ 2 , u sin θ 2 ] for some angle θ and unit vector u ∈ R 3 . The quaternion qp is forming an angle θ 2 with p as the rotation happened about u in an anticlockwise manner. Taking the quaternion qp and multiplying it on the right by q -1 = q * (EQUATiON (5.3)) might at first seem odd as one is rotating in an clockwise manner through θ 2 , so it could seem that we are rotating qp back to p. Yet, a more careful analysis shows that q * can be interpreted in two ways:

1. q * = [cos θ 2 , -u sin θ 2 ] 2. q * = [cos -θ 2 , u sin -θ 2 ]
Bearing in mind that qp is multiplied on the right by q * , the first interpretation means that the rotation of θ 2 happens in an clockwise manner (multiplication on the right) but about the negative axis of rotation -u. The second interpretation suggests that the clockwise rotation is about u but through the opposite angle -θ 2 . Either way, a clockwise rotation through the positive angle about the negative axis or a clockwise rotation about the positive axis through the negative angle yields the same result: the rotation of qp to qpq * happens in the same direction as the rotation from p to qp does, i.e. an anticlockwise rotation through the positive angle about the positive axis. All in all the operation taking p to qp is a rotation through half the angle, and the one bringing qp to qpq * completes this rotation through the other half angle.

As shown by EQUATiONS (D.2) and (D.3), not only does the multiplication on the right by q * and on the left by q sums up to one rotation through the full angle θ, it keeps the scalar part of the resulting quaternion to zero: it defines an isomorphism on the set of quaternion with a zero scalar-part, precisely the set that can be interpreted as 3D points. The interested reader is strongly encouraged to watch the outstanding playlist on quaternions by the youtuber 3Blue1Brown, [START_REF] Brown | Visualizing quaternions (4d numbers) with stereographic projection[END_REF] to learn more at an intuitive level about this fascinating area of mathematics.

Most of my understanding comes from watching his videos.

DUAL NUMBERS

Dual numbers were developed by Clifford in 1873 [21]. A dual real number, which will be denoted using a hat• is defined to be x = x 0 + ϵx ϵ Where x 0 and x ϵ are real numbers respectively referred to as the real and dual parts of x and ϵ is the dual unit such that ϵ 2 = 0 (and more generally any power of ϵ greater than 2 is equal to 0). The addition and multiplication of two dual numbers x and ŷ are defined as follows:

x + ŷ = (x 0 + y 0 ) + ϵ(x ϵ + y ϵ ) 5.4 xŷ = x 0 y 0 + ϵ(x 0 y ϵ + y 0 x ϵ ) 5.5
A pure dual number is defined as a dual number having a zero real part x = ϵx ϵ . The inverse of a dual number is defined for a non-pure dual number as:

x-1 = 1 x 0 + ϵ x ϵ x 2 0
And it can easily be verified that x-1 x = 1.

Dual vectors

The following definitions could be generalized to any dimension, but as we are working in R 3 we are only going to focus on vectors and dual vectors in three dimensions.

A dual vector x is a vector whose entries are all dual numbers. Superscript . i denotes the i th component.

x =      x1 x2 x3      =      x 1 0 + ϵx 1 ϵ x 2 0 + ϵx 2 ϵ x 3 0 + ϵx 3 ϵ     
The product of a dual number x with a dual vector x is obtained under the standard multiplicative rule:

x x =      xx 0 xx 1 xx 2     
The dot product and cross product between dual vectors x and ŷ are respectively defined to be:

x • ŷ = x1 ŷ1 + x2 ŷ2 + x3 ŷ3 5.6 x × ŷ =      x2 ŷ3 -x3 ŷ2 x3 ŷ1 -x1 ŷ3 x1 ŷ2 -x2 ŷ1      5.7

DUAL QUATERNIONS

A dual quaternion q is defined by extending the definition of a dual number:

q = q 0 + ϵq ϵ
where q 0 and q ϵ are the quaternions:

q 0 = [s q0 , v q0 ] q ϵ = [s qϵ , v qϵ ]
By additive and multiplicative rules of quaternion, a dual quaternion can also be viewed as built of a dual scalar part and dual vector part:

q = q 0 + ϵq ϵ = [s q0 , v q0 ] + ϵ[s qϵ , v qϵ ] = [s q0 + ϵs qϵ , v q0 + ϵv qϵ ] = [ŝ q , vq ]
The sum and product of two dual quaternion q and r are:

q + r = [s q0 , v q0 ] + ϵ[s qϵ , v qϵ ] + [s r0 , v r0 ] + ϵ[s rϵ , v rϵ ] = [s q0 + s r0 , v q0 + v r0 ] + ϵ[s qϵ + s rϵ , v qϵ + v rϵ ] = [(s q0 + s r0 ) + ϵ(s qϵ + s rϵ ), (v q0 + v r0 ) + ϵ(v qϵ + v rϵ )] = [(s q0 + ϵs qϵ ) + (s r0 + ϵs rϵ ), (v q0 + ϵv qϵ ) + (v r0 + ϵv rϵ )] = [ŝ q + rq , vq + vr ] qr = (q 0 + ϵq ϵ )(r 0 + ϵr ϵ ) = q 0 r 0 + ϵ(q 0 r ϵ + q ϵ r 0 ) = [s q0 s r0 -v q0 • v r0 , s q0 v r0 + s r0 v q0 + v q0 × v r0 ]+ ϵ[s q0 s rϵ + s qϵ s r0 -v q0 • v rϵ -v qϵ • v r0 , s q0 v rϵ + s rϵ v q0 + s qϵ v r0 + s r0 v qϵ + v q0 × v rϵ + v qϵ × v r0 ] = [(s q0 s r0 -v q0 • v r0 ) + ϵ(s q0 s rϵ + s qϵ s r0 -v q0 • v rϵ -v qϵ • v r0 ), (s q0 v r0 + s r0 v q0 + v q0 × v r0 ) + ϵ(s q0 v rϵ + s rϵ v q0 + s qϵ v r0 + s r0 v qϵ + v q0 × v rϵ + v qϵ × v r0 )] = [ s q0 s r0 + ϵ(s q0 s rϵ + s qϵ s r0 ) -v q0 • v r0 + ϵ(v q0 • v rϵ + v qϵ • v r0 ) , (s q0 v r0 + ϵ(s q0 v rϵ + s rϵ v q0 ) + s r0 v q0 + ϵ(s qϵ v r0 + s r0 v qϵ ) + v q0 × v r0 + ϵ(v q0 × v rϵ + v qϵ × v r0 ) ] = [ŝ q ŝr -vq • vr , ŝq vr + ŝr vq + vq × vr ]
The results bear close resemblance to the sum and products of standard quaternions. A pure dual quaternion is a dual quaternion q whose real quaternion q 0 = 0. If q is not a pure dual quaternion, then the inverse of q is

q-1 = q -1 0 -ϵq ϵ q -2 0
Two conjugates of dual quaternion q are defined:

q * = q * 0 + ϵq * ϵ q• = q * 0 -ϵq * ϵ 5.8
The product q q * is a dual scalar as proved in the following equations:

q q * = (q 0 + ϵq ϵ )(q * 0 + ϵq * ϵ ) = q 0 q * 0 + ϵ(q 0 q * ϵ + q ϵ q * 0 ) = ||q 0 || 2 + ϵ [s q0 , v q0 ][s qϵ , -v qϵ ] + [s qϵ , v qϵ ][s q0 , -v q0 ] = ||q 0 || 2 + ϵ [s q0 s qϵ + v qϵ • v q0 , s qϵ v q0 -s q0 v qϵ -v q0 × v qϵ ] + [s qϵ s q0 + v q0 • v qϵ , s q0 v qϵ -s qϵ v q0 -v qϵ × v q0 ] = ||q 0 || 2 + ϵ[2s q0 s qϵ + 2v qϵ • v q0 , 0] = ||q 0 || 2 + 2ϵ(s q0 s qϵ + v qϵ • v q0 )
By definition, a unit dual quaternion is a dual quaternion q such that q q * = 1. Hence, by identifying the real and dual part of q q * , a unit dual quaternion q must satisfy:

||q 0 || = 1 5.9 s q0 s qϵ + v qϵ • v q0 = 0 5.10
When one interprets quaternions q 0 and q ϵ as vectors in four dimensions : q 0 = (s q0 , v T q0 ) T and q ϵ = (s qϵ , v T qϵ ) T , then one finds that EQUATiON (5.10) reads that q ϵ and q 0 are orthogonal in R 4 . The fact that q ϵ and q 0 are orthogonal and that q 0 is a unit quaternion as stated by EQUATiON (5.9) implies that the set of unit dual quaternions is the union of the unit hypersphere in R 4 and the set of hyperplanes tangent to this hypersphere (translated to the origin of R 4 to contain the zero quaternion).

One can also verify that EQUATiONS (5.9) and (5.10) reduce the degrees of freedom when choosing the components of q from 8 to 6, exactly the number of degrees of freedom of a particle in 3D undergoing a rigid body motion. As stated by McCarthy in [START_REF] Mccarthy | An Introduction to Theoretical Kinematics[END_REF], the set of unit dual quaternions "is a six-dimensional algebraic submanifold of R 8 , termed the image space of spatial displacements".

In this document, we will refer to the set of dual quaternions as DH and the set of unit dual quaternions as U (DH).

In what follows we develop the most salient results concerning the relationships between a rigid body motion and a unit dual quaternion.

SCREW AXIS AND RIGID BODY MOTION

5.1.8.1 Unit dual quaternion and generalised 3D motion Let q = q 0 + ϵq ϵ be a unit dual quaternion. Let θ ∈ [0, π] and u ∈ R 3 be an angle and a unit vector such that

q 0 = [s q0 , v q0 ] = [cos θ 2 , u sin θ 2 ]
Meaning that q 0 is a quaternion encoding a rotation about axis u by angle θ. Let also t be a quaternion such that t = 2q ϵ q * 0 . Expanding t yields:

t = 2q ϵ q * 0 = 2[s qϵ , v qϵ ][s q0 , -v q0 ] = [s qϵ s q0 + v qϵ • v q0 , s q0 v qϵ -s qϵ v q0 + v q0 × v qϵ ] = [0, 2 s q0 v qϵ -s qϵ v q0 + v q0 × v qϵ ]
Where the last step made use of the fact that since ||q|| = 1, q 0 and q ϵ are orthogonal. Because t has a zero scalar part, its imaginary part t = 2 s q0 v qϵ -s qϵ v q0 + v q0 × v qϵ can be interpreted as a vector in R 3 .

Since t = 2q ϵ q * 0 =⇒ q ϵ = 1 2 tq 0 , q can be rewritten to be:

q = q 0 + 1 2 ϵtq 0
Whereas the quaternion representation of a point p ∈ R 3 is p = [0, p], the conversion to a dual quaternion is defined to be:

p = [1, 0] + ϵ[0, p] = 1 + ϵp
Meaning that a dual quaternion r = r 0 + ϵr ϵ can be interpreted as a point in R 3 if and only if the non dual part r 0 is equal to 1 (as a real number) and the dual part r ϵ is a quaternion with a zero scalar part. In that case, the vector part of the dual part can be seen as a vector in R 3 .

Let us compute the product of the dual representation of a point p ∈ R 3 with the unit dual quaternion q defined above using the conjugation given EQUATiON (5.8):

q pq • = q 0 + 1 2 ϵtq 0 [1, 0] + ϵ[0, p] q * 0 - 1 2 ϵ(tq 0 ) * 5.11a = q 0 + ϵ q 0 p + 1 2 tq 0 q * 0 - 1 2 ϵq * 0 t * 5.11b = q 0 q * 0 + ϵ - 1 2 q 0 q * 0 t * + q 0 pq * 0 + 1 2 tq 0 q * 0 5.11c = 1 + ϵ - 1 2 [0, -t] + q 0 pq * 0 + 1 2 [0, t] 5.11d = 1 + ϵ(q 0 pq * 0 + t) 5.11e
q 0 pq * 0 is exactly the result of the rotation of p through quaternion q 0 as we saw SECTiON 5.1.5. Therefore the scalar part of q 0 pq * 0 is 0 and its imaginary part can be interpreted as a rotated point. Quaternion t also has a zero scalar part and can be interpreted as a 3D vector. Thus, the dual quaternion q pq • meets all conditions to be viewed as a point in R 3 and one can interpret the operation q pq • as rotating p by θ around u followed by a translation of magnitude ||t|| along direction t ||t|| . In other words, q enables p to be subjected to a rigid body motion ! Had we wanted to translate first p and then rotate it about u, we would have used the quaternion r =

r 0 + 1 2 ϵr 0 t with r 0 = q 0 = [cos θ 2 , u sin θ 2 ]
. Indeed, expanding r pr • yields:

r pr • = r 0 + 1 2 ϵr 0 t (1 + ϵp) r * 0 - 1 2 ϵ(r 0 t) * = r 0 + ϵ r 0 p + 1 2 r 0 t r * 0 + ϵ - 1 2 t * r * 0 = r 0 r * 0 + ϵ - 1 2 r 0 tr * 0 + r 0 pr * 0 + 1 2 r 0 tr * 0 = 1 + ϵr 0 - 1 2 [0, -t] + p + 1 2 [0, t] r * 0 = 1 + ϵr 0 (p + t)r * 0 5.12
For the same reason as above, r pr • can be interpreted as a point p that is first translated along t and then rotated through quaternion r 0 . The reader's attention is drawn to the fact that a rotation without translation can be computed with a unit dual quaternion q having q ϵ = 0 and a translation without rotation would be given by q with q 0 = 1.

Note that in that case q = 1+ 1 2 ϵt works with half the amount of translation, quite similarly to a pure rotation working with half the angle θ 2 .

Mozzi-Chasles' theorem

The Mozzi-Chasles' theorem (discovered by the Italian G. Mozzi in 1763 but attributed to M. Chasles in 1830) states that ( [START_REF] Dunham | The Instantaneous Motion of a Rigid Body[END_REF] page 666)

Mozzi-Chasles' theorem

The most general rigid motion is resultant of a rotation and a translation parallel to the axis of the rotation A neat and rigorous demonstration of this theorem is provided in [START_REF] Dunham | The Instantaneous Motion of a Rigid Body[END_REF].

Following [START_REF] Kavan | Dual Quaternions for Rigid Transformation Blending[END_REF] and [22] we prove in APPENDiX D.2 that any unit dual quaternion can be written down as:

q = cos θ 2 , û sin θ 2
where θ is a dual angle and û is a dual vector in R 3 . Such concise expression will turn out to be particularly convenient to encode a rigid body motion: we will understand hereunder that the dual angle θ = θ 0 + ϵθ ϵ contains the angle of rotation (θ 0 ) and the magnitude of the translation (θ ϵ ), while the dual vector û = u 0 + ϵu ϵ is constituted of the so-called Plücker coordinates of the screw axis.

Plücker coordinates

As stated in [22], Plücker coordinates [START_REF]Neue Geometrie des Raumes gegründet auf die Betrachtung der geraden Linie als Raumelement Abth[END_REF] translation of this rotated point along an axis that may or may not have anything to do with the rotation axis hidden in q 0 . The question is: where is the screw motion, i.e. where is the motion of rotation and translation along the same axis that is not necessarily going through the origin? To answer that we will need Plücker and the fact that any unit dual quaternion q can be written down as q = cos θ 2 , û sin θ 2 .

Let θ 0 and θ ϵ ∈ R be such as θ = θ 0 + ϵθ ϵ . Let also u 0 , u ϵ ∈ R 3 such that û = u 0 + ϵu ϵ and ||u 0 || = 1 and u 0 • u ϵ = 0 so that the tuple [u 0 , u ϵ ] can be safely interpreted as a line in R 3 . We are going to show that the unit dual quaternion q = cos θ 2 , û sin θ 2 encodes a rotation about θ 0 and a translation of θ ϵ along the line [u 0 , u ϵ ], i.e precisely a screw motion of axis [u 0 , u ϵ ].

As seen above, with c = cos θ0 2 , s = sin θ0 2 one can develop q as q = q 0 + ϵq ϵ

q 0 = [c, u 0 s] q ϵ = [- θ ϵ 2 s, u 0 θ ϵ 2 c + u ϵ s]
Developing the product q pq • for some dual quaternion p representing a point in R 3 yields:

q pq • = 1 + ϵ(q 0 pq * 0 + q ϵ q * 0 -q 0 q * ϵ )
The rotation term q 0 pq * 0 encodes a rotation of angle θ along an axis oriented by u 0 going through 0. We have the correct angle but not yet the correct axis of rotation: as far as this term is concerned the axis of rotation is [u 0 , 0] and not [u 0 , u ϵ ] as we would like. Expanding the translation term q ϵ q * 0 -q 0 q * ϵ yields:

q ϵ q * 0 -q 0 q * ϵ = [0, θ ϵ u 0 + 2u ϵ sc + 2u 0 × u ϵ s 2 ]
The good news is that the quantity θ ϵ u 0 is a translation of magnitude θ ϵ along the unit vector u 0 : we already have one bit of what we want. But the bad news is that rotation term q 0 pq * 0 is still a rotation around an axis going through 0 and the other part of the translation term 2u ϵ sc + 2u 0 × u ϵ s 2 does not have an easy geometrical interpretation. We are going to transform it using two identities :

u 0 • u 0 = 1 and u 0 • u ϵ = 0 2scu ϵ + 2s 2 u 0 × u ϵ = -2sc((u 0 • u ϵ )u 0 -(u 0 • u 0 )u ϵ ) + (s 2 + s 2 -c 2 + c 2 )u 0 × u ϵ Using the triple product: a × (b × c) = (a • c)b -(a • b)c
we can rewrite the latter equation as:

2scu ϵ + 2s 2 u 0 × u ϵ = u 0 × u ϵ -(c 2 -s 2 )u 0 × u ϵ + 2scu 0 × (u 0 × u ϵ )
Recall that the quantity p ⊥ = u 0 × u ϵ is the point in R 3 that is the orthogonal projection of the origin onto the line [u 0 , u ϵ ]. Also, naturally, u 0 • p ⊥ = 0. EQUATiON (D.3) tells us that developing the product q 0 [0, p ⊥ ]q * 0 yields:

q 0 [0, p ⊥ ]q * 0 = [0, 2s 2 (u 0 • p ⊥ )u 0 + (c 2 -s 2 )p ⊥ + 2sc(u 0 × p ⊥ ) = [0, (c 2 -s 2 )(u 0 × u ϵ ) + 2sc(u 0 × (u 0 × u ϵ ))]
Hence:

q ϵ q * 0 -q 0 q * ϵ = [0, θ ϵ u 0 + u 0 × u ϵ -(c 2 -s 2 )u 0 × u ϵ + 2scu 0 × (u 0 × u ϵ ) ] = [0, θ ϵ u 0 + u 0 × u ϵ ] -q 0 [0, u 0 × u ϵ ]q * 0
And finally:

q pq • = 1 + ϵ (q 0 pq * 0 + [0, θ ϵ u 0 + u 0 × u ϵ ] -q 0 [0, u 0 × u ϵ ]q * 0 ) 5.13 = 1 + ϵ (q 0 (p -[0, u 0 × u ϵ ]) q * 0 + [0, θ ϵ u 0 + u 0 × u ϵ ]) 5.14
This is it: this latest expression is precisely a screw motion around [u 0 , u ϵ ]!. To understand why, let us look at each of the terms:

As stated above u 0 × u ϵ is the orthogonal projection of the origin onto the line [u 0 , u ϵ ]; it is the point on this line the closest to 0. Hence the quaternion p -[0, u 0 × u ϵ ] is the quaternionic representation of the point p that we are interested in transforming translated by the amount u 0 × u ϵ towards the origin. The product

q 0 (p -[0, u 0 × u ϵ ]
) q * 0 is therefore to be understood as "take p, translate it by the amount u 0 ×u ϵ and rotate this shifted point by θ 0 around the axis [u 0 , 0]. The next quaternion is the translation term: [0, θ ϵ u 0 +u 0 ×u ϵ ].

The first part of this term, [0, θ ϵ u 0 ] merely says "Once you have shifted and rotated p, move it by θ ϵ along the vector u 0 . The operation q 0 (p -[0, u 0 × u ϵ ]) q * 0 + [0, θ ϵ u 0 ] is thus a screw motion of axis [u 0 , 0] where pu 0 × u ϵ is rotated about θ 0 and translated by θ ϵ . The last translation term is [0, u 0 × u ϵ ] and states "now that the screw motion of axis [u 0 , 0] is done, shift everything back to its original position by translating the resulting point by u 0 × u ϵ away from the origin". With p ⊥ = u 0 × u ϵ the whole process is therefore "perform a screw motion of point pp ⊥ at the axis oriented by u 0 and going through 0 and then add p ⊥ to the result" which rigorously states the same thing as "Perform a screw motion of point p at the axis oriented by u 0 and going through the point p ⊥ ", precisely the screw motion that we were looking for! On FiGURE 5.4 the blue bow is mapped to the red one using a dual quaternion whose axis is the line in black. The trajectory in blue shows the screw motion around the axis. Arrows on the boxes hopefully help to see their respective orientations.

Finding the unit dual quaternion associated to a rigid body motion

Let us take a step back. This rather long exposition on unit dual quaternions has shown that they are particularly fit at encoding rigid body motions. When we looked at 2D assemblies in CHAPTER 4, we saw that to generate them the user must provide a list of motions, translation and/or rotation. In 3D this principle stays the same, except that screw motions are much harder to intuitively see. As such the user may find it cumbersome to specify unit dual quaternions. Yet, if the user gives as well an approximate shape of the part, a so-called pseudo-part, (much like in 2D the user could input a polyline to be optimised), he/she can also move it in space at its resting position, and then ask to compute the unit dual quaternion mapping the former to the latter. This process is much more intuitive as it simply consists of placing and orienting a solid body in space. This section aims at calculating this unit dual quaternion.

Say we have two particles2 p A and p B , like on FiGURE 5.5, and we want to find the unit dual quaternion q = q 0 + ϵq ϵ transforming p A into p B : qB = q qA q• with qA and qB the dual quaternions representing points p A and p B . We are first going to find the quaternion q 0 which rotates the orthonormal basis associated with p A into the one associated with p B before computing q ϵ .

Calculating q

0 Given      e x A e y A e z A      and      e x B e y B e z B     
orthonormal basis, we wish to find the unit quaternion q 0 = [c, u 0 s] (with c = cos θ0 2 ; s = sin θ0 2 and ||u 0 || = 1) such that:

         q 0 [0, e x A ]q * 0 = [0, e x B ] q 0 [0, e y A ]q * 0 = [0, e y B ] q 0 [0, e z A ]q * 0 = [0, e z B ] ⋆ (⋆) ⇔          (c 2 -s 2 )e x A + 2s 2 (u 0 • e x A )u 0 + 2sc(u 0 × e x A ) = e x B (c 2 -s 2 )e y A + 2s 2 (u 0 • e y A )u 0 + 2sc(u 0 × e y A ) = e y B (c 2 -s 2 )e z A + 2s 2 (u 0 • e z A )u 0 + 2sc(u 0 × e z A ) = e z B
Since e i A • e j A = 0 for i, j ∈ {x, y, z}, i = j one has:

(⋆) ⇔                               2s 2 (u 0 • e x A )(u 0 • e y A ) + 2sc(u 0 × e x A ) • e y A = e x B • e y A 2s 2 (u 0 • e x A )(u 0 • e z A ) + 2sc(u 0 × e x A ) • e z A = e x B • e z A    2s 2 (u 0 • e y A )(u 0 • e x A ) + 2sc(u 0 × e y A ) • e x A = e y B • e x A 2s 2 (u 0 • e y A )(u 0 • e z A ) + 2sc(u 0 × e y A ) • e z A = e y B • e z A    2s 2 (u 0 • e z A )(u 0 • e x A ) + 2sc(u 0 × e z A ) • e x A = e z B • e x A 2s 2 (u 0 • e z A )(u 0 • e y A ) + 2sc(u 0 × e z A ) • e y A = e z B • e y A
Subtracting (we only develop the equations for one set of equations, the others being obtained by permuting {x, y, z}):

(⋆) ⇔    2sc (-(u 0 × e y A ) • e x A + (u 0 × e x A ) • e y A ) = -e y B • e x A + e x B • e y A ... Knowing that b • (c × a) = a • (b × c): (⋆) ⇔    2sc (-u 0 • (e y A × e x A ) + u 0 • (e x A × e y A )) = e x B • e y A -e y B • e x A ... ⇔    4sc(u 0 • e z A ) = e x B • e y A -e y B • e x A ... Let a x = e x B • e y A -e y B • e x A a y = e y B • e z A -e z B • e y A a z = e z B • e x A -e x B • e z A Then (since 4sc = 2 sin θ 0 ) (⋆) ⇔          2(e z A • u 0 ) sin θ 0 = a x 2(e x A • u 0 ) sin θ 0 = a y 2(e y A • u 0 ) sin θ 0 = a z
And so, assuming θ 0 / ∈ {0, π}:

(⋆) ⇔      e T z A e T x A e T y A           u x u y u z      = 1 2 sin θ 0      a x a y a z      Where u 0 = (u x , u y , u z ) T . Let M =      e T z A e T x A e T y A      and a =      a x a y a z     
. M is orthonormal and thus invertible with M -1 = M T . Assuming a = 0 one has:

(⋆) ⇔ u 0 = 1 2 sin θ 0 M T a
Recall that ||u 0 || = 1 and so:

||u 0 || = 1 ⇔ u T 0 u 0 = 1 ⇔ 1 4 sin 2 θ 0 a T M M T a = 1 ⇔ a T a = 4 sin 2 θ 0 ⇔ sin 2 θ 0 = 1 4 ||a|| 2 ⇔ θ 0 = arcsin ± 1 2 ||a||
Two angles, negatives of each other, are solutions to the problem. As these angles are used to compute the vector u 0 = 1 2 sin θ0 M T a we obtain two vectors u 0 , each the opposite of the other. The final rotation is therefore the same whether we choose one θ 0 (and thus one u 0 ) or the other as rotating by an angle around an axis is the same as rotating by the opposite angle around the reversed axis (all rotations are anticlockwise). Hence we could safely choose θ 0 = arcsin 1 2 ||a|| and u 0 = M T a ||a|| . Yet, because the function

x → arcsin x takes values in [-π 2 , π 2 ]
the θ 0 obtained might not reflect the actual angle between p A 's basis and p B 's basis. To know more about θ 0 we need to look at, say, the equation (with c = cos θ0 2 and s = sin θ0

2 ):

e x B = (c 2 -s 2 )e x A + 2s 2 (u 0 • e x A )u 0 + 2sc(u 0 × e x A ) = cos θ 0 e x A + (1 -cos θ 0 )(u 0 • e x A )u 0 + 2sc(u 0 × e x A )
Projecting on e x A yields:

cos θ 0 + (1 -cos θ 0 )(u 0 • e x A ) 2 = e x B • e x A
And:

θ 0 = arccos e x B • e x A -(u 0 • e x A ) 2 1 -(u 0 • e x A ) 2

5.15

All in all, since x → arccos x takes value in [0, π], if arccos

ex B •ex A -(u0•ex A ) 2 1-(u0•ex A ) 2 < π 2 then θ 0 = arcsin ||a|| 2 , else θ 0 = π -arcsin ||a||
2 . This can be rewritten as

θ 0 = atan2 1 2 ||a||, ex B •ex A -(u0•ex A ) 2 1-(u0•ex A ) 2
, where atan2 is a function provided in most programming languages. In a nutshell the quaternion q 0 looked for is given by (assuming a = 0):

q 0 = cos θ 0 2 , u 0 sin θ 0 2    θ 0 = atan2 1 2 ||a||, ex B •ex A -(u0•ex A ) 2 1-(u0•ex A ) 2 u 0 = M T a ||a||
If a = 0 it is easy to see that either θ 0 = 0 or θ 0 = π: indeed recall that:

(⋆) ⇔          2(e z A • u 0 ) sin θ 0 = a x 2(e x A • u 0 ) sin θ 0 = a y 2(e y A • u 0 ) sin θ 0 = a z
Hence, since u 0 cannot be orthogonal to e x A , e x A and e z A at the same time, necessarily a = 0 ⇔ sin θ 0 = 0 and so θ 0 = 0 or θ 0 = π. To know whichever is true we only need to check the value of the e i A • e i B for i ∈ {x, y, z}: if for all i, e i A • e i B = 1 then θ 0 = 0 and q 0 = [START_REF]C'est pas sorcier -France 3. C'est pas sorcier -Le Grand Palais épate la galerie[END_REF]0]. Else, we have θ 0 = π, c = 0 and s = 1 and we are left to find the vector u 0

(⋆) ⇔    2(u 0 • e xA )u 0 -e xA = e xB ... ⇔      2(u 0 • e xA )u 0 • u 0 =1 -e xA • u 0 = e xB • u 0 ... ⇔          (e xA -e xB ) • u 0 = 0 (e yA -e yB ) • u 0 = 0 (e zA -e zB ) • u 0 = 0
Let B be the matrix:

B =      (e xA -e xB ) T (e yA -e yB ) T (e zA -e zB ) T      Then (⋆) ⇔ Bu 0 = 0 ⇔    u 0 ∈ ker(B) ||u 0 || = 1 5.16
The basis of the nullspace of B can be calculated by performing a QR factorization of B T and taking the column of Q that is indexed by a null coefficient on the diagonal of R. Now that we have calculated q 0 we can focus on q ϵ .

Calculating q ϵ

Recall that we can always express the conjugation of qA (the dual quaternion representing point p A ) as a rotation by θ 0 around the axis u 0 followed by a translation t represented by the quaternion t = [0, t] such that t = 2q ϵ q * 0 : q qA q * = 1 + ϵ(q 0 q A q * 0 + t). The translation quaternion t is trivially given as t = q B -q 0 q A q * 0 , and q ϵ = 1 2 tq 0 . As such, s = sin θ0 2 and c = cos θ0 2 :

t = q B -q 0 q A q * 0 = [0, p B ] -[0, 2s 2 (u 0 • p A )u 0 + (c 2 -s 2 )p A + 2sc(u 0 × p A )] t = p B -(1 -cos θ 0 )(u 0 • p A )u 0 -cos θ 0 p A -sin θ 0 (u 0 × p A )
5.17

Finding the screw axis

Now that we have q = q 0 + ϵq ϵ we may want to find the screw axis, i.e. to rewrite q as q = cos θ 2 , û sin θ 2 where θ = θ 0 + ϵθ ϵ and û = u 0 + ϵu ϵ such as the screw axis is given by the Plücker coordinates [u 0 , u ϵ ] and the magnitude of the translation is θ ϵ .

We have proven earlier that with such notations one can write q ϵ as:

q ϵ = [- θ ϵ 2 s, u 0 θ ϵ 2 c + u ϵ s]
Where s = sin θ0 2 and c = cos θ0 2 . Also, q ϵ = 1 2 tq 0 . Assuming θ 0 / ∈ {0, π}:

q ϵ = 1 2 tq 0 = 1 2 [0, t][c, u 0 s] = 1 2 [-su 0 • t, ct + st × u 0 ]
By identification:

θ ϵ = u 0 • t
And:

u 0 θ ϵ + 2su ϵ = ct + st × u 0 2su ϵ = ct + st × u 0 -c(u 0 • t)u 0 = c ((u 0 • u 0 )t -(u 0 • t)u 0 ) + st × u 0 = cu 0 × (t × u 0 ) + st × u 0
And thus:

u ϵ = 1 2 cot θ 0 2 u 0 × (t × u 0 ) + t × u 0
If θ 0 = 0 then the vector u 0 can be defined as

u 0 = p B -p A ||p B -p A || and θ ϵ = ||p B -p A ||.
Since this case is about a pure translation the screw axis goes through point p A and u ϵ = p A × u 0 .

Finally if θ 0 = π, θ ϵ is still given as θ ϵ = u 0 • t and we know that the screw axis goes through point

p A +p B 2 . Hence u ϵ = p A +p B 2 × u 0 .
This section has shown, how given the same rigid body in two different positions and orientations, one finds the unit dual quaternion mapping one to the other, and as such the user can intuitively place and rotate pseudo-parts in their disassembled state and let the aforementioned algorithm find the unit dual quaternions mapping each pseudo-part in its assembled position to its counterpart in the disassembled state. We almost have everything ready to generate 3D assemblies, we only need to find the instantaneous direction of motion of a point obeying a unit dual quaternion q.

CONE OF INFINITESIMAL FREEDOM OF MOTION IN 3D

5.2.1 QUATERNIONS, DUAL QUATERNIONS AND TANGENTIAL VELOCITY

Tangential velocity and quaternions

We may be interested in the tangential velocity along the trajectory of a point p ∈ R 3 subjected to a rotation through a quaternion (not a dual one) q = cos θ 2 , u sin θ 2 . Indeed, the tangential velocity is what we called the instantaneous direction of motion in CHAPTER 4. Such trajectory, in R 3 , is an circular arc bounded by p and the vector part of p r = qpq * (p = [0, p]; p r = [0, p r ]), centered in 0 and in the plane of normal u. Any point on this arc can be parametrised by a given λ ∈ [0, 1] such that p(λ) = q(λ)pq * (λ) with q(λ) = cos λθ 2 , u sin λθ 2 . Since q(0) = [1, 0] and q(1) = q, one has that p(0) = p and p(1) = p r . Thus, the mapping

p : [0, 1] -→ H λ → p(λ)
is a bijection between the unit segment and the arc of a circle mentioned above (embedded in H).

The tangential velocity at a point p(λ) is therefore the vector part of ∂qpq * ∂λ (λ). Introducing λ in EQUATiON (D.4) reads:

p(λ) = q(λ)p(0)q * (λ) = [0, (1 -cos(λθ))(u • p)u + cos(λθ)p + sin(λθ)(u × p)]
A simple derivation gives that the tangential velocity v(λ) ∈ R 3 is:

v(λ) = θ (sin(λθ)((u • p)u -p) + cos(λθ)(u × p)) 5.18
In particular, the initial velocity, also called the instantaneous direction of motion of p with respect to q, is given by:

v(0) = θ(u × p)

Tangential velocity and dual quaternions

The same study can be done with dual quaternions. In a similar fashion as in SECTiON 5.2.1.1, let us introduce a parameter λ such that q = cos λ θ 2 , û sin λ θ 2 . EQUATiON (5.14) then reads

q pq • = 1 + ϵ(q 0 (λ)(p -[0, u 0 × u ϵ ])q * 0 (λ) + [0, λθ ϵ u 0 + u 0 × u ϵ ]
And the tangential velocity becomes:

v(λ) = θ 0 (sin(λθ 0 ) ((u 0 • p)u 0 -p + u 0 × u ϵ ) + cos(λθ 0 ) (u 0 × p + u ϵ ) +) + θ ϵ u 0
In particular, the initial velocity, or instantaneous direction of motion of p with respect to q is given by:

v(0) = m(p, q) = θ 0 (u 0 × p + u ϵ ) + θ ϵ u 0
When the unit dual quaternion is not ambiguous, we will abbreviate m(p, q) as m p . FiGURE 5.6 shows the instantaneous directions of motions (blue vectors) of regularly spaced points on a plane for various q (with constant u 0 and u ϵ and varying θ 0 = cos θ and θ ϵ = sin θ): the red line shows the screw axis, and the red curve is the trajectory of the highlighted red point for an extended motion encoded in q. On the left a pure translation is obtained for θ = ± π 2 , in the middle a pure rotation is obtained for θ = kπ, k ∈ Z and on the right a screw motion is given for θ = 0.5.

THEORETICAL RESULTS

This section aims at finding the set of unit dual quaternions that can be obeyed by a given separating surface.

By definition a surface Σ (be it smooth or discrete) obeys a motion q if and only if each of its constitutive points obey q:

Σ obeys q ⇐⇒ ∀v ∈ Σ, n v • m v ≥ 0
where v is a point of the surface, n v the normal vector at that point and m v the instantaneous direction of motion of v with respect to q that is defined just above, see FiGURE 5.7 for an illustration. Notations:

Let M = (V, E, F ) a discrete surface represented by a triangular mesh: V is its set of vertices, E of edges and F of faces. For a face f ∈ F let V (f ) = {v i , v j , v k } refers to its vertices in a counterclockwise order;

let n f be the normal of face f .

In this section we prove the following equivalence:

M obeys q ⇐⇒ ∀f ∈ F ∀v ∈ V (f ) m v • n f ≥ 0
which implies that to check whether a triangular mesh obeys a motion q, it suffices to check for the mesh vertices.

149

3-D assemblies

Proof.

■

Proof of the implication =⇒ :

If M obeys q, then by definition all points v on the surface (vertices or not) are such that

n v • m v ≥ 0.
It is true in particular for the vertices of the mesh which is proof of the implication =⇒ .

■

Proof of the implication ⇐= :

Assume that ∀f ∈ F ∀v ∈ V (f ) m v • n f ≥ 0. Let us show that M obeys q.
Let f ∈ F be a face, and v i , v j and v k its defining vertices. Let v ∈ f be any point in the triangle. As f is a triangle,

∃(λ i , λ j , λ k ) ∈ [0, 1] 3 with λ i + λ j + λ k = 1 such that v = λ i v i + λ j v j + λ k v k
And

m v = θ 0 (u 0 × v) + θ 0 u ϵ + θ ϵ u 0 = θ 0 (u 0 (λ i v i + λ j v j + λ k v k )) + (λ i + λ j + λ k ) =1 (θ 0 θ 0 u ϵ + θ ϵ u 0 ) = λ i (θ 0 (u 0 × v i ) + θ 0 u ϵ + θ ϵ u 0 ) + λ j (θ 0 (u 0 × v j ) + θ 0 u ϵ + θ ϵ u 0 ) + λ k (θ 0 (u 0 × v k ) + θ 0 u ϵ + θ ϵ u 0 ) = λ i m vi + λ j m vj + λ k m v k
Therefore:

m v • n f = λ i ≥0 m vi • n f ≥0 + λ j ≥0 m vj • n f ≥0 + λ k ≥0 m v k • n f ≥0 ≥ 0 which shows that v obeys q.
This being true ∀v ∈ f and ∀f ∈ F we have successfully shown the implication ⇐= , which ends the proof.

COMPUTATION OF THE CONE OF FREEDOM

Let m be the function mapping a point and a unit dual quaternion to the instantaneous direction of motion of that point when moved using that dual quaternion:

m : R 3 × U (DH) -→ R 3 (p, q) → θ 0 (u 0 × p) + θ 0 u ϵ + θ ϵ u 0 Let M = (V, E, F ) be a triangular mesh embedded in R 3 . For a face f ∈ F let the set V (f ) denote
the three vertices in V defining the face f and n f be a unit normal vector of that face (consistently defined across all faces in F ).

Let ĈM be the set of unit dual quaternions such that M may obey the motion encoded by each q ∈ ĈM :

ĈM = {q ∈ U (DH), ∀f ∈ F ∀v ∈ V (f ) m(v, q) • n f ≥ 0}
The aim of this section is to find ĈM .

Let f ∈ F of normal vector n f , v ∈ V (f ) and q ∈ U (DH). Then m(v, q) = θ 0 (u 0 × v) + θ 0 u ϵ + θ ϵ u 0 . This vector can be rewritten as

m(v, q) = Ω × v + t with    Ω = θ 0 u 0 t = θ 0 u ϵ + θ ϵ u 0
and we recognise in this expression the usual expression of the tangential velocity of a rigid body. Thus

q ∈ ĈM =⇒ m(v, q) • n f ≥ 0 ⇔ (Ω × v + t) • n f ≥ 0 ⇔ (v × n f ) • Ω + n f • t ≥ 0 ⇔ r T x ≥ 0 With r =   n f v × n f   ∈ R 6 x =   t Ω   ∈ R 6
And thus q ∈ ĈM if and only if this latest inequality is true for each vertex of each face of M:

q ∈ ĈM ⇔ A M x ≥ 0 5.19
where

A M =                n f1 v 1 f1 × n f1 n f1 v 2 f1 × n f1 n f1 v 3 f1 × n f1 n f2 v 1 f2 × n f2 . . . . . . n f |F | v 3 f |F | × n f |F |                ∈ R 3|F |×6
and for i ∈ 1, |F | , f i denotes the i th face of mesh M, and for j ∈ {1, 2, 3}, v j fi denotes the j th vertex of V (f i ).

EQUATiON (5.19) defines a 6-dimensional cone whose tip is on 0: if x satisfies EQUATiON (5.19) then λx, λ ≥ 0, does too. To find a conical section of this cone let us assume that we have a solution x satisfying EQUATiON (5.19). A conical section is given by intersecting the plane of normal x, centered in x, with the cone.

In practice, to find such a section, we find the vertices of the 6D polytope defined by:

  A M -xT   x ≥   0 -|| x|| 2   5.20
where the last inequality models (x -x) • x ≤ 0, i.e. x should be in the half plane of normal x containing 0.

SYSTEM (5.20) is solved numerically to enumerate the vertices of the polyhedron using the python package pypoman. A cartoon illustration in R 3 of this process is given on FiGURE 5.8. By construction, the list of the 6D vertices of the polytope contains the vertex 0. Let {0, x 1 , ..., x k } denotes these vertices. The x i , i ∈ 1, k , are on the plane of normal x containing this point, i.e (x i -x)• x = 0.

As such, a conical section of the cone is given by the convex set of {x 1 , ...,

x k }. Now let x =   t Ω   be a point in such section: ∃(α i ) i∈ 1,k ≥ 0, k i=1 α i = 1, x = k i=1 α i x i .
To retrieve the unit dual quaternion q ∈ U (DH) encoding the same motion as the one encoded in x, let us introduce the function

f : R 6 -→ U (DH) x =   t Ω   → q = cos θ 2 , û sin θ 2 with    θ = θ 0 + ϵθ ϵ û = u 0 + ϵu ϵ and                θ 0 = ||Ω|| u 0 = Ω ||Ω|| θ ϵ = t • u 0 u ϵ = 1 θ0 (t -θ ϵ u 0 )
We can now justify that the convex set of {x 1 , ..., x k } encodes all the motions that may be obeyed by M. Indeed, suppose x to be a convex combination of the (x i ) 1≤i≤k . Then, as said above, for any λ ≥ 0, M obeys the motion encoded by λx. However one notices that for any point

p ∈ R 3 , m(p, f (λx)) = λm(p, f (x)),
that is to say that the initial velocity of point p subjected to the motion λx is scaled by a factor λ compared to the motion encoded in x, but its orientation does not change. Since we are only considering infinitesimal motions, the norm of the tangential velocity is of no importance, we only care for its direction. From that point of view, the motions encoded by x and λx are the same. For that reason we may scale in sync the values of θ 0 and θ ϵ and suppose them to be on the unit circle:

θ 0 ← θ0 √ θ 2 0 +θ 2 ϵ and θ ϵ ← θϵ √ θ 2 0 +θ 2 ϵ
. As such, we may introduce a parameter θ:

∃θ ∈ S 1 ,    θ 0 = cos θ θ ϵ = sin θ
which reduces the number of parameter.

We can finally conclude: EQUATiON (5.21) tells us that given the generating rays x i of the cone solution to SYSTEM (5.20), a solution x is obtained by convex combination of the x i . This solution is mapped, through function f , to a unit dual quaternion q = f (x) which can be obeyed by the mesh M. The cone of freedom ĈM of mesh M is the set of all such unit dual quaternions, images by f of all possible convex combinations of the generating rays of the cone encoded in SYSTEM (5.20).

ĈM =                q ∈ U (DH),                q = f (x) x = k i=1 α i x i k i=1 α i = 1 α i ≥ 0, ∀i ∈ 1, k                5.21

NDBG

As understood in SECTiON 3.1.3, the NDBG of an assembly is based on the strong-connectedness of several base DBGs. The principle to compute a DBG in 3D is the same as in 2D: for a given unit dual quaternion q and an assembly A, initialise an empty graph G(q, A) and loop over each pair of parts in contact. Given two polyhedral parts in contact P i and P j , represented by closed triangular meshes, denote by F the set of faces shared by both parts, and for f ∈ F, let n f be the normal of face f pointing from P j to P i . For each

f = {v i , v j , v k } ∈ F and for each v ∈ f there are two possibilities: ■ Either m v • n f ≥ 0, in
which case P j is blocked by P i because of this vertex but P i is locally free to move: add edge e j→i in the graph.

■

Or m v • n f ≤ 0 , in which case P i is blocked by P j because of this vertex but P j is locally free to move:

add edge e i→j in the graph. This process is illustrated on FiGURE 5.9: a 2-parts assembly A = {P 0 , P 1 } is studied, with P 0 the lower part and P 1 the upper one. Two faces f A and f B are highlighted in red and blue respectively. Assume that we build a DBG G(q, A) such that the instantaneous direction of motion of a vertex v adjacent to both faces is m(v, q) such as shown in green on the figure. The directions of the vectors n f A , n f B , m(v, q) are exemplified on the sphere. One sees that m(v, q)•n f A ≤ 0 and m(v, q)•n f B ≥ 0 as m(v, q) belongs to the blue hemisphere oriented by n f B but not the red one oriented by n f A . As such face f A prevents the upper part P 1 from obeying q, hence the edge e 1→0 is added to the DBG G(q, A). Conversely, face f B prevents the lower part P 0 from obeying q and the edge e 0→1 is added to G(q, A). Once the input mesh is provided, the vertices are moved according to the following algorithm. The signed distance d between each vertex and the separating plane is divided by a factor n ∈ N * ; Each vertex v is moved back onto the plane and its instantaneous direction of motion m v is calculated. The vertex is then moved in the direction of m v by a distance d n . This iteration is repeated n times until each vertex has moved by a distance d. On FiGURE 5.11, the original position of the mesh vertices are shown in blue, along the black line. The mesh and the motions are projected on the plane orthogonal to u 0 , the direction of the screw axis, the latter being represented by the red point. By random motion or vertex painting, the mesh vertices were moved horizontally up to the positions in large grey dots; the signed distances d are figured by the dotted straight lines. The original vertices are then iteratively moved by d n in the direction m v (here n = 4), and at each new position, represented with small grey dots, the process is repeated. While it does not necessarily help to achieve a faster convergence with the GPA for a randomly deformed mesh (it does not necessarily hurt either), it does better condition the mesh for a more regular vertex painted one. FiGURE 5.12 shows, for a given q, on the top row input meshes before the aforementioned conditioning, and below the same meshes after. The leftmost mesh is initialised with Perlin noise, the middle one with vertex painting, and the right one is a custom user-given mesh.

GUIDED PROJECTION ALGORITHM

Given a unit dual quaternion q used to condition a mesh M = (V, E, F ), the GPA optimisation (see SECTiON

■

To prevent too small details, the dihedral angle θ between two adjacent faces must be greater than a threshold θ lim .

■

The boundary edges of M must slide on the design domain faces.

■

As in 2D, a snap constraint must be implemented. Vector X is initialised with the necessary number of entries, the first 3|V | of them being the coordinates of each vertex v ∈ V .

Every face must obey q

We want to impose the constraint that ∀v ∈ V (f ) m v • n f ≥ 0. We need first to calculate the normal vector of the face n f .

Calculation of the normal vector

By definition, n f is orthogonal to face f , is of unit length and must be consistently defined across all faces, as to always be on the same side; this is implemented as n f is positively proportional to the non-unit normal

vector n ̸ =1 f = (v j -v i ) × (v k -v i ).
Calculation of the non-unit normal vector: Let o and f be the indices such that

X[o + 3f ], X[o + 3f + 1]
and X[o + 3f + 2] respectively map to n ̸ =1 f x , n ̸ =1 f y and n ̸ =1 f z , the coordinates of the vector n ̸ =1 f . By permuting the indices x, y, z and denoting (x p , y p , z p ) the coordinates of vertex v p ∈ {v i , v j , v k } one gets that:

   n ̸ =1 f x = 1 2 (y i (z j -z k ) + z i (y k -y i ) + y j (z k -z i ) + z j (y i -y k ) + y k (z i -z j ) + z k (y j -y i )) . . .
Let i be the index such that X[3i], X[3i + 1], X[3i + 2] map to the coordinates x i , y i and z i , indices j, k are similarly defined. For q ∈ 0, 1, 2 let:

H 3f +q =               0 0 0 1 0 -1 0 0 -1 0 1 0 0 -1 0 0 0 1 1 0 0 0 -1 0 0 1 0 -1 0 0 -1 0 1 0 0 0               ← 3i + ((1 + q) mod 3) ← 3i + ((2 + q) mod 3) ← 3j + ((1 + q) mod 3) ← 3j + ((2 + q) mod 3) ← 3k + ((1 + q) mod 3) ← 3k + ((2 + q) mod 3)    b 3f +q = -1 ← o + 3i + q c 3f +q = 0
One has

(v j -v i ) × (v k -v i ) -n ̸ =1 f = 0 ⇐⇒ ∀q ∈ {0, 1, 2} 1 2 X T H 3f +q X + b T 3f +q X + c 3f +q = 0
Calculation of a consistent normal vector: The normal n f must be positively collinear to

n ̸ =1 f : ∃α f > 0, n f = α f n ̸ =1 f . X is initialised with α f = 1 ||n ̸ =1 f || . Let ■ on, f be the indices such that X[on + 3f ], X[on + 3f + 1], X[on + 3f + 2] map to the coordinates n f x , n f y and n f z of n f . ■ o ̸ =1 be defined similarly for n ̸ =1 f .
■ oa be the index such that X[oa + f ] maps to α f .

H 3f +q =   0 1 1 0   ← o ̸ =1 + 3f + q ← oa + f b 3f +q = -1 ← on + 3i + q c 3f +q = 0
Where q ∈ {0, 1, 2}. One has

α f n ̸ =1 f -n f = 0 ⇐⇒ ∀q ∈ {0, 1, 2} 1 2 X T H 3f +q + X + b T 3f +q X + c 3f +q = 0 Constraint requiring n f to be of unit length: We implement ||n f || 2 -1 = 0. Let o, f be the indices such that X[o + 3f ], X[o + 3f + 1], X[o + 3f + 2] map to the coordinates n f x , n f y and n f z of n f . H f =      2 0 0 0 2 0 0 0 2      ← o + 3f ← o + 3f + 1 ← o + 3f + 2 b f = 0 c f = -1
One has

||n f || 2 -1 = 0 ⇐⇒ ∀q ∈ {0, 1, 2} 1 2 X T H 3f +q X + b T 3f +q X + c 3f +q = 0
Constraint requiring f to obey q For each vertex v ∈ {v i , v j , v k } of face f , indexed by v such that X[3v], X[3v + 1] and X[3v + 2] map to the coordinates of v, we require that m v • n f ≥ 0, which means that for some

η v , m v • n f -η 2 v = 0. Recall that m v = θ 0 (u 0 × p) + θ ϵ u 0 + θ 0 u ϵ . Let u 0x ,.
.., u ϵz refer to the coordinates of u 0 and u ϵ . Finally let oe be the index such that X[oe + v] maps to η v and on such that X[on + 3f ], X[on + 3f + 1], X[on + 3f + 2] map to the coordinates n f x , n f y and n f z of n f .

H v,f =                   0 0 0 0 θ 0 u 0z -θ 0 u 0y 0 0 0 0 -θ 0 u 0z 0 θ 0 u 0x 0 0 0 0 θ 0 u 0y -θ 0 u 0x 0 0 0 -θ 0 u 0z θ 0 u 0y 0 0 0 0 θ 0 u 0z 0 -θ 0 u 0x 0 0 0 0 -θ 0 u 0y θ 0 u 0x 0 0 0 0 0 0 0 0 0 0 0 -2                   ← 3v ← 3v + 1 ← 3v + 2 ← on + 3f ← on + 3f + 1 ← on + 3f + 2 ← oe + v b v,f =      θ 0 u ϵx + θ ϵ u 0x θ 0 u ϵy + θ ϵ u 0y θ 0 u ϵz + θ ϵ u 0z      ← on + 3f ← on + 3f + 1 ← on + 3f + 2 c v,f = 0
One has

m v • n f ≥ 0 ⇐⇒ 1 2 X T H v,f X + b T v,f X + c v,f = 0 5.4.2.2
To prevent too small details, the dihedral angle θ between two adjacent faces must be greater than a threshold θ lim

We make use here of the fact that the normal vector n f of a face f ∈ F is of unit length: ||n f || = 1. We require that for two adjacent faces indexed by p, q of normal n p , n q :

n p • n q + cos θ lim -ζ 2 p,q = 0
for some ζ p,q ∈ R. Let o be the index such that X[o + 3p], . . . , X[o + 3q + 2] map to n px , . . . , n qz , and opq such that X[opq] maps to ζ p,q . Thus:

H p,q =                  
0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0

0 0 0 0 0 0 -2                   ← o + 3p ← o + 3p + 1 ← o + 3p + 2 ← o + 3q ← o + 3q + 1 ← o + 3q + 2 ← opq b p,q = 0 c p,q = cos(θ lim )
One has

n p • n q + cos θ lim ≥ 0 ⇐⇒ 1 2 X T H p,q X + b T p,q X + c p,q = 0
All the above constraints are topological: to express them, we only need adjacency information between faces and vertices, not their actual location in space.

5.4.2.3

The boundary edges of M must slide on the design domain faces.

Let v be a boundary vertex and let p be a vertex of the face of the design domain the closest to v. Let n j be the unit normal vector of face j. We require that n j • (v -p) = 0, as illustrated on the inset. To prevent the algorithm from optimising towards v = p, point p is dynamically chosen among the vertices of face j so that it is not the closest to vertex v. This is a geometrical constraint as we need the location of v in space to select face j as well as point p. Let v be the index such that X[3v], X[3v + 1] and X[3v + 2] map to the coordinates of vertex v, and denote by n jx , n jy and n jz the coordinates of normal n j .

H v = 0 b v =      n jx n jy n jz      ← 3v ← 3v + 1 ← 3v + 2 c v = -p • n j
One has

n j • (v -p) = 0 ⇐⇒ 1 2 X T H v X + b T v X + c v = 0

Snap constraint

A face f adjacent to a vertex v snaps (we will refer to f as a snap face but also to v as a snap vertex) if and only if, when obeying q for an infinitesimal motion, v slides on the plane defined by f :

m v • n f = 0
We will discuss in SECTiON 5.4.3 the manner in which f and v are chosen. To compute the constraint (

H v,f , b v,f , c v,f ),
please refer to the detail of "Constraint requiring f to obey q" and replace

H v,f [oe + v, oe + v] = -2 by H v,f [oe + v, oe + v] = 0.

Other constraints

Several other constraints may be implemented, but are not described in this manuscript as they are not the most important ones, and anyway can easily be derived once one has understood the logic of the expression of constraints in the GPA. We can think of constraining the boundary vertices to follow a goal curve, drawn on the design domain mesh; ensuring that the area of each face is greater than some threshold (to avoid small triangles); or, as done in the version at the time of this writing, implementing circle packing ( [START_REF] Schiftner | Packing Circles and Spheres on Surfaces[END_REF]) to well-condition the mesh.

CHOOSING WHERE TO SNAP

Preliminaries

This section explains where the so-called snap face-vertex pairs must be chosen. We saw in 2D that to reduce the close of translational freedom C t to the user prescribed cone, exactly 2 snaps segments were required pole of the sphere as, in general, the actual cone of freedom is strictly larger. On FiGURE 5.15 the tenon-like feature is made of four non-horizontal faces. Three of them, in red, have snapped as they are vertical, while the last one, in blue, has not. On the right, the boundaries of the hemispheres defined by each face are of the same colour as their corresponding face. The cone of translational freedom is highlighted in red: it is not reduced to the prescribed north pole. For the actual cone to be reduced to the north pole, the third snap Before splitting the design domain into two parts, we must be able to tell unequivocally which vertex of the design domain belongs to which part. This is done by stating on which side of the separating mesh a vertex of the design domain is. To that end, we ensure that the separating surface is tightly connected to the design domain: even if all boundary vertices of the separating mesh are constrained to slide on the faces of the design domain, there may still be holes in the vicinity of a design domain edge. Triangle faces (obeying q) are created until the mesh tightly hangs to the design domain, see FiGURE 5.18 where the optimised separating surface after the GPA is shown on the left the newly created faces are highlighted in red on the right.

         n f A • x t = 0 n f B • x t = 0 n f C • x t = 0

Splitting a mesh given a polyline

Now that the mesh tightly hangs to the edges of the design domain, we wish to split the design domain into two parts. The only thing we need from the separating surface is the boundary polyline drawn on the faces of the design domain. Thus the question we answer in this section is "How to split a mesh along a given polyline into two sub-meshes?" This is a general question and we answer it in the general case, temporarily forgetting the assembly context. An illustration of the problem is given on FiGURE 5.19: we want to split the cube mesh into two sub-meshes along the rather complex red polyline. is given by

w(p) = 1 2π k i=1 θ i θ i = atan2((p i -p) × (p i+1 -p), (p i -p) • (p i+1 -p))
Jacobson and coauthors observed in [START_REF] Jacobson | Robust Inside-Outside Segmentation Using Generalized Winding Numbers[END_REF] that even if the curve is not closed, this calculation is robust enough to state whether p is on one side of the curve or the other. In the case of an open curve then w(p) ∈ R; the greater in absolute value, the more confident we can be that p is on a given side. We propose to use such a generalized winding number to categorise the vertices of the mesh according to on which side of the splitting curve they are deemed to be. A Delaunay triangulation then create the sub-mesh between the vertices on each side and the polyline. Since the generalized winding number is only defined in the XY plane, we proceed as follows:

■

The triangular faces of the mesh are grouped by coplanarity and adjacency.

■

Each group of faces is rotated, along with the splitting polyline vertices on them, to the XY plane. A quaternion q can typically be used, see FiGURE 5.20 step a. Step-by-step process to split a mesh along a polyline.

Creating the parts

Given the two open sub-meshes obtained at the end of the previous section, the separating mesh is duplicated, and the copies are joined to each mesh, making the parts P 0 and P 1 complete, with P 1 obeying q; see FiGURE 5.21 for an illustration.

ON THE CREATION OF THE FOLLOWING PARTS

The principle is the same as in 2D, see SECTiON 4.1.3. Concretely the user specifies in advance the ordered list of unit dual quaternions that each part must obey, as well as the first separating mesh that must be optimised to create P 1 . Then, at the end of each iteration, the remaining part P 0 (in blue on FiGURE 5.21) is considered as the next design domain to be partitioned into two, and the user is asked to provide a custom or vertex painted mesh to create the next part (an automatically generated random mesh may also be used).

The algorithm creates the next part and the process repeats until the completion of the assembly. At each iteration, the NDBG is calculated and must say that the assembly is interlocking. FiGURE 5.22 shows a 4+1

parts assembly in the assembled state, as well as each of the five parts. FiGURE 5.23 shows the standard disassembly sequence (P 1 then,..., then P 4 ), as well as the NDBG stating that the assembly is interlocked.

ISSUES WITH THE CURRENT COMPUTER IMPLEMENTATION

In practice, when generating part P i , i > 1, the design domain is often highly irregular: it comes indeed from the part P 0 at the previous iteration whose boundary is itself a triangular mesh optimised to obey a motion, and as such not smooth. It is thus quite difficult for the algorithm to tightly hang the separating mesh to the design domain: it often happens that a face is outside the design domain, or that a boundary edge is not contained in a design domain face (even though its end vertices are sliding on the design domain faces). We cannot skip this step and let the separating mesh loose, as it is necessary for it to tightly hang to the design domain to calculate the generalised winding number of the design domain vertices. If we try to do so, we are sure that the parts will be ill-constructed. Several code routines were implemented to clean and hang properly the separating mesh, but after seeing that despite weeks of effort there were always problems, we decided to let the user manually clean the mesh at the end of each iteration. Thus, at the time of this writing, generating a 3D assembly is a cumbersome and fastidious task. Most of the work is done by the computer, but the user often has to spend a dozen of minutes per separating mesh. For future work, we advise using a professional mesh handler (or to let the coding to someone with better skills than I!). We saw in SECTiON 4.3.2 that for 2D rotation the more snap segments, the thinner the cone of freedom.

Indeed, the more snap segments, the more constraints meet at the prescribed rotation centre x r , and the less likely is any other point to belong to the cone of freedom. This line of reasoning holds in 3D: the more snap face-vertex pairs, the less likely any unit dual quaternion distinct from the prescribed q is to be obeyed by the separating mesh. To exemplify the shrinking of the cone of freedom with the number of snaps, we calculated the generating rays of the cones of freedom for various separating meshes with the increasing number of snap face-vertex pairs. Four categories of meshes were used: random ones (generated using Perlin noise), and vertex-painted ones, with one, two or four dents, as shown on FiGURE 5.24. They were prescribed to obey either a pure translation (left of FiGURE 5.24) or a screw motion along a horizontal or a vertical axis (middle and right respectively). In total, we used 31 pairs of mesh-motion. Each couple mesh-motion was then optimised 10 times with an increasing number of prescribed snap face-vertex pairs, from 0 to 9. The generating rays of the cones of freedom of each of these 310 optimised designs are calculated and projected onto S 5 the unit hypersphere in R 6 . While in 2D we could calculate exactly the area and perimeter of the cones of freedom because we were working in R 2 (or equivalently on S 2 ), in 3D

it is much more difficult to calculate the (hyper)volume of the cone on S 5 . We choose thus to approximate this measure by calculating the volume of the convex hull formed by the unit generating rays. The evolution of the volume and area of the cones, as well as the number of unit generating rays, is shown on FiGURE 5.25 (bottom to top respectively). It clearly shows that the cones of freedom shrink with the number of snap face-vertex pairs. It is also remarkable that the volume and area of the cone seem loosely proportional to the number of generating rays. Because we should calculate a DBG for each of such generating rays, it seems preferable to try to have a small cone of freedom to ease the assessment of the interlocking of the assembly. As a side note, the interested reader may look at FiGURE 5.26,which shows the projection of the unit generating rays of a cone on the 15 cartesian planes embedded in R 6 . It is important to understand what such a cone means: to any 6D-vector obtained by a convex combination of the generating rays corresponds a unit dual quaternion (see SECTiON 5.2.3) that can be obeyed by the mesh. For instance, FiGURE 5.27 shows the 5 unit dual quaternions (seen as 3D lines) corresponding to the five rays generating the cone of freedom for the given surface. Three are shown as blue lines, one is in red and the last is the bold green line. The redder, the greater the relative importance of the translation term θ ϵ compared with the rotation term θ 0 ; the bluer, the more important the rotation versus the translation. The bold green line is the prescribed unit dual quaternion (with a pure translation prescribed around it), also corresponds to one of the generating rays of the cone. The dashed black line is calculated from a random convex combination of the five generating rays: it corresponds to a screw motion with a relatively large translation component, as shown by the displaced red surface and the red helical trajectory.

ON FABRICATION IMPERFECTIONS AND MOTION TOLERANCE

As shown both mathematically and numerically in SECTiON 4.3.3 in the 2D case, the number of snap elements negatively affects the probability that the prescribed motion q is obeyed by an imperfect mesh M ϵ , even though the perfect mesh M does. By imperfect we mean a mesh M ϵ = (V ϵ , E, F ) whose vertices are not on their optimised location defined by M = (V, E, F ). In this section, we first introduce a new tool to model imperfections, namely Gaussian processes. We then numerically study the probability that an imperfect mesh M ϵ obeys a prescribed quaternion q, before performing a more robust optimisation of the mesh M so that an imperfect mesh M ϵ derived from it still has a high probability of obeying q.

Gaussian processes

In SECTiON 4.3.3, imperfections on the polyline were modelled using a centred Gaussian law with a diagonal covariance matrix: it means that each polyline point could move randomly in an isotropic manner and independently from the others. We justified that despite being quite crude, this model gave reasonable results on the probability that an imperfect polyline obeys a 2D motion. In 3D we could have chosen to model the imperfections on the mesh vertices similarly, but instead, we would like to introduce a new tool: Gaussian processes. It is more complex to use but can model a broader range of imperfections and this section could therefore be seen as a potential stepping stone to building a more refined model should the need arises in future work.

A Gaussian process is a stochastic process of variables following a Gaussian distribution, i.e. a dynamical system whose variables are randomly changing over time, each following a Gaussian distribution. The most simple example of a Gaussian process is to follow the altitude of a particle moving vertically by a random amount ∆y ∼ N (0, ∆t), between two successive times, steps t and t + ∆t; by construction, it is a Brownian motion. FiGURE 5.28 shows the evolution of the altitude y with respect to time t for five independent random variables. For each realisation (path), FiGURE 5.28 displays the altitude as a function of time: y = f (t). We can therefore interpret this stochastic process as a random distribution over the space of real-valued unidimensional functions. With this in mind, Gaussian processes are distributions over functions f defined over a continuous domain D ⊆ R such that:

f (x) ∼ GP(µ(x), κ(x, x ′ ))
with µ a mean function and κ the covariance function, x ∈ D and (x, x ′ ) referring to all (infinitely many) pairs of variables of the function domain. Shifting towards discrete settings, assume X = (x 1 , . . . , x n ) T ∈ D n be a vectors with a finite number of entries x i ∈ D. Let the mean vector µ = µ(X) = (µ(x 1 ), . . . , µ(x n )) T and the covariance matrix Σ = κ(X, X). The multivariate Gaussian distribution of the subset X is

f (X) ∼ N (µ, Σ)
The covariance function κ (also called kernel) models the correlation between every pair of random vari-ables x i and x j . The covariance function thus has a strong influence on the realisations of the distribution.

To be valid κ must be chosen such that Σ is definite-positive. A well-known covariance is the exponentiated quadratic kernel:

κ(x i , x j , a, σ) = a 2 exp - ||x i -x j || 2 2σ 2
stating that the closer x i and x j , the more correlated f (x i ) and f (x j ) are. As the distance between them increases, the correlation decreases exponentially, as exemplified in FiGURE 5.29. Once the kernel is defined, we choose a mean function µ and we can sample realisations of the Gaussian process, as shown in FiGURE 5.30. The interested reader is referred to APPENDiX E where more kernels are defined. Note that Gaussian processes can easily be adapted to provide the initial separating polyline of a 2D assemblies: the user has greater control over the shape of the polyline than the completely random Turtle by the means of judiciously choosing a kernel, but still enjoys the benefits of a fully automatic process (by opposition to manually inputting a polyline). The only downside is that while the Turtle is constrained to draw a polyline obeying the prescribed motion, a Gaussian process might output an initial polyline too far away from obeying the motion, resulting in slow or impossible convergence.

Imperfection and cone of freedom

We use a Gaussian process to model imperfections on the location of the vertices of the separating mesh:

we use the exponentiated quadratic kernel to correlate the imperfections across close vertices. We can tune parameter σ so that the area of highly correlated points matches the typical area of the imperfection of real assembly. For instance, in 3D printing by fused deposition modelling, imperfections arise from thermal expansion due to the addition of hot material at the printing head. An area of imperfection corresponds to the typical size of the region hotter than the room temperature. Also, the string of printing material may get entangled at the entrance of the heating zone of the printer. When that happens, one has to manually disentangle the string, which may make the printer head move relatively to the printing table, thus introducing imperfections on the remaining object.

We define the kernel for any pair of vertices v i , v j ∈ V of the separating mesh M = (V, E, F ):

κ(v i , v j , σ) = a 2 exp - d(v i , v j ) 2 2σ 2
Where d(v i , v j ) is (an approximation of) the geodesic distance between the two vertices on the mesh. Because calculating the exact geodesic distance is of little use given our motivation for this study (we simply want to numerically show that the prescribed unit dual quaternion q has little chance of being obeyed by an imperfect mesh) we use an approximation by computing the shortest path between vertices v i and v j on the graph G = (V, E) derived from the mesh M = (V, E, F ). Each edge in G is weighted by the euclidean length of the corresponding edge in M. Computing the shortest path between each pair of vertices is done by repeatedly executing the Dijkstra algorithm [24]. This distance is used to compute the covariance matrix Σ and then three independent samplings over the mesh vertices V are made, one for each canonical axis of R 3 : εx (V ), εy (V ), εz (V ) ∼ N (0, Σ)

Figure 5.31| From left to right: a mesh, the corresponding covariance matrix Σ, the heatmaps of the realisations εx(V ), εy(V ) and εz(V ) respectively. FiGURE 5.31 shows, for four meshes, the covariance matrix calculated using the approximate geodesic distance, as well as the heatmaps of the realisations εx (V ), εy (V ) and εz (V ), vertically projected onto the mesh. The colour code qualitatively indicates the value of the imperfection: blue means strong imperfection to the negative x, y or z directions, red means a strong imperfection in the positive directions and white means an imperfection of small magnitude. The values are correlated to each other depending on the distance between the vertices: we see blobs of imperfection.

To model the fact that in practice the imperfections are more likely to send a vertex away from the mesh rather than on it (for instance, when fabricating a horizontal planar surface, it is more likely to have an error on the altitude of the fabricating device rather than on the horizontal directions; at the limit case a constant error would be irrelevant in the horizontal directions but significant in the vertical one), we build the imperfections as follows.

Once calculated for each vertex v ∈ V (FiGURE 5.32a), the values εx (v) and εy (v) are scaled down by a factor 0 < α < 1, which effectively nudge the imperfection vector ε(v) = (αε x (v), αε y (v), εz (v)) T to get closer to e z , the vertical direction of R 3 (5.32b). For each vertex v of the mesh we define the vertex normal n v as the average of the normal vectors of its adjacent faces weighted by their area (5.32c), and we rotate the imperfection vector ε(v) using the quaternion q sending the normal vector n v to the vertical direction e z to get the final imperfection vector ϵ(v) (5.32d). Thus each imperfection vector is biased to move the corresponding vertex in the direction locally orthogonal to the mesh. The imperfect location of a vertex v is then calculated as v ϵ = v + ϵ(v), from which we get the set of imperfect vertices V ϵ and the imperfect mesh M ϵ = (V ϵ , E, F ). FiGURE 5.32e shows, for each vertex v, 50 independent v ϵ in red: we see that they are all biased to move in the direction locally orthogonal to the mesh. Each optimised mesh M (of the 310 solutions) is deformed 100 times using the aforementioned process to get a family of imperfect meshes M ϵ . The cone of freedom C M ϵ of each such imperfect mesh is calculated and we count the number of times the prescribed quaternion q belongs to the interior of the cone.

From that number we can calculate the sampled mean, which estimates the probability P (q ∈ C M ϵ ). FiG- URE 5.33 shows the evolution of these estimated probabilities with the number of face-vertex snap pairs. To be clear, in this figure there are 31 curves made of 10 points. Each of these points represents the estimated probability (sample mean) calculated with 100 imperfect designs. Superimposed in black is the graph of the function n → 1 2 n : we see that, as proven in SECTiON 4.3.3, the decrease of the likelihood of obedience follows a power law.

We can also study in more detail the cone of freedom of the imperfect meshes, C M ϵ . To that end, we calculated the number of generating rays, the (hyper) volume of the convex hull of the cone, as well as its area. FiGURE 5.34 is packed with information. The small figures on the top left displays the generating rays

Robustness to imperfection

To make the mesh M = (V, E, F ) more robust to imperfection we propose to optimise it, similarly to what we did in 2D. We aim to find a mesh M such that any imperfect mesh M ϵ derived from it has a high probability of obeying to q. As in 2D, we first increase the prescribed number of snap face-vertex pairs until the cone of freedom of the mesh is reduced to the prescribed motion: C M = {q}. Then, a second round of GPA optimisation is executed where the snap constraint is suppressed and, for some α > 0, we impose that

∀f ∈ F ∀v ∈ V (f ) m(v, q) • n f ≥ α 5.22
To confirm that this process does increase the robustness of M we calculated 100 imperfect mesh M ϵ and counted the number of times q ∈ C M ϵ , from which we can derive an estimated probability (sampled mean) P(q ∈ C M ϵ ), i.e. the probability that a mesh with imperfections M ϵ obeys the prescribed motion q.

The greater this probability, the more robust M. The mesh used is shown on FiGURE 5.32; it obeys a pure rotation. FiGURE 5.35 shows the evolution of the probability P(q ∈ C M ϵ ) with respect to increasing α (top left). It also shows the main data on the cones C M ϵ : the number of vertices (unit generating rays) defining it, as well as the (hyper)volume and (hyper)area of the convex hull of these vertices. The blue curve shows the mean value averaged on 100 imperfect meshes M ϵ , and the filled region shows the inter-quartile range 25%-75%: it means that the middle half of the observed values lie in that range.

Unsurprisingly, the greater α (geometrically, the farther away are pushed the hyper-planes constraints from q), the more likely an imperfect mesh M ϵ is to obey q: the more robust the assembly to the prescribed motion and the more room the operator has when (dis)assembling the parts. The downside is that the greater α the more voluminous the cone, and thus the more motions can be obeyed by the mesh, making the assembly less robust to parasitic motions: it may become too easy to disassemble for any practical use. Moreover the top right plot of FiGURE 5.35 shows that the greater α the more rays define the cone. This is problematic as to assess the interlocking of the assembly a DBG must be calculated for each ray. If the cones of different parts intersect between them, the number of DBG quickly explodes. To prevent that from happening, we observe that if the cones associated with two distinct parts do not intersect, then the DBGs associated with the vertices of a given cone are all constant, by exploiting the regularity property of the DBG over a cell. Thus it is in our interest to reduce the extent of the cones to prevent any intersection and to reduce the complexity of the assessment of the interlocking.

We understand here that we are caught in a crossfire: on the one hand, increasing the size of the cone by the mean of α increases the probability of obedience of an imperfect mesh P(q ∈ C M ϵ ). On the other, too large cones are likely to intersect, making the calculation of the NDBG much more complicated.

This conundrum leads to an interesting optimisation problem: we can leverage the monotonicity of the evolution of the cone size (number of vertices (generating rays), volume and area of its convex hull) with respect to α to minimise the value of α still leading to a high probability of obedience:

min α s.t. P(q ∈ C M ϵ ) ≥ p min
For some threshold p min (typically p min = 0.99). Hence, one gets the optimal value α * leading to the smallest possible cone C M ϵ (by monotonicity of the cone size with respect to α) having a sufficiently high probability of containing the prescribed motion encoded in q. On FiGURE 5.35 this value is eyeballed to be α * 0.048. We insist on the fact that α * is motion and geometry-dependent: for another mesh and/or another prescribed q it would have been different. For α ∈ [0.04, 0.05] the top left figure shows the probability that an imperfect mesh M ϵ obeys the prescribed q: it goes from ≃ 0 to 1. Top right: the greater α, the more rays generates the cones of freedom CMϵ . Bottom left and right respectively show that the area and volume of the 6D convex hull of the generating rays increase with α: the greater α the wider the cones.

CONCLUSION

After a rather in-depth introduction to dual quaternions in SECTiON 5.1, this chapter explains how we can use the tools and concepts introduced in CHAPTER 4 to automatically generate 3D polyhedral sequential assemblies. Several weaknesses of our work in 2D are listed in SECTiON 4.6 and still apply in the 3D case, and will not be recalled here.

As understood in SECTiON 5.1 unit dual quaternions are the perfect mathematical objects to encode rigid body motions. The trajectory of a point p ∈ R 3 transformed by a unit dual quaternion q ∈ U (DH) is helical, and we can easily calculate its initial velocity, the so-called instantaneous direction of motion m(p, q) ∈ R 3 .

From there we proved the rather elegant result, that for a triangular mesh M = (V, E, F ):

M obeys q ⇐⇒ ∀f ∈ F ∀v ∈ V (f ) m v • n f ≥ 0
Armed with m(p, q) we easily adapted, in SECTiON 5.4 the Guided Projection Algorithm to optimise a mesh so that it obeys a motion prescribed by the user. Special attention was given to the snap constraint: we understood that at least three snap face-vertex pairs must be prescribed if one hopes to reduce the cone of freedom of the mesh to the prescribed motion C M = {q}. A careful analysis of the Gauss map G(M)

was carried out to judiciously choose the snap face-vertex pairs, so as to decrease as much as possible the extent of the cone of freedom C M : the normal vectors of the snap faces must be evenly distributed around the sphere.

Stepping away from these mathematical considerations, the rest of the section focuses on details of the actual computer implementation. While the numerical optimisation of the mesh is fast and yields good results, we find that, far from being a trivial task, handling and hanging irregular coarse meshes to one another to create parts still necessitates a human touch, much to our chagrin. At the end of this PhD, it is still a tedious task to generate 3D assemblies. SECTiON 5.6 investigates the relationship between the number of snap face-vertex pairs and the cone of freedom. Much like in 2D (see SECTiON 4.3), the greater the number of snaps the smaller the cone. Imperfections are modelled using Gaussian processes, where the kernel correlating the noise between the vertices takes into account the geodesic distances between them. By tuning the parameter σ we can change the size of the patches of highly correlated noise values, thus opening the way for the modelling of a broad range of imperfections. We saw that statistically, the more snap face-vertex pairs, the less likely an imperfect mesh is to obey the prescribed q, which led us to robustly optimise the mesh to increase this probability by opening the cone of freedom, at the cost of making the assembly less robust to parasitic motions and potentially making the calculation of the NDBG much more complicated if two cones intersect.

CHAPTER 6

CONCLUSION AND PERSPECTIVES

The unveiling climate catastrophe and the rarefaction and disappearance of the resources modern societies are built upon urge the engineer to find solutions to soften the coming blow. In that spirit, demountable edifices undoubtedly constitute an arrow in the quiver of the builder to erect sustainable cities. But as understood by Mam [58], the designer should be careful of the amount of metal used in an assembly. From a historical perspective, integral reversible joints, even if they increase the overall volume of material, are found to be a sustainable alternative to permanent fasteners which explains the interest of national and international initiatives such as DiXite in that line of research. While we can certainly leverage centuries of human trial and error to design sophisticated reversible joints, numerical technologies allow us to quickly explore the space of possible joints, and digital manufacturing holds the promise of being able to fabricate novel assemblies with strange geometrical features that are potentially even more relevant than traditional ones.

This dissertation aimed at bringing a humble stone to this edifice by explaining the tools and algorithms that were developed to fully explore the space of interlocking assemblies.

We believe our main contributions to this field of research to be:

■ Nor catalogue nor voxel-based: our method fully explores the space of polygonal/polyhedral assemblies while requiring very few human inputs, namely an ordered list of disassembling motions.

■

To our knowledge, we are the first to generate 2D assemblies obeying rotations which opens the gate to generate a much broader range of assemblies than before. Similarly, we think to be the first able to generate 3D assemblies obeying generalised motions.

■

While robust optimisation is a standard procedure in many scientific fields, we have not found in the literature the robust optimisation of integral-joints Conclusion and perspectives assemblies. Our work here on opening the cone of freedom should be of great help in the field of robotic assemblies.

6.1 RESULTS AND CONTRIBUTIONS to the vertices of the cones of translational and rotational freedom, C t , C ccw r , C cw r , which can easily be found by solving a linear system. If all base DBGs but one are strongly connected then the assembly is interlocked, and the DBG not strongly connected indicates which part is the key and along which motion the assembly can be disassembled.

2D ASSEMBLIES

Armed with our knowledge of the NDBG we decided to adopt a subtractive approach to generate multi-parts assembly: the successive parts are nested in one another by creating the next part P i+1 in the remaining part P 0 at the end of the previous design step. At the end of each iteration, the NDBG is calculated to ensure that the current, unfinished, assembly is interlocked, which leaves the computer free to find whichever set of parts block the motion of P i+1 .

Two generative algorithms were presented.

At first, we introduced a novel method to generate 2D sequential interlocking assemblies obeying translation, rotation, or a combination of both motions. It involves an obeying agent that we called Turtle and an instruction-giver Markov process. The Markov process randomly switches between states and for each of such states, the Turtle is tasked to walk by a random magnitude or to rotate by randomly sampling a carefully calculated angular interval, thus drawing a random separating polyline to partition the design domain with. One of the main hypothe-Conclusion and perspectives ses of our work is the fact that the parts are polygonal, i.e. the separating curve between two parts is a polyline. Yet, as we derive the mathematical formula governing a valid assembly, one notices that these equations could readily be used to explore a broader solution space and design non-polygonal assemblies, for instance using NURBS instead of polylines to create the separating curves. A key feature of our work is the surjectivity of the mapping to the solution space. This ensures that, given enough trials and computation time, any polyline can be generated and thus that we sample homogeneously the full space of polygonal assemblies. Due to the central place we gave to randomness our approach yields surprising and novel assemblies, in particular assemblies obeying rotations, which, to our knowledge, that has not been made before. Yet, we found that the mathematical formulae driving the Turtle did not always have a solution, a major impediment to this method.

As a consequence we decided to use a less intuitive but more robust optimisation method, the Guided Projection Algorithm, GPA, to optimise a polyline so that it partitions the design domain into two parts. The Turtle approach is not entirely discarded as a simplified version instantiates the initial solution of the algorithm. The GPA proves to be a powerful and versatile tool in which the user can easily enough add constraints to guide the final solution, thus letting them choose the amount of freedom they want to have on the generated design. At this step, the reader may have thought that the generated assemblies had strange geometrical features making manufacturing cumbersome with no proof or explanation on why they should be preferred to simpler and more traditional assemblies. SECTiON 4.2 justify the relevance of this work by assessing the mechanical properties of the generated assemblies. Mechanical analyses are performed through a custom numerical model. The agreement between the forces calculated by our model and the displacement observed by image correlation on physical assemblies reinforces our view that our model accurately describes the stresses and strains happening in the structure. Systematic comparisons of the stresses calculated in the parts of generated assemblies and of those of a reference assembly consistently showed that a simple random sampling of the design space yields a good number of designs strictly dominating the reference, much to our surprise. This finding hints at the potential of our approach for real-life assemblies. Yet, we insist on the fact that the mechanical analysis of the generated assemblies was not the primary goal of this study and we leave to future work the confirmation of this study, e.g. by comparing the behaviours of physically built assemblies.

What we deem to be the most relevant work in this doctoral thesis has to do with the robust optimisation of assemblies with regard to fabrication imperfections and/or imprecision on the location of the operator tasked with (dis)assembling. We found that a simple two-step GPA optimisation, with and without the snap constraint ac-tivated, let the user indirectly choose the size of the cones of rotational freedom of the part (the translation case being immediate to deal with). In turn, this opens the way to toleranced assembly, a major subject in robotic assembly.

We also made a quick, and crude, enquiry on the side of finite motions to find the set of possible centres of rotation to place the (dis)assembling operator.

This chapter finishes with a more mathematical touch, as the theory behind the elastic deformation of planar open curves is presented for us to be able to smoothly interpolate between two generated designs. We found that interpolated designs mechanically behave similarly to each other making it easy to find many assemblies dominating a reference one.

3D ASSEMBLIES

In our opinion, the main interest of CHAPTER 5 lies in the small but hopefully thorough introduction to unit dual quaternions. They are little-known mathematical objects that are particularly fit for encoding rigid body motions in 3D space. In this dissertation, the tangential velocity of the trajectory of a vertex moved by a unit dual quaternion was used as the instantaneous direction of motion in the optimisation of a triangular mesh. The rest of the chapter simply scales the tools used to generate 2D assembly to the 3D cases.

PERSPECTIVES

Several issues have been listed throughout this manuscript and should be addressed by future research to strengthen this work. The most straightforward to deal with relates to the fact that the NDBG outputs a binary answer: either an assembly is interlocked or it is not. An implicit assumption in the calculation of the base DBGs is that the coefficient of friction is infinitely high. Yet, for physically built assemblies we can feel that friction plays an important role, making assemblies theoretically interlocked disassemblable in practice. Thus the calculation of the DBGs should be more subtle, taking into account this phenomenon.

Another route would be to reverse our approach: instead of generating a part and then computing the NDBG and restarting this iteration from scratch if the NDBG does not say that the assembly is interlocked, we should follow the approach proposed by Wang et al. in [105] and first compute the NDBG to make it suitable and to highlights which previous parts the current one should be blocked by, then generate the separating polyline/mesh anchored in these highlighted parts.

While in 2D a mechanical analysis of the parts was performed, this work was not extended to the 3D case. On top of that, our findings regarding the fact that a random sampling of the design space often yields mechanically relevant assemblies should Conclusion and perspectives be confirmed by physical tests.

Our work must of course be extended to the highly non-linear realm of finite motions.

In our opinion, the most serious weakness of this work is that we did not consider the manufacturability of the parts. This corresponds to the spirit of this dissertation: who can do more can do less. Since we can reach the entire design space of interlocking assemblies, we can in particular reach the subset of manufacturable assemblies. It should be stressed that this subset depends on the tools the manufacturer chooses to use and thus that specific constraints to curate the design space of its unfeasible solutions should be implemented for each use-case.

In 2D we were able to smoothly interpolate between designs by elastic deformation.

Recent works have scaled this theory to three-dimensional objects (parametrised surfaces embedded in R 3 ), [47]. While, sadly, we could not use these results in the course of this PhD due to a lack of time, we can envision a potential application:

given two parts, one with desirable mechanical properties but not fabricable and the other with a poorer mechanical behaviour but manufacturable, a smooth interpolation between them could give the best of both without much computational effort. Another very promising avenue for research is close to what we showed in FiGURE 4.55: given the existing database of sound traditional assemblies, some being presented in CHAPTER 2, the exploration of the space obtained by interpolating between them would cheaply generate novel likely-to-be-sound 3D assemblies.

Let: p : S 2 -→ R 2 ∪ {∞}      x y z      →   x 1-z y 1-z  
be the stereographic projection of the unit sphere from the north pole.

Let: p -1 : R 2 ∪ {∞} -→ S 2   X Y   → 1 1+X 2 +Y 2      2X 2Y -1 + X 2 + Y 2     
the inverse stereographic projection mapping the plane R 2 onto the sphere S 2 .

A.3 PROPERTY

Property A.3.1. The stereographic projection of a circle on the sphere is a circle or a line.

Proof. Let P, of equation ax + by + cz + d = 0, be a plane intersecting S 2 and let I be the intersection. Let

X =   X Y   ∈ R 2 be such that p -1 (X) ∈ I.
By definition of the intersection I we have that p -1 (X) ∈ P.

Hence X is solution of

a 2X 1 + X 2 + Y 2 + b 2Y 1 + X 2 + Y 2 + c 1 -X 2 -Y 2 1 + X 2 + Y 2 + d = 0 2aX + 2bY + c(1 -X 2 -Y 2 ) + d(1 + X 2 + Y 2 ) = 0 (d -c)(X 2 + Y 2 ) + 2aX + 2bY + d + c = 0
If (d -c) = 0 then the above equation states that X lies on a line. Note that d -c = 0 ⇐⇒ -e z ∈ P by plugging -e z in the equation of the plane. Else, if d = c, then:

(d -c)(X 2 + Y 2 ) + 2aX + 2bY + d + c = 0 ⇐⇒ X 2 + Y 2 + 2 a d -c X + 2 b d -c + d + c d -c = 0 ⇐⇒ (X + a d -c ) 2 + (Y + b d -c ) 2 + d + c d -c - a 2 + b 2 (d -c) 2 ⇐⇒ (X + a d -c ) 2 + (Y + b d -c ) 2 + d 2 -a 2 -b 2 -c 2 (d -c) 2 = 0
Since P intersects S 2 of radius 1 we have that:

|d| √ a 2 + b 2 + c 2 ≤ 1
Hence:

a 2 + b 2 + c 2 -d 2 (d -c) 2 ≥ 0 And thus, with α = -a d-c ; β = -b d-c and r = a 2 +b 2 +c 2 -d 2 (d-c) 2
one has: (X + a d -c

) 2 + (Y + b d -c ) 2 + d 2 -a 2 -b 2 -c 2 (d -c) 2 = 0 ⇐⇒ (X -α) 2 + (Y -β) 2 -r 2 = 0
Which states that X lies on a circle of center (α, β) and radius r and the proof is complete.

B.2.1 CHAIN AND CYCLE

Two arcs/edges are adjacent when they have a vertex in common.

A chain of cardinality q is a sequence of q arcs [e 1 , e 2 , ..., e q ] such as two consecutive arcs are adjacent. A chain disregards the orientation of the arcs. For instance, on A cycle is a chain whose end vertices coincide.

B.2.2 PATH AND CIRCUIT

A path is a chain whose arcs are all directed in the same way: [e 1 , e 2 , ..., e q ] is a path of cardinality q with the end vertex of e i being equals to the start vertex of e i+1 : e i = (v p , v q ) and e i+1 = (v q , v r ). For instance on A circuit is a path whose end vertices coincide.

B.2.3 CONNECTED GRAPH

A graph (be it directed or undirected) is connected when a chain can be built between any pair of distinct vertices. Intuitively it means that one can travel between any two distinct vertices by walking on an edge (an arc deprived of its orientation).

The relation

v p ≡ v q =    either v p = v q
or there exists a chain between v p and v q is an equivalence relation:

■ reflexive: v p ≡ v p ■ symmetric: v p ≡ v q =⇒ v q ≡ v p ■ transitive: v p ≡ v q and v q ≡ v r =⇒ v p ≡ v r
The equivalence class that such relation induces on V partitions the set of vertices in connected components. Worded differently a connected component is a set of vertices from V such as there exists a chain made of arcs from E between any two nodes of that set. For instance FiGURE B.3 shows a graph with two connected components composed respectively of vertices [0, 1, 2, 3] and [START_REF] Akleman | Generalized Abeille Tiles: Topologically Interlocked Space-Filling Shapes Generated Based on Fabric Symmetries[END_REF][START_REF] Akleman | Generalized Abeille tiles: Topologically interlocked space-filling shapes generated based on fabric symmetries[END_REF].

Figure B.3| A graph with two connected components

A graph with a single connected component is therefore a connected graph.

B.2.4 STRONGLY CONNECTED GRAPH

A directed graph (the concept of strong connectivity does not apply to undirected graphs) is strongly connected when a circuit going through any pair of distinct vertices exists. Intuitively it means that one can travel back and forth between any two distinct vertices while following the orientation of the arcs.

The relation

v p ≡ v q =    either v p = v q
or there exists a circuit going through v p and v q .

is an equivalence relation:

■ reflexive: v p ≡ v p ■ symmetric: v p ≡ v q =⇒ v q ≡ v p ■ transitive: v p ≡ v q and v q ≡ v r =⇒ v p ≡ v r
The equivalence class that such relation induces on V partitions the set of vertices in strongly connected components. Worded differently a strongly connected component is a set of vertices from V such as there exist two paths of opposite orientation (i.e. a circuit) made of arcs from E between any two nodes of that set. For instance FiGURE B.4 shows a graph with four strongly connected components: it is possible to travel back and forth between any two nodes of the set [0, 1, 2, 3] or of the set [START_REF] Akleman | Generalized Abeille Tiles: Topologically Interlocked Space-Filling Shapes Generated Based on Fabric Symmetries[END_REF][START_REF] Akleman | Generalized Abeille tiles: Topologically interlocked space-filling shapes generated based on fabric symmetries[END_REF]. Nodes [6] and [7] are two strongly connected components reduced to single nodes. APPENDIX C

INTERVALS -TURTLE IN ROTATION

C.1 WARM UP Notations: let p i = (x i , y i ) T ∈ R 2 be the current position of the Turtle , and let θ i and l i be the orientation and length of the segment drawn by the Turtle between p i and its next position p i+1 = (x i+1 , y i+1 ) T = p i + l i (cos θ i , sin θ i ) T , as shown on the inset. The goal of this section is to find in which set shall θ i and l i be chosen so that the line segment [p i , p i+1 ] may obey a rotation around a given centre point x = (x, y) T ∈ R 2 . Assuming p i = x (a very reasonable assumption stating that the Turtle is not exactly on the centre of rotation) we can define the instantaneous directions of motion of point p i , p i+1 with respect to x, m(p i , x) and m(p i+1 , x), abbreviated m pi and m pi+1 .

Referring to SYSTEM (3.12), one has (with n i = (-sin θ i , cos θ i ) T the unit normal vector of segment

[p i , p i+1 ]) [p i , p i+1 ] obeys a rotation around x ⇐⇒    n i • m pi ⋆ 0 n i • m pi+1 ⋆ 0 C.1
With ⋆ standing for ≥ if the rotation is counterclockwise, ≤ if clockwise. Let us introduce a sign s = +1 if the rotation is counterclockwise, -1 otherwise. Then SYSTEM (C.1) is rewritten:

[p i , p i+1 ] obeys a rotation around x ⇐⇒    sn i • m pi ≥ 0 sn i • m pi+1 ≥ 0 C.2 ⇐⇒                s   -sin θ i cos θ i   • m pi ≥ 0 s   -sin θ i cos θ i   •   m pi + l i   -sin θ i cos θ i     ≥ 0 C.3
With m pi+1 = m pi + l i (-sin θ i , cos θ i ) T . For notational convenience let, in this section, ∆x = x i -x and ∆y = y i -y such that m pi = -∆y, ∆x T . With t = tan θi 2 , recall the double-angle formulae:

cos θ i = 1-t 2 1+t 2 and sin θ i = 2t 1+t 2 .
Let us consider the first inequality:

s   -sin θ i cos θ i   • m pi ≥ 0 ⇐⇒ s   -sin θ i cos θ i   •   -∆y ∆x   ≥ 0 ⇐⇒ s (∆x cos θ i + ∆y sin θ i ) ≥ 0 ⇐⇒ s ∆x 1 -t 2 1 + t 2 + ∆y 2t 1 + t 2 ≥ 0 ⇐⇒ s -∆xt 2 + 2∆yt + ∆x ≥ 0
Where θ i ∈] -π, π[ for the inequalities to be defined. Let

Q : ] -π, π[ → R θ → -∆x tan 2 θ 2 + 2∆y tan θ 2 + ∆x
And we have the equivalence:

sn i • m pi ≥ 0 ⇐⇒ sQ(θ i ) ≥ 0 C.4
Two cases must be studied:

■ If ∆x = 0, Q : θ → 2∆y tan θ 2 .
Hence:

sn i • m pi ≥ 0 ⇐⇒    θ i ∈ [0, π[ if s∆y > 0 θ i ∈] -π, 0] if s∆y < 0 C.5 ■ If ∆x = 0 then Q : θ → Q(θ) is a polynomial of degree 2 in tan θ 2 . Its discriminant is ∆ = 4||x i -x|| 2 > 0 C.6
Hence Q has two real roots:

θ 1,2 = 2 arctan ∆y ± ||x i -x|| ∆x C.7
Assuming θ 1 < θ 2 (otherwise switch them):

sn i • m pi ≥ 0 ⇐⇒    θ ∈ [θ 1 , θ 2 ] if s∆x > 0 θ i ∈] -π, θ 1 ] ∪ [θ 2 , π[ if s∆x < 0 C.8
Note the pleasant property of this first inequality: the segment length l i and the segment orientation θ i are independent of each other.

As for the second inequality, with again

θ i ∈] -π, π[: s   -sin θ i cos θ i   •   m pi + l i   -sin θ i cos θ i     ≥ 0 ⇐⇒ s sin θ i ∆y + l i sin 2 θ i + cos θ i ∆x + l i cos 2 θ i ⇐⇒ s (cos θ i ∆x + sin θ i ∆y + l i ) ⇐⇒ s 1 -t 2 1 + t 2 ∆x + 2t 1 + t 2 ∆y + l i ⇐⇒ s (l i -∆x)t 2 + 2∆yt + ∆x + l i * If max(θ 3 , θ 1 ) > min(θ 4 , θ 2 ): θ i ∈]-π, min(θ 1 , θ 3 )]∪[min(θ 4 , θ 2 ), max(θ 1 , θ 3 )]∪ [max(θ 4 , θ 2 ), π[ C.3 WHERE TO CHOOSE θ ?
This appendix refines the above enumeration and proves also partial orderings of the θ i that are helpful to justify the fact that the Turtle is drawn to or repelled by x depending on the value of s.

■ If ∆x = l i - If ∆y = 0 1. If s∆y = 0
No change are made with regards to the enumeration provided above.

If ∆y ̸ = 0

Prerequisite:

For a ∈ R let:

f a : R → R x → x 2 + a 2 -x √ x 2 + a 2 g a : R → R x → x 2 + a 2 + x √ x 2 + a 2
We show that for any a ∈ R both f a and g a are positive on R. f a is trivially positive on R - and g a on R + . Also we remark that proving f a ≥ 0 on R + is the same as proving g a ≥ 0 on R -. So it is enough to prove f a ≥ 0 on R + . For all x ≥ 0 we have the equivalence:

f a (x) ≥ 0 ⇔ x 2 + a 2 ≥0 ≥ x x 2 + a 2 ≥0 ⇔ (x 2 + a 2 ) 2 ≥ x x 2 + a 2 2 ⇔ a 2 (a 2 + x 2 ) ≥ 0 always true
Hence, by equivalence, as this result is true for any x ∈ R + we have shown that f a ≥ 0 on R + and by consequence, as outlined above, g a ≥ 0 on R -. Thus, we have successfully shown that both f a and g a are positive on R for any a ∈ R.

Let:

a 0 = -l i ∆y a 1 = ∆y -||p i -x|| l i a 2 = ∆y + ||p i -x|| l i
such that θ 0,1,2 = 2 arctan(a 0,1,2 ) and θ 1 ≤ θ 2 . We prove that:

∆y < 0 =⇒ θ 1 ≤ θ 2 ≤ θ 0 ∆y > 0 =⇒ θ 0 ≤ θ 1 ≤ θ 2
Since x → 2 arctan(x) is increasing on R proving an ordering of the θ i boils down to proving the same ordering for the a i .

(a)

∆y < 0 =⇒ θ 1 ≤ θ 2 ≤ θ 0
Proof. As by definition of θ 1 and θ 2 we have θ 1 ≤ θ 2 , it is enough to prove ∆y < 0 =⇒ θ 2 ≤ θ 0 .

Let ∆y ∈ R - * . By equivalence:

θ 2 ≤ θ 0 ⇔ ∆y + ||p i -x|| l i ≤ -l i ∆y ⇔ ∆y 2 + ∆y||p i -x|| ≥ -l 2 i ⇔ ∆y 2 + l 2 i + ∆y ∆y 2 + l 2 i ≥ 0 ⇔ g li (∆y) ≥ 0
And we know that g li ≥ 0 on R so the latest inequality is true and by equivalence so is θ 2 ≤ θ 0 .

Thus:

∆y < 0 =⇒ θ 1 ≤ θ 2 ≤ θ 0 (b) ∆y > 0 =⇒ θ 0 ≤ θ 1 ≤ θ 2
Proof. As by definition of θ 1 and θ 2 we have θ 1 ≤ θ 2 , it is enough to prove ∆y > 0 =⇒ θ 0 ≤ θ 1 .

Let ∆y ∈ R + * . By equivalence:

θ 0 ≤ θ 1 ⇔ -l i ∆y ≤ ∆y -||p i -x|| l i ⇔ -l 2 i ≤ ∆y 2 -∆y||p i -x|| ⇔ ∆y 2 + l 2 i -∆y ∆y 2 + l 2 i ≥ 0 ⇔ f li (∆y) ≥ 0
And we know that f li ≥ 0 on R so the latest inequality is true and by equivalence so is θ 0 ≤ θ 1 .

Thus:

∆y > 0 =⇒ θ 0 ≤ θ 1 ≤ θ 2 * If s∆y > 0 • If s∆x < 0 Since ∆x = l i > 0, s∆x < 0 =⇒ s = -1 and s∆y > 0 =⇒ ∆y < 0.
Hence we know that θ 1 ≤ θ 2 ≤ θ 0 and, referring to the enumeration provided above, in such case only one of the two assertions may happen and the Turtle must choose θ such as:

θ ∈ [θ 0 , π] • If s∆x > 0
Then s = +1 and ∆y > 0. We know that θ 0 ≤ θ 1 ≤ θ 2 . Hence the Turtle

chooses θ ∈ [θ 1 , θ 2 ] * If s∆y < 0 • If s∆x < 0 s = -1 and ∆y > 0; so θ 0 ≤ θ 1 ≤ θ 2 and the Turtle chooses: θ ∈ [-π, θ 0 ]
• If s∆x > 0 s = +1 and ∆y < 0; so θ 1 ≤ θ 2 ≤ θ 0 and the Turtle chooses:

θ ∈ [θ 1 , θ 2 ] ■ ||p i -x|| < l i
No change are made with regards to the enumeration.

■ ||p i -x|| ≥ l i - If ∆x = 0, let a 3 = -∆y -∆y 2 -l 2 i l i C.22 a 4 = -∆y + ∆y 2 -l 2 i l i C.23
such that for i ∈ 3, 4 θ i = 2 arctan(a i ) and θ 3 ≤ θ 4 . It is easy to show that:

∆y > 0 =⇒ θ 3 ≤ θ 4 < 0 ∆y < 0 =⇒ 0 < θ 3 ≤ θ 4
Hence the enumeration can be greatly simplified into:

* If s = -1 θ ∈ [θ 3 , θ 4 ] * If s = +1 θ ∈    [-π, 0] if ∆y < 0 [0, π] if ∆y > 0 - If ∆x = 0
Three cases may happen when ||p i -x|| ≥ l i , ∆x = 0 and ∆x = l i .

1. Either ∆x < 0; in which case we prove:

θ 1 < θ 3 ≤ θ 4 < θ 2 C.24
2. Or 0 < ∆x < l i ; we show that:

   Either θ 3 ≤ θ 4 ≤ θ 1 ≤ θ 2 Or θ 1 ≤ θ 2 ≤ θ 3 ≤ θ 4 C.25
3. Or l i < ∆x; we prove that:

θ 3 < θ 1 ≤ θ 2 < θ 4 C.26
In the following for i ∈ 1, 4 we introduce an a i ∈ R such that θ i = 2 arctan(a i ). Since x → 2 arctan(x) is strictly increasing on R proving an ordering of the θ i boils down to proving the same ordering for the a i .

If ∆x < 0

Then, for ∆x < 0; ∆y ∈ R such that ∆x 2 + ∆y 2 ≥ l 2 i let:

a 1 = ∆y + ||p i -x|| ∆x a 2 = ∆y -||p i -x|| ∆x a 3 = -∆y -||p i -x|| 2 -l 2 i l i -∆x a 4 = -∆y + ||p i -x|| 2 -l 2 i l i -∆x such that for i ∈ 1, 4 θ i = 2 arctan(a i ) and θ 3 ≤ θ 4 and θ 1 ≤ θ 2 .
We wish to prove

a 1 < a 3 ≤ a 4 < a 2 C.27
Since by definition a 3 ≤ a 4 we just need to show that a 1 < a 3 and a 4 < a 2 .

(a) a 1 < a 3 :

Proof. We are going to reason by equivalence and show that a 1 < a 3 is equivalent to a partial ordering that is always true, and hence that a 1 < a 3 is true:

a 1 < a 3 ⇐⇒ ∆y + ||p i -x|| ∆x < -∆y -||p i -x|| 2 -l 2 i l i -∆x ⇐⇒ -∆y∆x -∆x ||p i -x|| 2 -l 2 i < (∆y + ||p i -x||)(l i -∆x) ⇐⇒ -∆x ||p i -x|| 2 -l 2 i < (∆y + ||p i -x||)l i -||p i -x||∆x ⇐⇒ ∆x||p i -x|| -∆x ||p i -x|| 2 -l 2 i < (∆y + ||p i -x||)l i ⇐⇒ ∆x <0 ||p i -x||   1 -1 - l i ||p i -x|| 2   ≥0 < (∆y + ||p i -x||)l i >0
As outlined, on the above inequality the left hand term is negative while the right hand term is positive. Hence this inequality is always true and by equivalence so is a 1 < a 3 . We have thus shown:

θ 1 < θ 3 (b) a 4 < a 2 :
Proof. We prove this inequality by equivalence:

a 4 < a 2 ⇐⇒ -∆y + ||p i -x|| 2 -l 2 i l i -∆x < ∆y -||p i -x|| ∆x ⇐⇒ (l i -∆x)(∆y -||p i -x||) < -∆y∆x + ∆x||p i -x|| ||p i -x|| 2 -l 2 i ⇐⇒ (∆y -||p i -x||)l i + ||p i -x||∆x < ∆x ||p i -x|| 2 -l 2 i ⇐⇒ (∆y -||p i -x||)l i <0 < ∆x <0 ||p i -x||   -1 + 1 - l i ||p i -x|| 2   <0 >0
As outlined, on the above inequality the left hand term is negative while the right hand term is positive. Hence this inequality is always true and by equivalence so is a 4 < a 2 . We have thus shown:

θ 4 < θ 2
In a nutshell we have successfully shown that:

∆x < 0 =⇒ θ 1 < θ 3 ≤ θ 4 < θ 2 C.28 2. If 0 < ∆x < l i 0 < ∆x < l i and ∆y ∈ R such that ||p i -x|| 2 = ∆x 2 +∆y 2 ≥ l 2 i =⇒ |∆y| ≥ l 2 i -∆x 2 let: a 1 = ∆y -||p i -x|| ∆x a 2 = ∆y + ||p i -x|| ∆x a 3 = -∆y -||p i -x|| 2 -l 2 i l i -∆x a 4 = -∆y + ||p i -x|| 2 -l 2 i l i -∆x such that for i ∈ 1, 4 θ i = 2 arctan(a i ) and θ 3 ≤ θ 4 and θ 1 ≤ θ 2 .
We are going to prove that:

   either a 3 ≤ a 4 ≤ a 1 ≤ a 2 or a 1 ≤ a 2 ≤ a 3 ≤ a 4 C.29
Since by definition we have a 1 ≤ a 2 and a 3 ≤ a 4 we just need to prove that either a 4 ≤ a 1

or a 2 ≤ a 3 . The demonstration is in three steps:

(a) First we show that:

∆y ≥ ||p i -x|| 1 - ∆x l i =⇒ a 4 <
⇔ ∆yl i -||p i -x||(l i -∆x) ≥0 > ∆x ||p i -x|| 2 -l 2 i ≥0 ⇔ (∆yl i -||p i -x||(l i -∆x)) 2 > ∆x ||p i -x|| 2 -l 2 i 2 ⇔ 2||p i -x||l i >0 (||p i -x|| -∆y) >0 (l i -∆x) >0 > 0
As outlined the latest inequality is always true and, by equivalence, so is a 4 < a 1

We have proven what we aimed for: As outlined the latest inequality is always true and, by equivalence, so is a 2 < a 3 .

∆y ≥ ||p i -x|| 1 - ∆x l i =⇒ θ 4 < θ 1 C.30 (
We have proven what we aimed for:

∆y ≤ -||p i -x|| 1 - ∆x l i =⇒ θ 2 < θ 3 C.31 (c)    0 < ∆x < l i ||p i -x|| ≥ l i =⇒ |∆y| ≥ ||p i -x|| 1 -∆x li :
Proof. We propose a proof by contradiction: recall that ||p i -x|| ≥ l i and 0 <

∆x < l i implies |∆y| ≥ l 2 i -∆x 2 |∆y| < ||p i -x|| 1 - ∆x l i =⇒ l 2 i -∆x 2 < (∆x 2 + ∆y 2 ) 1 - ∆x l i 2 =⇒ (l 2 i -∆x 2 ) 1 -1 1 -∆x 2 < ∆x 2 1 - ∆x l i 2 =⇒ l 2 i -∆x 2 l 2 i ∆x(2l i -∆x) < ∆x 2 l 2 i (l i -∆x) 2 =⇒ (l 2 i -∆x 2 )(2l i -∆x) < ∆x(l i -∆x) 2 =⇒ (l i + ∆x)(2l i -∆x) < ∆x(l i -∆x) =⇒ 2l 2 i < 0 impossible
Hence by contradiction:

   0 < ∆x < l i ||p i -x|| ≥ l i =⇒ |∆y| ≥ ||p i -x|| 1 - ∆x l i
Summing up:

We have shown that in the situation All in all we have proven:

   0 < ∆x < l i ||p i -x|| ≥ l i =⇒    θ 3 ≤ θ 4 < θ 1 ≤ θ 2 if ∆y ≥ ||p i -x|| 1 -∆x li θ 1 ≤ θ 2 < θ 3 ≤ θ 4 if ∆y ≤ -||p i -x|| 1 -∆x li

If ∆x > l i

For ∆x > l i ; ∆y ∈ R let: such that for i ∈ 1, 4 θ i = 2 arctan(a i ) and θ 3 ≤ θ 4 and θ 1 ≤ θ 2 . We prove that:

a 3 < a 1 ≤ a 2 < a 4 C.32
By definition a 1 ≤ a 2 so all we have left to prove is a 3 ≤ a 1 and a 2 ≤ a 4 .

(a) a 3 < a 1 :

Proof. Two cases may occur:

* Either ∆yl i -||p i -x||(l i -∆x) ≥ 0

In which case we prove our assertion by equivalence: As outlined the latest inequality is always true and we have shown:

a 3 < a 1 ⇔ -∆y + ||p i -x|| 2 -l 2 i l i -∆x < ∆y -||p i -
∆yl i -||p i -x||(l i -∆x) ≥ 0 =⇒ a 3 < a 1 * Or ∆yl i -||p i -x||(l i -∆x) < 0
In which case the proposition:

∆yl i -||p i -x||(l i -∆x) <0 < ∆x ||p i -x|| 2 -l 2 i ≥0
is true and as we have shown just above:

∆yl i -||p i -x||(l i -∆x) < ∆x ||p i -x|| 2 -l 2 i ⇔ a 3 < a 1
Hence we have shown:

∆yl i -||p i -x||(l i -∆x) < 0 =⇒ a 3 < a 1
We have shown that the assertion a 3 < a 1 is true whether ∆yl i -||p i -x||(l i -∆x) is positive or negative. Hence it is always true:

θ 3 < θ 1 (b) a 2 < a 4 :
Proof. Two cases may occur:

* Either -∆yl i -||p i -x||(l i -∆x) ≥ 0

In which case we prove our assertion by equivalence:

a 2 < a 4 ⇔ ∆y + ||p i -x|| ∆x < -∆y -||p i -x|| 2 -l 2 i l i -∆x ⇔ ∆yl i + ||p i -x||(l i -∆x) > -∆x ||p i -x|| 2 -l 2 i ⇔ -∆yl i -||p i -x||(l i -∆x) ≥0 < ∆x ||p i -x|| 2 -l 2 i ≥0 ⇔ (-∆yl i -||p i -x||(l i -∆x)) 2 < ∆x ||p i -x|| 2 -l 2 i 2 ⇔ 2||p i -x||l i >0 (||p i -x|| + ∆y) >0 (l i -∆x) <0 < 0
As outlined the latest inequality is always true and we have shown:

-∆yl i -||p i -x||(l i -∆x) < 0 =⇒ a 2 < a 4 * Or -∆yl i -||p i -x||(l i -∆x) < 0

In which case the proposition:

-∆yl i -||p i -x||(l i -∆x) <0 < ∆x ||p i -x|| 2 -l 2 i ≥0
is true and as we have shown just above:

-∆yl i -||p i -x||(l i -∆x) ≤ ∆x ||p i -x|| 2 -l 2 i ⇔ a 2 < a 4
Hence we have shown:

-∆yl i -||p i -x||(l i -∆x) < 0 =⇒ a 2 < a 4
We have shown that the assertion a 2 < a 4 is true whether -∆yl i -||p i -x||(l i -∆x) is positive or negative. Hence it is always true:

θ 2 < θ 4 ■ If 2∆x = l i :
1. If ∆y = 0:

Then P is constant: ∀θ P (θ) = 2l i > 0. Also, in this case, ||p i -x|| < l i which implies that the Turtle cannot be here when s = -1. Hence if the Turtle is exactly at the distance li 2 , 0 from the centre x, then s = +1 and since P > 0 then ||p i+1 -x|| > ||p i -x|| which proves that x acts as a repulsive point and the Turtle moves away from it. We claim that θ 1 > θ.

Proof. Since θ 2 > θ 1 we shall obtain θ < θ 1 < θ 2 < π which proves the result wanted. In such case θ 1 = 2 arctan ∆y-||pi-x|| li/2 We claim that θ 2 < θ.

θ 1 > θ ⇔ ∆y -||p i -x|| l i /2 > -l i 2∆y ⇔ 2∆y 2 -2||p i -x||∆y + l 2 i 2 > 0 ⇔ 2 ||p i -x|| 2 - l i 2 2 -2||p i -x||∆y + l 2 i 2 > 0 ⇔ ||p i -
Proof. Since θ 1 < θ 2 we shall obtain -π < θ 1 < θ 2 < θ which proves the result wanted. Here θ 2 = 2 arctan ∆y+||pi-x|| li/2

. Similarly as above we get the equivalence: and:

θ 4 < θ ⇔ -∆y + ||p i -x|| 2 -l 2 i l i /2 < - l i 2∆y ⇔ -2∆y 2 + 2∆y ||p i -x|| 2 -l 2 i + l 2 i 2 < 0 ⇔ -2 ||p i -x|| 2 - l i 2 2 + 2∆y ||p i -x|| 2 -l 2 i + l 2 i 2 < 0 ⇔ 2||p i -x|| 2 -l 2 i > 2∆y ||p i -x|| 2 -l 2 i ⇔ (⋆)
Since (⋆) is true, so is θ 4 < θ and we have proven what we wished for when ∆y > 0.

(b) If ∆y < 0:

and let:

θ 5 = min(θ ⊖ 56 , θ ⊕ 56 ) θ 6 = max(θ ⊖ 56 , θ ⊕ 56 )
To prove that x is attractive or repulsive according to the sign of s we are going to prove that the interval in which the Turtle chooses θ1 is contained in the interval [θ 5 , θ 6 ] or [-π, θ 5 ] ∪ [θ 6 , π]

(depending on whether we have P > 0 or P < 0). To that end we first prove that the intervals We first start by investigate the case s = -1:

If s = -1

Since the Turtle cannot be in a situation where s = -1 and li 2 ≤ ||p i -x|| < l i we must 3)), see the inset. As one can see in this small example, if one wants to use complex algebra to simply rotate z 2 about the origin while keeping distances constant (i.e. a pure rotation or a rigid body motion) one must multiply z 2 by some unit complex number to avoid scaling it. This property will hold for quaternion multiplication.

D.1.2 GENERALIZING FROM 2D COMPLEX NUMBERS TO 4D QUATERNIONS

The multiplication between two quaternions q 1 and q 2 involves first scaling q 2 by the norm of q 1 and then rotating that scaled quaternion through some angle defined in q 1 :

q 1 q 2 = q 1 ||q 1 || ||q 1 ||q 2 D.1
Where ||q 1 ||q 2 represents the operation of scaling q 2 by the norm of q 1 and is the direct analogous of the complex multiplication described above, and q1 ||q1|| corresponds to a rotation in a 4D sense applied to ||q 1 ||q 2 . As shown by this equation and the same as complex multiplication, the rotation (so by definition an operation keeping distances constant) must involve only unit quaternions lying on the unit hypersphere of R 4 otherwise, depending on whether ||q 1 || is greater or smaller than 1, the norm of the result is scaled up or down.

D.1.2.1 Beware of the pitfall !

What I believe to be the most naive way to generalize what we saw for complex rotation to quaternionic rotation is shown thereafter; we are going to work through an example to see where this intuition fails and how to rectify it to correctly express 3D rotation using quaternions.

The quaternionic representation of a vector (or a point) in R 3 , say vector v = (x, y, z) T , is to build a quaternion whose scalar part is 0 and whose imaginary part is equal to the vector: v = [0, v]. Let us consider a point p ∈ R 3 that we want to rotate around an axis q ∈ R 3 through an angle θ in a clockwise manner.

Introducing the quaternionic form of our 3D point as p = [0, p] and of the action "rotate by θ around axis q" as q = [cos θ, q sin θ], a simplistic and soon-to-be-proven-wrong translation of our problem "perform a clockwise rotation of p about q by θ" into the quaternionic language would simply be qp (had we wanted an anticlockwise rotation, we would have written pq). Following EQUATiON (D.1), we can without loss of generality assume that our axis of rotation is depicted in R 3 as a unit vector which automatically implies that our quaternion q is of unit norm. Let us compute this product to see what happens: qp = [cos θ, q sin θ][0, p] = [-(q • p) sin θ, p cos θ + (q × p) sin θ]

The norm of qp is given by ||qp|| 2 = ((q • p) sin θ) 2 + (p cos θ + (q × p) sin θ) 2 = ((q • p) sin θ)

2 + (p cos θ) 2 + ((q × p) sin θ) Or we could simply have written ||qp|| = ||q||||p|| (as can be easily checked for any quaternions q and p) and use the fact that ||q|| = 1. What we just proved is that after transforming our quaternion p by our action q we get a new quaternion qp that lies at the same distance to the origin of R 4 as p does which is consistent with the definition of a pure rotation.

Let us also compute the angle α between the quaternions p and qp (if everything went as expected we should get α = θ). In order to do so one must simply recall that a quaternion is nothing else that a 4D

vector and that the angle between two n-dimensional vectors v 1 and v 2 is given by arccos v1•v2 ||v1||||v2|| . With a slight abuse of notation, we will denote in this specific section both a 3D vector v ∈ R 3 and its vectorized quaternionic form v ∈ R 4 with bold font and: This looks exactly like the pure rotation we were asking for. Yet there is one big issue that we overlooked until now with our quaternion qp: its scalar part is non-zero (except for special cases such as q and p are orthogonal or θ is a multiple of π) which mean that we can no longer interpret our 4D quaternion as a 3D

point without losing some important information: for instance, if we project qp into the 3D world by simply forgetting the scalar part, we end up with a point that is not as the same distance to the origin of R 3 as p is, meaning that we are no longer looking at a rotated point. In other words, if we rotate a solid body (seen as a collection of points) using quaternions and then forget the scalar part to project our rotated quaternions back into the 3D world, we end up with a deformed solid not rotated like we would have wanted, which is far from being the rigid body motion initially planned: FiGURE D.1 is obtained by successively transforming each endpoint p of the unit cube on the left through a "rotation" encoded by a quaternion q, of the form qp, and displaying the imaginary part only of the result on the right. Before rectifying this naive approach and giving the correct procedure to use quaternions for spatial rotations, let us build some intuition on how and why we just morphed our 3D point p into a 4D quaternion pq that can no longer be interpreted as a point in 3D space. To do that let's rotate a 3D sphere and try to understand what would a 2D creature living in a plane see.

D.1.2.2 Getting some intuition: downgrading from 4D and 3D to 3D and 2D

A good way to understand with our 3D-wired brain what is going on in the 4D space when we use quaternions is to try to understand what a 2D creature living in the XY plane would see of a rotation in 3D. With that in mind, let us assume that we want to help a 2D creature living in the XY plane understand what rotating a 3D object looks like.

Rotating a vector in 3D is the same as unitizing this vector onto the 3D unit sphere, rotating that unit vector and then scaling it back to its original length. That being said we can without loss of generality focus on rotating points on the unit 3D sphere and this will give us the rotation of the entire 3D space.

On FiGURE D.2a, the unit sphere S 2 is depicted and the equator, in red, is the only great circle of the sphere entirely embedded in the XY plane. Points on this equator are the only ones with a zero z-value and are hence considered by the creature as the only "physical" points of R 3 , same as we, as 3D creatures, only deem quaternions with a zero scalar part as being the only "physical" points of R 4 . In other words, this equator is the only unaltered part of the 3D sphere embedded into the plane, and points on this circle are the only ones that can be mentally represented by our hypothetical 2D creature, i.e they are the only points having some kind of physical meaning in a 2D world. Rotating this equator as a part of the 3D sphere is to the creature in 2D what rotating 3D points using quaternion is to us. So trying to understand how the creature perceives this equator as it rotates should give us intuitive insights into how we perceive the rotation of 3D points using quaternions. The effect on the projected equator appears to be some kind of squishing for this particular rotation, as the images are ellipses. Obviously, the overall motion seen by the 2D creature is far from being a rigid body motion of the sphere as we see it ourselves in the 3D world.

One might object that this effect is an artefact of the projection chosen and that this particular projection (a vertical one by putting the z-value to 0) might not be the most suitable to represent a 3D sphere as two points symmetrical with respect to the plane are projected onto the same point and hence some information is necessarily lost. A somewhat better projection that uses the infinity of the XY plane to represent bijectively all points on the 3D sphere would be a stereographic projection, illustrated on FiGURE D.3. The faint lines on the backgrounds are the projection of the black latitudes and longitudes of the sphere. The equator is shown in red and its projection is in blue.

The effect of the rotation of the 3D sphere on its stereographic projection is shown in FiGURE D.4. On the left a view of how the 2D creature might perceive the sphere as it is stereographically projected onto the plane. The equator is highlighted in blue. Right: In red the original, unaltered, equator and in shades of blue the successive stereographic projections of the equator as the sphere gradually rotates. As the sphere rotates, the projection of the equator undergoes what could be best described as a translation along with some upscaling, again a transformation that is far from being the rigid body motion that we see in 3D.

D.1.3 CONCLUSION

The point of this small subsection was to build an intuitive understanding of what happens behind the scene when one multiplies the quaternionic representation of a point by a quaternion: we saw that -except in particular cases -the result quaternion has a non-zero scalar part and thus its imaginary part cannot be interpreted as the coordinates of a point after the rotation; we also showed that simply dropping the scalar component is not a solution, as distances, in particular, may not be recorded in the imaginary part only and the result of this projection into the 3D world is far from being a rigid body motion. A solid body transformed that way will most often look deformed and not rotated. To understand this phenomenon at an intuitive level, a tentative was made to explain what could a 2D creature living in the XY plane understand of the rotation of the 3D sphere, in the hope that the reader might get some insights on how to rectify his or her own perceptions on how quaternions as 4D numbers are used to rotate 3D objects.

The analogy in 2D was built around the equator of the 3D unit sphere as being the only part of the sphere fully embedded in the XY plane (so the set of unit points with a zero z-value) and that could hence be fully understood by a hypothetical 2D creature. The counterpart of the equator for us is the set of unit quaternions having a zero scalar part and whose imaginary parts are interpreted as the coordinates of 3D points.

Following how the equator is transformed after a rotation of the sphere would be to the creature what multiplying 3D points with quaternion is to us.

To have the 2D creature "see" the 3D sphere, two projections were used. The first one, termed the vertical projection, simply drops the z-component of the coordinates of points to project them onto the 2D plane,

to imitate what we did when the scalar part of the result quaternion was forgotten and we only looked at the imaginary part. The result of this projection on the rotated equator was some kind of squished circle (see FiGURE D.2) which closely mimics how the transformation of the unit cube on FiGURE D.1 was rotated but hugely deformed.

To show that this effect was not only an artefact of the chosen projection, another one was presented, the stereographic projection, which takes advantage of the infinity of the 2D plane to project bijectively the 3D sphere. There again the 2D creature could only interpret what we know to be a rigid body motion as some kind of translation motion and a scaling stretching of the equator. What the reader should bear in mind from now on is quite straightforward: if, after a rotation or any kind of transformation of a geometric object, we end up with a nonzero component on a dimension we cannot visualize (be it the z value of a points' coordinates for a 2D being or the scalar value of quaternions for us as 3D creatures) we must project this non-physical object back into the space that we were working with in the first place. This projection will inevitably deform in some way the geometry of the space where things happen and the result might not be to our taste.

What we have understood is twofold:

1. When we multiply the quaternionic representation p = [0, p] of a point p ∈ R 3 by a quaternion q = [cos θ, u sin θ] for some unit vector u ∈ R 3 and some angle θ we are in fact rotating p about u through θ in the 4D space. 2. As long as the scalar part of the resulting quaternion qp (or pq) is nonzero we cannot interpret it as a 3D point without having to resort to some projection that will necessarily deform the geometry in an unwanted way.

In the next section, the correct formula to use when rotating 3D objects with quaternions will be introduced; we will also try to gain some intuitive understanding of why this formula works. of rotating about axis u through the half angle θ 2 . Note that by construction q ∈ U (H). The claim is that the imaginary part of the quaternion p r = qpq -1 = qpq * can be interpreted as the 3D point that is solution to our problem (had we wanted a rotation in an anticlockwise manner, the solution would be given by q -1 pq). To prove that claim, let's compute the product given by p r . For the sake of simplicity in the following equations sin θ 2 is denoted as s and cos θ 2 as c. The definition of the multiplication between two quaternions is presented EQUATiON (5.2).

= cos θ

Which proves that the angle between p r and p is θ.

In a nutshell, we proved that the quaternion p r = qpq -1 has a zero scalar part and can therefore be interpreted as a 3D point p r lying at the same distance to the origin as p does and forming an angle θ with the latter, i.e. we just rotated p through θ about u.

D.2 DUAL QUATERNIONS

D.2.1 A CONCISE EXPRESSION

Following [START_REF] Kavan | Dual Quaternions for Rigid Transformation Blending[END_REF] and [22] we prove that any unit dual quaternion can be written down as:

q = cos θ 2 , û sin θ 2
where θ is a dual angle and v is a dual vector in R 3 .

Let q = q + 1 2 ϵρtq be a unit dual quaternion with q = cos θ 2 , u sin θ 2 , u ∈ R 3 , θ ∈] -π, π] and t = [0, t], t ∈ R 3 such that ||u|| = ||t|| = 1. Angle θ is the amount of rotation about axis u and ρ is the magnitude of the translation along t. In the following let s denote sin θ 2 and c = cos θ 2 .

Prerequisite

For a and b ∈ R we prove that: Let us rewrite the scalar part of the dual quaternion q:

c -ϵ ρ 2 t • us = cos θ 2 -ϵ ρ 2 t • u = cos θ + ϵρt • u 2
The scalar part of q invites us to introduce a dual angle θ = θ + ϵρt • u. Our goal is now to express the imaginary part of q using this dual angle θ. Assuming that θ = 0 let us define:

u ϵ = ρ 2 (t -(t • u)u) cot θ 2 + t × u a = 1, = 1, p = 1

Figure 1 .

 1 Figure 1.1| Left: forecast of the oil production of countries supplying France, from [7]. Right: forecast of the coal production in China, from [104].

Figure 1 .

 1 Figure 1.2| Top left: a view of the Hōshi Ryokan, Japan, source: Wikipedia. Right: a picture of the Ise shrine, Japan, source: the Internet. Bottom left: a view of the interior of the Torpo stave church in Hallingdal, Norway, source: the Internet. Bottom right: an exploded and assembled view of a bracket-arm set, typical of medieval Chinese architecture, from [37].

Figure 1 .

 1 Figure 1.3| Isometric view of a balloon frame. From [114].

Figure 2 .

 2 Figure 2.2| Several common splice joints and the possible translational disassembly kinematics represented on the sphere.

FiGURE 2 .Figure 2 .

 22 Figure 2.3| Several common tenon and mortise joints. Depending on the geometry of the joint, the seam between the two parts may be visible on a varying number of faces. After [101, 118].

Figure 2 .

 2 Figure 2.4| Some floor and panel joints, after [74, 101, 118].

FiGURE 2 .Figure 2 .Figure 2 .

 222 FiGURE 2.5a (isuka tsugi), should lie between once and twice the side of the cross-section. The shorter the more structurally able([101]). To this design could be added abutments and/or a key to prevent disassembly, as depicted 2.5b. Note that if the key is added, as depicted in red in the figure, it does not reach through the lower surface. It was used where the outer appearance of the joint was of no concern, typically the dormitories of temples' monks,[74]. The elegant quadruple-faced halved rabbet oblique scarf splice, 2.5c, requires sophisticated craftsmanship to complete it. A variant, also technically difficult to manufacture, is the triple-faced halved rabbeted oblique scarf splice (here with a key) on FiGURE 2.5d. a b

2. 8 .Figure 2 .

 82 Figure 2.7| Crossed right angle joints. By tuning the depth of the hollowing the assembly reaches various heights. After [43].

Figure 2 .Figure 2 .Figure 2 .

 222 Figure 2.8| Connecting joints. When notches are shown (in blue, d) and e)) the wedges (in red) make the assembly permanent. After [101].

Figure 2 .

 2 Figure 2.11| Assemblies joined through planar contact. a)-masonry modelling, from [111]. b) -stable puzzle, from [29]. c) -a drawing of an Abeille's vault, from [32]. d) and e) -topologically interlocked structures, respectively from [56] and [108].

Figure 2 .

 2 Figure 2.12| Assemblies joined through curved contact. a) -Non-convexAbeille's vault, from[33]. b) -osteomorphic blocks from[27]. c) and d) 3D tile components, respectively from [94] and[START_REF] Akleman | Generalized Abeille tiles: Topologically interlocked space-filling shapes generated based on fabric symmetries[END_REF].

Figure 2 .

 2 Figure 2.13| Voxel-based assemblies. a)-3D printed pieces forming an interlocked vase-like puzzle, from [90]. b) -Complex joint obtained by [53]. c) -3D puzzles automatically generated by [105].

Figure 2 .

 2 Figure 2.14| Compliant design: mechanisms for self-adjustment and self-fixation can be built into components. Source (caption and image):[START_REF] Bock | Robot-Oriented Design: Design and Management Tools for the Deployment of Automation and Robotics in Construction[END_REF]

Figure 2 .

 2 Figure 2.15| a) -Through reinforcement learning, a robot learned to join beams, from [6]. b) -Creative robots dynamically build a discretesphere structure, from [18]. c) and d) -Cooperative robots build a masonry vault, from [72].

Figure 2 .

 2 Figure 2.16| Digital technology makes it possible to envisage completely different methods of application, beyond traditional carpentry. Source: [68].

Figure 2 .

 2 Figure 2.18| A 3D assembly is disassembled sequentially. The whitest part in the middle is the reference part, P0, and the part in the lightest shade of blue, at the top of each frame, is the key P1.

Figure 2 .

 2 Figure 2.19| Even though P2 obeys an infinitesimal downwards translation, a finite motion will lead to a collision with P0.

■

  Part: A part is a rigid body modelled by a finite compact manifold in the workspace. ■ Polygonal part: In R 2 , the boundary separating a part from the rest of the assembly is a polyline, i.e. a closed curve made of end-to-end concatenated line segments such as illustrated on the inset on the right, top. ■ Polyhedral part: In R 3 , the boundary separating a part from the rest of the workspace is a closed triangular mesh, i.e. a mesh, with no boundary edge, made of triangular faces such as illustrated on the inset on the right, bottom. ■ Separating curve/surface of a part: The separating curve (in 2D) or surface (in 3D) is the portion of the boundary of the part that separates it from the rest of the assembly. By construction, it is always in the interior of the design domain.

■Motion:

  In this work, a motion refers to any translation, rotation or combination of both used to move a point in the workspace.

■Assembly:

  An assembly refers to the set of parts in contact with each other whose union is the design domain, and the intersection of two distinct parts only yields a subset of the boundary of these parts, see the inset on the right. ■ Interlocking: An assembly is interlocked if no single part can obey any motion while holding in place a specific part called the key. ■ Sequential: An assembly is sequential if one needs a (non-necessarily unique) ordering of the parts such that each successive part can be disassembled by obeying a motion. 118 Klaus Zwerger. Wood and Wood Joints -Building Traditions of Europe, Japan and China.

Figure 3 .

 3 Figure 3.1| The 2D unit circle S 1 is seen as the locus of the directions of translation in R 2 .

Figure 3 .

 3 Figure 3.2| On the left an assembly A = {P0, P1}. On the right, the semi unit disc in blue represents the half-space of motion of P1.

=Figure 3 .

 3 Figure 3.3| On the left an assembly A = {P0, P1}. On the right, the cone of translational freedom results from the intersection of the halfspaces of motion associated with each line segment of the separating curve.

Figure 3 .

 3 Figure 3.5| The instantaneous direction of motion of point pA (resp. pB, p) is the vector, mp A (resp. mp B , mp).

Figure 3 .

 3 Figure 3.6| P1 may obey counterclockwise (on the left in blue), (resp. clockwise on the right in red) rotations around centres in the intersection of both half-planes, depicted as the darkest shade of blue (resp. red) in the top right (resp. bottom left).

Figure 3 .

 3 Figure 3.7| Depending on the location of the centre of rotation xr, part P1 may obey a counterclockwise rotation (left), no rotation (middle), or a clockwise rotation (right).

Figure 3 .

 3 Figure 3.8| The half-planes of possible centres of rotation are projected ontothe unit sphere S 2 as spherical caps, the so-called caps of rotational freedom, that are tangent at the north pole (0, 0, 1) T .

Figure 3 .

 3 Figure 3.10| P1 may obey only clockwise rotations around centres belonging to a closed surface on the left; it may only obey a counterclockwise rotation around a unique centre on the right.

Figure 3 .

 3 Figure 3.11| From left to right: an assembly made of two parts, the cones of rotational freedom (counterclockwise in blue, clockwise in red) and the cone of translational freedom.

Figure 3 .

 3 Figure 3.12| The (counterclockwise) rotational cone is reduced to an arc, implying that the translational cone is reduced to a unique direction.

FiGURE 3 .Figure 3 .

 33 Figure 3.13| An assembly made of two parts P0 and P1 and the DBGs associated with different centres of rotation (middle) or directions of translation (right).

Figure 3 .

 3 Figure 3.14| The strongly connected components of each DBG are colourcoded (blue and red). Top row: an assembly made of 3 parts and the DBGs associated with the horizontal to the right and vertical upwards directions of translation. Bottom row: assembly obtained after removing P1 and the corresponding DBGs.

Figure 3 .

 3 Figure 3.15| S 1 and S 2 are partitioned into cells of dimension 0, 1, and (in the case of S 2 only) 2.

3. 1 . 3

 13 NON DIRECTIONAL BLOCKING GRAPH -NDBGFollowing the definition of a DBG,Wilson and Latombe introduced in [113] the concept of Non Directional Blocking Graph (NDBG). Simply put, the NDBG of an assembly A is simply the concatenation of all DBGs G(x, A) for any motion x (be it a rotation or a translation). In concrete terms, given an assembly A = {P 0 , ..., P N }, for any pair of parts (P i , P j ) in contact, SYSTEM(3.1) and SYSTEM(3.9) are solved to get the cones C t , C ccw r and C cw r . The set of cones C t partitions the unit circle S 1 into an arrangement of cells: cells of dimension 0 (the endpoints of the cone) and of dimension 1 (the open arc of circle between two consecutive endpoints). Similarly, the set of cones of rotational freedom partition S 2 into cells of dimension 0 (endpoints of the cone), 1 (open arc of circle between two consecutive endpoints) or 2 (open surface between arcs).

Figure 3 .

 3 Figure 3.16| The DBG G(x, A) is obtained by performing a union operation of the DBGs G(x A 3 , A) and G(x B 3 , A).

  property is illustrated onFiGURE 3.16: x, in red, represents a direction of translation taken in the open cone Ct,3 and one can notice that G(x, A) is the union of G(x A 3 , A) and G(x B 3 , A), the DBGs of the endpoints of the cone; arc e 3→2 is taken from G(x A 3 , A) and arc e 1→2 from G(x B 3 , A) (highlighted in red on FiGURE 3.16), while all other arcs are present in both DBGs.

Figure 3 .

 3 Figure3.17| An example of a non interlocked assembly: by applying simultaneously a motion along the directions depicted by red arrows, the puzzle can be disassembled. Inspired by Julien Glath's work,[START_REF] Glath | Thinking and Designing Reversible Structures with Non-sequential Assemblies[END_REF].

Figure 4 .

 4 Figure 4.1| A polygon drawn by a Turtle .

3 .or 5 .

 35 walk → rotate The Turtle has walked to a new position and must now choose a new random orientation compatible with the prescribed cone of translation or centre of rotation. 4. walk → snap Context: the leftmost blue cone represents the cone of translational freedom prescribed by the user: the final design must obey any direction in the cone bounded by x A 1 and x B 1 . The Turtle has walked to a new position and must now choose to orient along either ±x A 1 or ∓x B 1 . snap → walk Similar to rotate → walk: the Turtle has snapped to an orientation and walks forward by a random amount. 6. snap → end Similar to rotate → end: the Turtle has snapped to an orientation and walks forward until meeting an edge of the design domain.When two rules apply to the same left-hand side (for instance rotate → walk and rotate → end) then the Markov chain M randomly chooses one of the two with some predefined probability as depicted on FiGURE 4.2.

Figure 4 .

 4 Figure 4.2| M transitions between states with the predefined probabilities pi.

  input

Figure 4 .

 4 Figure 4.3| A step-by-step decomposition of the Turtle 's trajectory. Highlighted in red on the far right are the line segments corresponding to a snap order.

Figure 4 .

 4 Figure 4.4| CTF stands for Cone of translational freedom. Two snaps are necessary to match the actual CTF of the polyline to the user-prescribed one.

Figure 4 .

 4 Figure 4.5| The same line segment can be reached by walking twice in the same direction by a magnitude l 2 or once by a magnitude l, for some l ∈ [lmin, lmax], and thus the map is not injective.

4. 1 . 1 . 6

 116 Notes and issues related to the behaviour of the Turtle APPENDiX C.4 proves an intriguing property of the Turtle : ■ If s = -1, (i.e. the user asks for a part P 1 obeying a clockwise rotation around centre x r ) APPENDiX C.4 proves that in this case, centre x r becomes attractive, meaning that the Turtle must always get closer to x r : ||p i+1 -x r || < ||p i -x r ||.

Figure 4 .

 4 Figure 4.6| Left: sets of possible next position of the Turtle , pi+1, for a fixed li. Right: sets of position when li is left variable between two bounds.

Figure 4 .

 4 Figure 4.7| Left: zoomed out view of the sets of possible positions for the next position pi+1 for various positions of pi.. Right: zoomed in view of the sets for s = -1 and for various positions of pi.

FiGURE 4 .

 4 FiGURE 4.8 shows the limit trajectory of the Turtle in blue for s = -1 (resp. in red for s = +1): for a

Figure 4 .

 4 Figure 4.8| The limit trajectories of the Turtle : if s = +1 the Turtle is drawn to the centre xr; if s = -1 the Turtle is repelled by it.

Figure 4 .Figure 4 .

 44 Figure 4.9| The Turtle is stuck!

FiGURE 4 . 1 .

 41 FiGURE 4.11 top row shows the basins of attraction of the method for different starting value x 0 . One sees that depending on the initial value x 0 , the algorithm finds either one of the three roots -1, 1 and 2, highlighted using coloured dots. The curve highlighted in red shows the convergence of the algorithm for a starting value x 0 = -3; next, at iteration 1 x 1 -1.95, then x 2 -1.3 etc. until convergence to the root -1. FiGURE 4.11 bottom row shows the absolute error of successive solutions x i , starting at x 0 = -3, with respect to the root -1: the convergence is quadratic, as expected for such method. Finally, one notices that

Figure 4 .

 4 Figure 4.11| Basins of attraction and convergence of the error. The three roots are highlighted with the coloured dots.

Figure 4 .

 4 Figure 4.12| A polyline before (left) and after (right) a single step of GPA.

Figure 4 .

 4 Figure 4.13| Input (left) and output (right) of ALGORiTHM 1. Snap segments are highlighted in red.

  Compute the norm of the vector obtained by stacking the ϕ i (X)

FiGURE 4 .

 4 FiGURE 4.13 shows the user-given polyline on the left, obviously not obeying the translation x = (1, 0) T , and the result of the optimisation on the right. One notices that the tine on the top has been opened to meet with the minimal angle constraint, the endpoints precisely are on the design domain, and all segments are

  and X[o e + 2i + 1] map to η 2i and η 2i+1 . Let also o m be the index such that X[o m + 2i] and X[o m + 2i + 1] map to m ix and m iy . Similarly, let o n be the index such that X[o n + 2i]

Figure 4 .

 4 Figure 4.14| Input (left) and output (right) of ALGORiTHM 1 adapted to work in rotation. Snap segments are highlighted in red.

Figure 4 .

 4 Figure 4.15| Input (left) and output (right) of ALGORiTHM 1 adapted to work in rotation and in translation. Snap segments are highlighted in red.

FiGURE 4 .

 4 FiGURE 4.14 shows the input/output pair of the GPA where the aforementioned constraints were added to make it work in rotation.

FiGURE 4 .

 4 FiGURE 4.15 shows the input/output pair of the GPA adapted to work both in translation and rotation. In red are the snap segments. Note that the algorithm has moved one of the endpoint of each snap segment

FiGURE 4 .

 4 FiGURE 4.16 shows a typical convergence of a GPA optimisation. Let ϕ(X n ) = (ϕ 1 (X n ), . . . , ϕ i (X n ), . . .) T

FiGURE 4 .

 4 16 displays the graph of the evolution of the logarithm of the euclidean norm of the residual vector ϕ, i.e. log ||ϕ||. It shows that whenever the residual falls below a given threshold( 10 -11 here) either a new constraint is turned on or the final solution is reached. The highlighted red points correspond to iterations where a new constraint was switched on: at first, the constraint requiring the endpoints of the polyline to slide on the edges of the design domain, and after two iterations the snap constraint.

Figure 4 .

 4 Figure 4.16| Evolution of the norm of the residual (log y-scale).

Figure 4 .

 4 Figure 4.17| Evolution of the norm of the residuals for each constraint (left yscale) and the associated weights (right y-scale).

  FiGURE 4.19 illustrate the process of creating part P 1 . The polyline is oriented from p 1 to p k , as suggested by the blue arrow, and the design domain from v 1 to v 4 , see the black arrow. The last point p k lies on edge [v 1 , v 2 ] of the design domain. The endvertex v 2 is added to the list. Secondly the end vertex v 3 of the following edge [v 2 , v 3 ] is added. As the first point p 1 lies on edge [v 3 , v 4 ], the whole polyline p 1 , ..., p k is added to the list. Thus part P 1 is made of points v 2 , v 3 , p 1 , ..., p k . To create part P 0 the same process happens by considering

Figure 4 .

 4 Figure 4.18| The further away xr from the design domain, the more aligned are the instantaneous directions of motion mp i .

Figure 4 .

 4 Figure 4.19| By carefully ordering the polyline points and the design domain vertices, parts P0 and P1 can easily be built.

Figure 4 .

 4 Figure 4.20| Each part Pi is created in what was P0 at the previous iteration.

  the cones of freedom in translation C t and counterclockwise and clockwise rotations C ccw r and C cw r of each created part are calculated. The vectors bounding the cones of translational freedom C t define the direction of translation of the base DBGs in translation. The cells of dimension 0 bounding (or resulting from the intersection of) the cones of rotational freedom C ccw r and C cw r constitute the centres of translation of the base DBGs in rotation. For each such identified motion, the corresponding base DBG is calculated, the computation being summed up in SECTiON 3.1.2.2. If the NDBG says that all base DBGs are strongly connected

Figure 4 .

 4 Figure 4.21| Workflow of the generation of an assembly made of N +1 parts.

■

  if the polyline must obey a rotation around a centre x r ∈ R 2 : the algorithm is similar to the translation case. The segments [p i , p i+1 ] of the polyline are ranked according to how orthogonal their normal vector is to the instantaneous directions of motion m pi , m pi+1 . Let t i denotes the unit tangent of segment [p i , p i+1 ] (oriented from p i to p i+1 ) and let j refers to both i and i + 1; the larger |t i • m pj | the closer is the segment from its snap position. If |t i • m pj | = 1 the segment has already snapped. Then again, the segments corresponding to the smallest (close to -1) and highest (close to 1) dot products are added to L. The list is completed with the n -2 segments with the largest |t i • m pj |.

Figure 4 .

 4 Figure 4.22| On the left the assembly is not interlocked. A small change in the geometry of P1 leads to an interlocking assembly on the right.

■Figure 4 .

 4 Figure 4.23| Left: the gap between two parts is bridged by links, in blue. Right: 2D shell elements of the parts are connected to the 1D beam element of the links.

Figure 4 .

 4 Figure 4.24| a) -links are grouped 3 by 3. b) -they can only transmit axial forces. c) -the resultant force must lie inside the friction cone. d) -load distribution and boundary conditions.

2 .Figure 4 .

 24 Figure 4.25| Depending on the situation, the diameter of a link stays constant, is decreased or increased.

Figure 4 .Figure 4 .

 44 Figure 4.26| Refining the mesh by adding up to ≃ 75% more faces does not significantly affect the 95% stress value.

Figure 4 .

 4 Figure 4.28|The friction angle has a predictable impact on the 95% stress.

FiGURE 4 .

 4 29 presents the experimental apparatus used to conduct the study: each assembly has black speckles sprayed over a layer of white paint. The left side of the assembly (part P 0 ) is clamped on a supporting frame by the means of two planks tightly enclosing the part. The right part (P 1 ) is pinned such that only vertical motion is possible; the rightmost metal rod prevents any rotation around the plane's normal axis

Figure 4 .

 4 Figure 4.29| The experimental apparatus.

Figure 4 .

 4 Figure 4.30| Left: our analysis of the forces in the links. Right: vertical deformation of the corresponding fabricated assembly: red indicates positive strains and thus tension, while blue indicates negative strains, i.e. compression. The two models are in qualitative agreement.

Figure 4 .

 4 Figure 4.31| Left: Karamba analysis of the forces in the links. Right: vertical deformation of the corresponding fabricated assembly. Issues and mismatches are circled in red.

1 Figure 4 .

 14 Figure 4.32| Most generated designs perform better than the reference.

1 Figure 4 .

 14 Figure 4.33| 39 out of 99 generated designs perform strictly better than the reference.

Figure 4 .

 4 Figure 4.34| An assembly and the C cw r (in red) of part P1 (in blue)

FiGURE 4 .

 4 FiGURE 4.34 shows a 2-parts assembly A = {P 0 , P 1 }, with P 1 (in blue) obeying a clockwise rotation around x r . The cone C cw r , shown in red, has been calculated and is compact enough to be displayed in the plane instead of projected onto the sphere. The grey lines depict the boundary of the half-planes encoded in the system A r x ≤ b. Two situations are zoomed upon on FiGURE 4.35: on the left the centre of rotation x is taken as a vertex of the cone C cw r ; on the right x is taken on an edge. Let us first study the left situation.

Figure 4 .

 4 Figure 4.35| Zooms on instantaneous directions of motion m(p, x), depending on whether x is a vertex of C cw r or on an edge.

  x r . Therefore there exists a subset of indices I xr such as one has the equality A Ix r x r = b Ix r . As illustrated on FiGURE 4.34, this system defines |I xr | lines that intersect in x r . The question that arises is "What happens to this system when we use the perturbed polyline points (p ϵ i ) i∈ 1,k to build the matrix A ϵ r and the vector b ϵ ?" where A ϵ r and b ϵ are built using the (p ϵ i ) i∈ 1,k in a similar fashion as A r and b are built with (p i ) i∈ 1,k , see SECTiON 3.1.1.2 for a definition. Let us focus on the subset of lines indexed by I xr . Because the p ϵ i are randomly shifted, in all generality one has

1 2

 1 |Ix r | , as expected.

Figure 4 .

 4 Figure 4.37| The probability that an imperfect design obeys the prescribed centre xr is upper-bounded by 1 2 n , with n = |Ix r |. The snap segments are in red.

Figure 4 .

 4 Figure 4.38| Heatmap of likelihood of obedience. In deep purple probability 0, in bright yellow, probability 1.

Figure 4 .

 4 Figure 4.39| Heatmaps of the likelihood of obedience for several ϵ.

Figure 4 .

 4 Figure 4.40| Heatmaps of likelihood of obedience for several ϵ after the opening of the cone through the snimp i ≥ α method.

SECTiON 4 .

 4 3.1 recalled the salient aspects of the cone of rotational freedom C r , for us to better understand what it means for a part to obey a point in this cone. It highlighted one crucial aspect of our work: vertices

Figure 4 .

 4 Figure 4.41| Heatmaps of the likelihood of obedience for several ϵ after the opening of the cone through the fake centre method.

Figure 4 .

 4 Figure 4.42| Parameter α gives an indirect control over the shape of the cone of rotational freedom Cr.

Figure 4 .

 4 Figure 4.43| Backlashes greatly expand the cones of freedom.

Figure 4 .

 4 Figure 4.44| By playing with the respective angles of the tenon and mortise we ensure that the backlash cone matches the perfect one.

Figure 4 .

 4 Figure 4.45| Illustration of the notations.

FiGURE 4 .

 4 FiGURE 4.45 illustrates the notations we have introduced: the red circle shows the set of possible location of point pi after a "rotation" of p i . Two cones are highlighted in red: they correspond to the set of positions on which pi is in the interior of P 0 , meaning that P1 collides with P 0 . Thus we want to avoid the x ∈ R 2 such that m(p i , x) is in the interior of one of the two cones. Assuming the rotation to be counterclockwise, this means that x cannot be in the cones obtained by rotating the ones shown on the figure by π 2 counterclockwise. We call these rotated cones the forbidden cones, noted ¡ C iδ for each vertex p i . Note that the forbidden cones only depend of the ratio δ = r ∆ . They are shown for all (p i ) i∈ 1,k on the inset. As seen on this figure, several cases may occur, ranging from ¡ C iδ = ∅ to ¡ C iδ is constituted of several cones.

Figure 4 .

 4 Figure 4.46| Several regions R δ , for various values of δ.

Figure 4 .

 4 Figure 4.47| Forbidden cones, averaged for various random positioning of a part with respect to the other, for δ = 1.1.

Figure 4 .

 4 Figure 4.48| Several regions R δ , for various values of δ.

Figure 4 .

 4 Figure 4.49| Two parametrisations of the same curve.

Figure 4 .

 4 Figure 4.50| Cartoon drawing of the orbit of a curve.

Figure 4 .

 4 Figure 4.51| Interpolation between two designs

FiGURE

  FiGURE 4.51 shows the decoding of regularly placed points on the geodesic α * , traced between the two

Figure 4 .

 4 Figure 4.52| While the separating polyline are similar in shape, their different orientation leads to dramatically different assemblies. To correct for the three invariances (in translation, scale and rotation) we consider an open curve, such as the one on the inset: the design domain is merged with the separating curve, and small segments near the extremities of the polyline are removed, to ensure that analysed curve stays open. Because the vertices of the design domain are at a fixed location and orientation in space, such an open curve encodes enough information to locate, scale and orient unequivocally the interpolated designs.

Figure 4 .

 4 Figure 4.53| The GPA slightly changes the shapes of the interpolated polylines.

1 Figure 4 .

 14 Figure 4.54| The interpolated designs behave similarly to each other. The normalisation is done by the reference design shown in red in FiGURE 4.33.

Figure 4 .

 4 Figure 4.55| Exploration of the variations between three traditional assemblies.

Figure 5 .

 5 Figure 5.1| This sections describes the process to find the unit dual quaternion encoding the screw motion mapping pseudo-P1 in its assembled pose (deep red) to pseudo-P1 in its disassembled pose (faint red).

  .3)) yields a satisfying result. APPENDiX D.1 shows that for any point s ∈ R 3 represented by the quaternion s = [0, s], and for any unit quaternion r = [cos α, v sin α] the quaternions rs and sr form an angle α with quaternion s. Moreover this transformation is distance-preserving: ||sr|| = ||rs|| = ||s||: it is thus a rotation. Multiplying s by r on the left means that the rotation happens in an anticlockwise manner about v to get rs and multiplying on the right means that the rotation is clockwise.

Figure 5 .

 5 Figure 5.2| Left: a cube. Right: the image of this cube through a rotation qpq * .

  are a convenient way to store a line in R 3 as a sextuplet [l, m] with l, m ∈ R 3 . Let us consider a line going through two distinct points p A and p B . A direction of the line is the obtained as the vector: l = p B -p A . The moment of the line is defined as m = p A × p B . Moment m is a vector normal to the plane defined by p A , p B and the origin o of R 3 and whose length is equal to twice the area of triangle op A p B . Note that m = p × l for any point p on the line. The tuple [l, m] defines a line

Figure 5 .

 5 Figure 5.4| A unit dual quaternion maps one box to the other.

Figure 5 .

 5 Figure 5.5| Two particles pA and pB.

Figure 5 .

 5 Figure 5.6| Instantaneous directions of motion for three different unit dual quaternions q.

Figure 5 .

 5 Figure 5.7| Smooth and discrete surfaces obeying a unit dual quaternion q.

Figure 5 .

 5 Figure 5.8| Given a solution x, the conical section {x1, x2, x3} is found by intersecting the cone in blue with the plane going through x and of normal x || x|| .

Figure 5 .

 5 Figure 5.9| Example of a calculation of a DBG.

Figure 5 .

 5 Figure 5.11| Process to better condition the mesh.

4. 1 . 2 )

 12 is executed: the goals are: ■ Every face f ∈ F must obey q.

Figure 5 .

 5 Figure 5.12| Top row: before conditioning the meshes. Bottom row: after.

Figure 5 .

 5 Figure 5.14| The normal vectors of M are visualised on G(M); each normal is associated with a triplet of instantaneous directions of motion.

Figure 5 .

 5 Figure 5.15| Three random snap faces do not reduce the cone of freedom to the prescribed direction of translation. face f C must depend of the other two snap faces f A and f B : the normal n fc must be chosen in the circular arc bounded by -n f A and -n f B , see FiGURE 5.16. Indeed, in such a case, only the north pole x t = e z and the south pole x t = -e z are solutions to

Figure 5 .

 5 Figure 5.17| Illustration of the algorithm to choose the next n -1 snap facevertex pairs.

Figure 5 .

 5 Figure 5.18| Faces are created so that the mesh tightly hangs to the design domain.

Figure 5 .

 5 Figure 5.19| The cube shall be split along the red curve.In two dimensions the winding number of a point p ∈ R 2 , w(p) ∈ Z, is a signed integer associated to a curve telling the number of times the curve wraps around p. For each counterclockwise (resp. clockwise) revolution w(p) is incremented (resp. decremented). In the discrete case, let (p i ) i∈ 1,k denote the points of the polyline, and let θ i be the signed angle between vectors (p i -p) and (p i+1 -p), see the inset. Then w(p)

■FiGURE 5 .

 5 FiGURE 5.20 shows on the bottom row the two sub-meshes obtained after executing the above algorithm for

Figure 5 .

 5 Figure 5.21| A 3D two-parts assembly and the disassembling trajectory.

Figure 5 .

 5 Figure 5.22| A 3D five-parts assembly.

Figure 5 .

 5 Figure 5.23| A disassembly sequence and the NDBG.

5. 6

 6 RELATIONSHIPS BETWEEN THE SNAP FACE-VERTEX PAIRS AND THE CONE OF FREEDOM OF MOTION 5.6.1 NUMBER OF SNAP FACES AND CONE OF FREEDOM

Figure 5 .

 5 Figure 5.24| The three kinds of vertex painted meshes used, and the three kinds of prescribed motions. The trajectory of the corner vertices of the mesh are shown in green.

Figure 5 .

 5 Figure 5.25| The cones of freedom shrink with the number of snaps.

Figure 5 .

 5 Figure 5.26| Projected unit generating rays. Scale is the same across all figures.

Figure 5 .

 5 Figure 5.27| The dotted black line represents a unit dual quaternion obtained by convex combination of the generating rays shown as the straight lines in shades of blue and red.

Figure 5 .

 5 Figure 5.28| Five independent realisations of a 1D Brownian motion.

Figure 5 .

 5 Figure 5.29| Right: exponentiated quadratic covariance matrix for a = σ = 1.Left: a cross-cut view of the kernel function κ(x, 0).

Figure 5 .

 5 Figure 5.30| Independent samplings f ∼ N (0, Σ) defined using the exponentiated quadratic kernel.

Figure 5 .

 5 Figure 5.32| Process to build the imperfections: each vertex is moved in the direction locally orthogonal to the mesh.

Figure 5 .

 5 Figure 5.33| Evolution of the likelihood of obedience of an imperfect mesh M ϵwith the number of pairs of snap face-vertex.

Figure 5 .

 5 Figure 5.34| See text for a description.

Figure 5 .

 5 Figure 5.35|The greater α, the larger the cone, and the greater P(q ∈ CMϵ ).For α ∈ [0.04, 0.05] the top left figure shows the probability that an imperfect mesh M ϵ obeys the prescribed q: it goes from ≃ 0 to 1. Top right: the greater α, the more rays generates the cones of freedom CMϵ . Bottom left and right respectively show that the area and volume of the 6D convex hull of the generating rays increase with α: the greater α the wider the cones.

6. 1 . 1

 11 NON DIRECTIONAL BLOCKING GRAPH -NDBGFor this dissertation to be self-contained, we wished to give to the reader a solid understanding of the theoretical modelling of the blocking relationships between parts in an assembly. While CHAPTER 3 does not present any finding, it sums up the state of the art on this subject. A Directional Blocking Graph, DBG, is a motion and a graph whose vertices correspond to the assembly's parts and a directed edge between two vertices indicates that one is being blocked by the other for a motion of infinitesimal magnitude. The concatenation of the DBGs for all possible motions given the Non Directional Blocking Graph, NDBG, which encapsulates the entire blocking relationships between the part. We understood that quite fortunately the assessment of the interlocking can be made by looking at a discrete and finite number of so-called base DBGs. The motions in these base DBGs corresponds

■

■

Figure A .

 A Figure A.2| Projection of a cartesian grid of edge length 1 2 .

  FiGURE B.2 the sequence [e 1 , e 2 , e 3 , e 4 , e 5 ] is a chain of cardinality 5 as e 1 = (1, 0) shares a common vertex with e 2 = (1, 2) which shares a common vertex with e 3 = (3, 1) etc.

Figure B .

 B Figure B.2|The sequence of arcs[e1, e2, e3, e4, e5] is a chain of cardinality 5.

FiGURE B. 2 ,

 2 FiGURE B.2, [e 4 , e 5 ] is a path of cardinality 2.

Figure B .

 B Figure B.4|A graph whose four strongly connected components are circled in red.

  ∆x < l i ||p i -x|| ≥ l i then |∆y| ≥ ||p i -x|| 1 -∆x li . Then: * Either ∆y ≥ ||p i -x|| 1 -∆x li in which case we proved that θ 4 < θ 1 . Moreover, by definition, θ 3 ≤ θ 4 and θ 1 ≤ θ 2 .Hence, in this situation, we have the resultθ 3 ≤ θ 4 < θ 1 ≤ θ 2 .* Or ∆y ≤ -||p i -x|| 1 -∆x li in which case we proved that θ 2 < θ 3 . Moreover, by definition, θ 3 ≤ θ 4 and θ 1 ≤ θ 2 . Hence, in this situation, we have the result θ 1 ≤ θ 2 < θ 3 ≤ θ 4 .

a 1 =

 1 ∆y -||p i -x|| ∆x a 2 = ∆y + ||p i -x|| ∆x a 3 = -∆y + ||p i -x|| 2 -l 2 i l i -∆x a 4 = -∆y -||p i -x|| 2 -l 2 i l i -∆x

2 i⇔≥0⇔ 2 i 2 ⇔

 222 x|| ∆x ⇔ (∆y -||p i -x||)(l i -∆x) < ∆x -∆y + ||p i -x|| 2 -l ∆yl i -||p i -x||(l i -∆x) ≥0 < ∆x ||p i -x|| 2 -l 2 i (∆yl i -||p i -x||(l i -∆x)) 2 < ∆x ||p i -x|| 2 -l 2||p i -x||l i >0 (||p i -x|| -∆y) >0 (l i -∆x) <0 < 0

2 ..

 2 If ∆y = 0:Remark that P (θ) = 0 ⇔ P (θ) ≡ l i (1 + cos θ) + 2∆y sin θ = 0Hence, P (θ) = 0 ⇔ θ = Let θ = 2 arctan -li2∆y . We first prove that whens = +1 ||p i+1 -x|| > ||p i -x|| and then that when s = -1 ||p i+1 -x|| < ||p i -x||: -If s = +1: ||p i+1 -x|| > ||p i -x|| ⇔ θ ∈    ] θ, π[ if ∆y > 0 ] -π, θ[ if ∆y < 0Note that the angular opening of these two cones is strictly greater than π. We prove that whatever the sign of ∆y such open cones contain the cone [θ 1 , θ 2 ] which is the cone in which the Turtle chooses a θ in such situation (see the (simplified) ENUMERATiON C.3). Below we demonstrate the following implication: θ ∈ [θ 1 , θ 2 ] =⇒ ||p i+1 -x|| > ||p i -x||.

  x|| -∆y > 0 always true By equivalence we have demonstrated the result looked for and so far we have proven that s = +1 and ∆y> 0 =⇒ θ < θ 1 < θ 2 < π, which means that θ ∈ [θ 1 , θ 2 ] =⇒ ||p i+1 -x|| > ||p i -x|| (b)If ∆y < 0:

θ 2 <

 2 θ ⇔ ||p i -x|| + ∆y > 0 always true By equivalence we have shown that s = +1 and ∆y< 0 =⇒ -π < θ 1 < θ 2 < θ which means that θ ∈ [θ 1 , θ 2 ] =⇒ ||p i+1 -x|| > ||p i -x||.We have proven that no matter the sign of ∆y, the cone [θ 1 , θ 2 ] is strictly contained in the open cone defined by θ0 and ±π. Hence, when s = +1, since the Turtle picks a θ ∈ [θ 1 , θ 2 ], we have that ||p i+1 -x|| > ||p i -x|| and thus the centre of rotation is repulsive.

3 .

 3 If s = -1: ||p i+1 -x|| < ||p i -x|| ⇔ θ ∈    ] θ, π[ if ∆y < 0 ] -π, θ[ if ∆y > 0Given that if ||p i -x|| < l i the Turtle cannot be in this situation when s = -1 we just need to look at the case ||p i -x|| ≥ l i . For ∆x = li 2 , s = +1 and ||p i -x|| ≥ l i then s(l i -∆x) > 0 and s∆x > 0 and, according to the ENUMERATiON C.3, the only cone in which the Turtle picksan angle is [θ 3 , θ 4 ]. So we want to demonstrate that θ < θ 3 < θ 4 < π if ∆y < 0 and -π < θ 3 < θ 4 < θ if ∆y > 0 so as to imply that θ ∈ [θ 3 , θ 4 ] =⇒ ||p i+1 -x|| < ||p i -x||.First we prove the following inequality:

2 i 2 > 2 i⇔ 2 i 2 > 4 2 2 2 i⇔

 22222422 2||p i -x|| 2 -l 2 i > 2|∆y| ||p i -x|| 2 -⇔ 2||p i -x|| 2 -l 4∆y 2 ||p i -x|| 2 -l 2||p i -x|| 2 -l ||p i -x|| 2 -l i ||p i -x|| 2 -l (l i ||p i -x||) 2 > 0 always trueAs outlined, the latest inequality shows that by equivalence (⋆) is true.

[θ 3 * 2 =

 32 , θ 4 ], [θ 1 , θ 2 ] and [θ 5 , θ 6] are all centered around the same value (which also show that the complementary intervals [-π, θ i ] ∪ [θ j , π] are also centered around the same value). Then we prove that the angular opening of the interval of interest (for instance θ 4 -θ 3 if the interval is[θ 3 , θ 4 ]) is strictly less than the angular opening of the intervals bounded by θ 5 and θ 6 . We then use the fact that having two cones centered around the same value such that the angular opening of one is strictly less than the one of the other essentially means that one of the cone is strictly contained in the other. In other words this will show for instance that   [θ 3 , θ 4 ] ⊂ [θ 5 , θ 6 ] θ ∈ [θ 5 , θ 6 ] =⇒ P < 0 =⇒ x is attractive when the Turtle chooses θ ∈ [θ 3 , θ 4 ] Proof that [θ 3 , θ 4 ], [θ 1 , θ 2 ]and [θ 5 , θ 6 ] are all centered around the same value* Middle value of [θ 1 , θ 2 ]. Let a 3,4 be such that θ 3,4 = 2 arctan a 3,4 , i.e. a 3,4 = ∆y±||pi-x|| ∆x tan θ 2 + θ 1 2 = tan (arctan a 3 + arctan a 4 ) Middle value of [θ 3 , θ 4 ]. The exact same reasoning as above yield: and so that the cones [θ 3 , θ 4 ], [θ 4 , θ 1 ] and [θ 5 , θ 6 ] are all centered around 2 arctan ∆y ∆x . We now prove that depending on the value of s the cone [θ 5 , θ 6 ] or [-π, θ 5 ]∪[θ 6 , π] contains the cone [θ i , θ i+1 ] or [-π, θ i ]∪[θ i+1 , π] for i ∈ {1, 3}.

Figure C .

 C Figure C.2| Situation when s = -1 and l i 2 < ∆x < li: see FiGURE C.1 for a caption. The point is that the Turtle moves towards x.

Figure C .

 C Figure C.3| Situation when s = -1 and ∆x > li: see FiGURE C.1 for a caption.The point is that the Turtle moves towards x.

Figure C . 1

 C1 Figure C.4| Situation when s = +1 and ∆x > li: see FiGURE C.1 for a caption.The point is that the Turtle moves away from x.

2 =

 2 (q • p) 2 sin 2 θ + ||p|| 2 cos 2 θ + ||q|| 2 ||p|| 2 -(q • p) 2 sin 2 θ = ||p|| 2 cos 2 θ + ||p|| 2 sin 2 θ using ||q|| = 1 = ||p|| 2

2 = ||p|| 2 cos θ ||p|| 2 =

 22 cos θ We do have α = θ and because we had ||qp|| = ||p|| what we end up with is a quaternion qp at the same distance to the origin as the quaternion p and both of them are forming an angle θ between each other.

Figure D .

 D Figure D.1| Left: a cube. Right: the image of this cube through a rotation qp.

  Figure D.2| What we see, versus what the 2D creatures sees.

Figure D .

 D Figure D.3| In the background is the stereographic projection of the unit sphere. The circle in blue represents the original equator now rotated. The circle in orange depicts this equator under a stereographic projection onto the XY plane.

Figure D .

 D Figure D.4| Stereographic projection and its effect on the equator of rotated spheres.

3 3 (

 33 be a point that shall be rotated about an axis u = with ||u|| = 1) through an angle θ ∈ [-π, π[ in a clockwise manner. Let p = [0,

p r = qpq * D. 2 = 1 - 4 0 2s 2 2 2 = 2 = 2 = ||p|| 2

 2140222222 [c, su][0, p][c, -su] = [-su • p, cp + su × p][c, -su] = [-scu • p -(cp + su × p) • (-su), (-su • p)(-su) + c(cp+ su × p) + (cp + su × p) × (-su)] = [0, s 2 (u • p)u + c 2 p + scu × p -csp × u -s 2 (u × p) × u] = [0, s 2 (u • p)u + c 2 p + 2scu × p + s 2 u × (u × p)] = [0, s 2 (u • p)u + c 2 p + 2scu × p + s 2 u(u • p) -p(u • u) ] = [0, 2s 2 (u • p)u + c 2 p -s 2 p||u|| 2 + 2sc(u × p)] = [0, 2s 2 (u • p)u + (c 2 -s 2 )p + 2sc(u × p)] cos θ)(u • p)u + cos θp + sin θ(u × p)] D.The scalar part of p r is equal to zero: we can safely interpret the imaginary part as the coordinates of apoint p r = 2s 2 (u • p)u + (c 2 -s 2 )p + 2scu × p ∈ R 3 : p r = [0, p r ].We must now prove that ||p r || = ||p|| and that the angle between p r and p is θ.||p r || 2 =   (u • p)u + (c 2 -s 2 )p + 2scu × p (u • p)u + (c 2 -s 2 )p + 2scu × p   = 4s 4 (u • p) 2 + 2s 2 (c 2 -s 2 )(u • p) 2 + 0 + 2s 2 (c 2 -s 2 )(u • p) 2 + (c 2 -s 2 ) 2 ||p|| 2 + 0 + 0 + 0 + 4s 2 c 2 (u × p) • (u × p) = 4s 2 c 2 (u • p) 2 + (c 2 -s 2 ) 2 ||p|| 2 + 4s 2 c 2 (u • u)(p • p) -(u • p)(p • u) = (c 2 -s 2 ) 2 ||p|| 2 + 4s2 c 2 ||u|| 2 ||p|| (cos 2 θ + sin 2 θ)||p|| Using ||p|| = ||p|| we prove that ||p r || = ||p|| Now for the angle. Let us recall that for any two vectors p ∈ R d and u ∈ R d , d ≥ 2, one can decompose p into two vectors p ∥ = (u • p)u and p ⊥ = p -(u • p)u that are respectively the collinear and orthogonalcomponents of p with respect to u. Rotating p about u through an angle θ is the same as rotating p ⊥ in the plane whose normal is u through θ and then adding p ∥ . That means, in our case, that it is enough to check that the angle between p r ⊥ and p ⊥ is θ to prove that the quaternions p r and p form an angle θ in R 4 . First, we show that p r ∥ = p ∥ :p r ∥ = (u • p r )u = 2s 2 (u • p)||u|| 2 + (c 2 -s 2 )(p • u) + 0 u = (c 2 + s 2 )u • p u = (u • p)u = p ∥This result is expected: because p is rotated about u, the collinear components p ∥ and p r ∥ are the same. It implies that ||p r ⊥ || = ||p ⊥ || to keep the norm of the rotated vector constant (which is consistent with the fact that we focus on rotating p ⊥ only, which keeps its length constant). We now compute that the angle between p r ⊥ and p ⊥ :p r ⊥ • p ⊥ ||p r ⊥ ||||p ⊥ || = (p r -p r ∥ ) • p ⊥ ||p ⊥ || 2 = p r -(u • p)u) • p ⊥ ||p ⊥ || 2 = (2s2 -1)(u • p)u + (c 2 -s 2 )p + 2sc(u × p) • p ⊥ ||p ⊥ || 2 = (-cos θ(u • p)u + cos θp + sin θ(u × p) • p ⊥ ||p ⊥ || 2 = (p -(u • p)u) cos θ + sin θ(u × p) • p ⊥ ||p ⊥ || 2 = (p ⊥ • p ⊥ ) cos θ + 0 ||p ⊥ || 2

  cos(a + ϵb) = cos a -ϵb sin a sin(a + ϵb) = sin a + ϵb cos a To that end recall that for all x: Hence for a pure dual number x = ϵx, since ϵ n = 0 when n > 1 one has: + ϵb) = cos(a) cos(ϵb) -sin(a) sin(ϵb) = cos a -ϵb sin a sin(a + ϵb) = sin(a) cos(ϵb) + sin(ϵb) cos(a) = sin a + ϵb cos a In a more general setting, by extending the definition of Taylor series to functions of dual numbers, it naturally follows that f (a + ϵb) = f (a) + ϵbf ′ (a). Back to our dual quaternion: st • u, ct + st × u]

  Finally it is also possible to combine kernels. Here we define a damped periodic kernel by multiplying a periodic kernel with and exponentiated quadratic one:κ(x, y) = a 2 exp -p = 1, p = 1, l = 0

  The simplest joint of all is the butt-joint, FiGURE 2.2a. It consists of two pieces of wood laid together without any real interlocking. The edge-halved scarf FiGURE 2.2b is also quite basic. It admits two variations obtained by rotating negatively, FiGURE 2.2c, and positively, FiGURE 2.2d, the cut line parallel to the grain of the wood. Note that contrary to

FiGURE 2.2c, FiGURE 2.2d may withstand a limited amount of tension. A first kind of tenon joint is presented on FiGURE

  1 of the graph: if the graph is strongly connected then every part is blocked by another. If not, then it can be decomposed into strongly connected components (possibly reduced to a single vertex) where at least one component has no outgoing arc and, as such, the corresponding subassembly obeys x. For instance, on FiGURE 3.14 (where motions are restricted to translation, for illustrative simplicity), the cones of translational freedom C t,i of part P i , i ∈ {1, 2}, are shown on the left; both are reduced to single directions, x 1 and x 2 . Top row: the DBG associated with the horizontal direction of translation, G(x 1 , A) has two strongly connected components that are colour-coded: {P 1 } in red and {P 0 , P 2 } in blue. Indeed, starting from P 1 one cannot reach any other node but P 1 while following the arcs' orientation and, similarly, if one starts from any node in {P 0 , P 2 }, one can only go back and forth between these two nodes. As no edge starts from P 1 , it is not blocked by any other node and hence it obeys x 1 . On the

	top row still, DBG G(x 2 , A) is strongly connected: its strongly connected component is {P 0 , P 1 , P 2 } as one
	can convince oneself by walking from any node to any other. Thus every part is blocked by another and the

  the segments that must snap are given. Note that I contains at least two elements: |I| ≥ 2. SECTiON 4.1.3.2 deals with the relevant strategies to compute such set I. The constraint to implement is

simply ∀i ∈ I, n i • x = 0. Let o be the index such that X[o + 2i] and X[o + 2i + 1] map to the coordinates n ix and n iy of n i . For i ∈ I, let:

  the closer is the segment from its snap position. If |t i • x t | = 1 the segment has already snapped. These dot products are sorted and the two segments with the lowest (closest to -1) and highest (closest to 1) values are added to the list L. It ensures that at least two segments snap opposite to each other: one snaps to be oriented along +x t (or ±x A t ) and the other snaps to be along -x t (or ∓x B t ), a necessary and sufficient condition for the assembly to obey x (or the cone x A t and x B t ) as seen inSECTiON 4.1.1.3 and illustrated on FiGURE 3.4. The n -2 following snap segments are added to L according to how close to 1 is |t i • n i |, without considering a positive or negative orientation.

  a 1Proof. We assume that ∆y ≥ ||p i -x|| 1 -∆x li , i.e. that ∆yl i -||p i -x||(l i -∆x) ≥ 0. We prove a 4 < a 1 by equivalence:a 4 < a 1 ⇔ -∆y + ||p i -x|| 2 -l 2

	(b)	Then that:
			∆y ≤ -||p i -x|| 1 -	∆x l i	=⇒ a 2 < a 3
	(c)	And lastly that:
		  	0 < ∆x < l i ||p i -x|| ≥ l i	=⇒ |∆y| ≥ ||p i -x|| 1 -	∆x l i
	Let's dive in!
	(a)	∆y ≥ ||p i -x|| 1 -∆x li	=⇒ a 4 < a 1 :

i l i -∆x < ∆y -||p i -x|| ∆x ⇔ -∆y∆x + ∆x ||p i -x|| 2 -l 2 i < (∆y -||p i -x||)(l i -∆x)

  Proof. The demonstration is similar as the one above: assume ∆y ≤ -||p i -x|| 1 -∆x li , i.e. ∆yl i + ||p i -x||(l i -∆x) ≤ 0. By equivalence: a 2 < a 3 ⇔ ∆y + ||p i -x|| ∆x < -∆y -||p i -x|| 2 -l 2

b) ∆y ≤ -||p i -x|| 1 -∆x li =⇒ a 2 < a 3 : i l i -∆x ⇔ (∆y + ||p i -x||)(l i -∆x) < ∆x -∆y -||p i -x|| 2 -l 2 i ⇔ ∆x ||p i -x|| 2 -l 2 i ≥0 < -∆yl i -||p i -x||(l i -∆x) ≥0 ⇔ ∆x ||p i -x|| 2 -l 2 i 2 < (-∆yl i -||p i -x||(l i -∆x)) 2 ⇔ 2||p i -x||l i >0 (||p i -x|| + ∆y) >0 (l i -∆x) >0 > 0

  The dual part of q is:

	us + ϵ	ρ 2	(tc + t × us) = us + ϵ = s + ϵ	ρ 2 ρ 2	((t -(t • u)u + (t • u)u)c + t × us) (t • u)c u + ϵ ρ 2 ((t -(t • u)u)c + t × us)
			= sin	θ 2	u + ϵ	ρ 2	((t -(t • u)u)c + t × us)

That being said, the most ecological edifice is the non-built one. A balance must be found between planetary limits and human needs, desires and hubris.

Operated by the same families for 52 and 46 generations!

That cannot be disassembled.

Joints created by the complementary shapes of parts in contact.

Impossible to (dis)assemble

Informally speaking, a directed graph is strongly connected if one can walk along a path respecting the orientation of the edges between any couple of vertices (P i , P j ). See APPENDiX B for a rigorous definition.

A fairness energy is also used in the paper, but we do not present it here as such energy will not be used to generate assemblies.

A point and an orthonormal basis in R

so [θ 3 , θ 4 ] or [θ 1 , θ

] or[-π, θ

] ∪ [θ

, π] or [-π, θ 1 ] ∪ [θ 2 ,π] depending on the value of ∆x, ∆y, l i and s

Figure F.3| See text for a description.

Increasing the number of snap segments, be it by strategy 1 or strategy 2, is a conceptually cheap method to reduce the actual cone of rotational freedom to the user-prescribed centre of rotation, thus making the enumeration of the base DBGs short and brief, and the assessment of the interlocking of an assembly more direct. Note that strategy 2 barely changes the shape of the polyline: on each row i of FiGURE 4.36, the design at (row i, column 0) closely looks like the design at (row i, column 2). # snap segments (strategy 1) 0 1 2 # snap subdivision (strategy 2) up to a scalar multiplication [λl, λm] with λ = 0. Ensuring ||l|| = 1 and l • m = 0 reduces the number of degree of freedom from 6 to 4, i.e. exactly the number of degree of freedom of a 3D line, which shows that the Plücker coordinates [l, m] uniquely defines a line.

We have thus shown that the line given by the Plücker coordinates [l, m] such that ||l|| = 1 and l • m = 0 goes through point l × m with orientation l. Note also that when ||l|| = 1 then ||p ⊥ || = ||m||. 5.1.8.4 Unit dual quaternions and Plücker coordinates APPENDiX D.2 proves that for a unit dual quaternion q written in the form q = [cos θ 2 , û sin θ 2 ] with θ = θ 0 +ϵθ ϵ and û = u 0 + ϵu ϵ , then the tuple [u 0 , u ϵ ] defines the Plücker coordinates of a line:

are the Plücker coordinates of a line 5.1.8.5 But where is the screw motion ?

Remember that for a point p ∈ R 3 represented by the dual quaternion p = 1 + ϵp where p is the quaternion [0, p] and a unit dual quaternion q = q 0 + ϵ 2 tq 0 (with t and q 0 quaternions) we saw on EQUATiON (5.11e) that:

The transformed dual quaternion p can be interpreted as a point in R 3 (it is in the form 1 + ϵp where p is a quaternion with a 0 scalar part: p = [0, p], p ∈ R 3 . p can be decomposed in to parts: q 0 pq * 0 on the one hand and t and the other. Bearing in mind SECTiON 5.1.4, the first part is interpreted as the quaternion p = [0, p] rotated by the quaternion q 0 around an axis going through the origin of R 3 ; the second part t is merely a

CREATING A 2-PARTS ASSEMBLY

Given a design domain, which throughout this section will be a cube of unit length centred at the origin of R 3 , this section aims at understanding how it can be partitioned into two polyhedral parts, P 0 and P 1 , with P 1 obeying a user-given unit dual quaternion q. Even though, or perhaps because, screw motions encode all rigid body motions, they are not especially easy to visualise. To help the user specify a unit dual quaternion q, he/she may wish to partition the design domain in two pseudo-parts of approximate shape: on FiGURE 5.10 the design domain is cut in two by a plane. Pseudo-P 0 is in blue and pseudo-P 1 in red. Then, the user may either play with the parameters u 0 , u ϵ and θ (with θ 0 = cos θ and θ ϵ = sin θ) and see where it leads pseudo-P 1 after a motion of finite magnitude along q, or it can move pseudo-P 1 in space in an arbitrary position and location and automatically compute q afterwards, using the equations outlined in SECTiON 5.1.8.6. On FiGURE 5.10 the screw axis is the black line, the trajectory followed by P 1 is depicted with the red curve, the instantaneous directions of motion of the visible vertices of P 1 are shown using red arrows, and the resting position of P 1 used to compute q is the body in faint red.

INPUT

Once satisfied with q and with the approximate shapes of the parts, a planar triangular mesh is generated in the design domain on the separating plane. At this step there are two options:

■

The user manually deforms the mesh by vertex painting: some vertices are moved (up or down) in a direction orthogonal to the plane. The user can also deform the mesh by any other mean.

■

The mesh may be deformed (in an orthogonal direction to the plane) using "organic" noise applied on the vertices. Purely random noise (each vertex is moved randomly independently from the others) yields dull and uninteresting meshes, whereas correlating the out-of-plane motion among neighbouring vertices gives a qualitatively much more pleasant mesh. The current implementation of this algorithm uses Perlin noise.

(SECTiON 3.1.1). In rotation there is no minimal number of snap segments, we understood that it depends on the geometry of the separating polyline.

In 3D, if we are looking at pure translations only, then we state that the minimal number of snap faces is three: as illustrated on FiGURE 5.13 the locus of all directions of translation in 3D is the unit sphere S 2 . Each snap face of an assembly (highlighted in red) defines a hemisphere of valid directions of translation, encoded by n f • x t ≥ 0 (where x t ∈ S 2 is a direction of translation in 3D), and the cone of translational freedom is found by intersecting the hemispheres between them. One needs at least three snap faces to reduce the cone of freedom to two antipodal points, shown in blue and red on the figure, and one non-snap face to cull one of the two directions, leaving the cone reduced to a single direction of translation (the red point if we are considering the upper part, the blue one if we are considering the lower part). This small study gives us a lower bound of the number of snap faces: in the general case where q does not encode a pure translation, the minimum number of snap faces is thus three. Therefore, let n ≥ 3 be the number of snap faces prescribed by the user. This section explains how the snap faces and snap vertices are chosen.

Let G(M) be the Gauss map of mesh M = (V, E, F ): it consists of the constellation of normal vectors (n f ) f ∈F seen as points on the unit sphere S 2 ⊂ R 3 . The mesh being triangular, to each face f = {v i , v j , v k } are associated the three instantaneous directions of motion (m vi , m vj , m v k ). As shown on FiGURE 5.14 they can be visualised on the Gauss map as three vectors rooted in each n f .

Having f to snap means that there is a v ∈ {v i , v j , v k } whose instantaneous direction of motion is such that m v • n f = 0: it is contained in the tangent plane at n f of the sphere. Intuitively it means that when disassembling the part, vertex v slides on the other part. This gives an immediate choice for the first snap face/vertex: of all faces in F , we select the one with a m v the closest to being in the tangent plane:

To select for the next n -1 snap faces, we cannot simply go and select the n -1 face-vertex pair with the smallest |m v • n f |. To understand why, let us go back to the pure 3D translation case.

5.4.3.3

Where to snap in the pure translation case

Assume we want to partition the design domain into two parts such that P 1 obeys a vertical upwards (pure) translation. We cannot simply choose three random snap faces to reduce the cone of freedom to the north where the direction of translation x t is the instantaneous direction of motion m v for any vertex v belonging to the three faces. The south pole -e z is culled from the cone by any other non-snap face. We remark that evenly distributing (each at an angle 2π 3 from the others) the normal vectors n f A , n f b and n fc on the equator solves the problem. It is the strategy we choose to implement to select the snap face-vertex pairs in the general case. v∈V m v be the average direction of motion of all mesh vertices, and let C be the unit circle of normal m. We could have calculated m in a more sophisticated manner, for instance by weighting each vertex with the areas of its adjacent faces, but as we will understand, the exact value of m matters not.

The algorithm to find the next n-1 snap face-vertex pairs is as follows. Assume the first snap face-vertex pair has been chosen (see SECTiON 5.4.3.2), labelled f 1 and v f1 . Let p 1 ∈ C be the closest point from n f1 on C. Starting from p 1 , points p 2 , . . . , p n are evenly distributed on C, each at an angle 2π n from the previous. Then, for each p i (2 ≤ i ≤ n), we find its closest point n fi ∈ G(M). The faces (f i ) i∈ 2,n so designed are the n -1 remaining snap faces of the mesh. To select for the associated snap vertices (v fi ) i∈ 2,n we simply take among the three vertices defining f i the v fi such that m v f i • n fi is the closest to 0. This algorithm is illustrated on FiGURE 5.17 The exact value of m matters very little: even though, as often in discrete geometry, there are several reasonable ways to define this average direction, they would all define directions close to each other. Circle C would only change by a small amount from one definition to another, and the (n fi ) i∈ 1,n chosen would perhaps vary, but would still be well spread around the sphere, which is what matters to define the snap face-vertex pairs. APPENDIX A

STEREOGRAPHIC PROJECTION

A.1 INTUITION

The stereographic projection is a conformal transformation mapping a sphere to a plane. It is defined and smooth on the entire sphere except at one particular point, the projection point. Geometrically speaking, a line is drawn between the projection point and any other point on the sphere. The intersection of this line and the plane define the projection of that point. In this manuscript, R 3 is equipped with its usual cartesian frame (e x , e y , e z ); the north pole refers to the point e z = 0, 0, 1 T . In this manuscript the projection point is defined as the north pole, as illustrated on FiGURE A.1.

Figure A.1|

The stereographic projection maps points on the sphere (in blue) to points in the plane (in red).

With such stereographic projection, points on the southern hemisphere are mapped inside the unit disk, the equator is mapped to itself, and the northern hemisphere is mapped to the rest of R 2 .

A.2 DEFINITION

Formally speaking:

■ Let S 2 be the unit sphere in R 3 :

GRAPHS

Most of the contents of this appendix come from [START_REF] Kunic | Design and assembly automation of the Robotic Reversible Timber Beam[END_REF].

B.1 DEFINITIONS

At the most fundamental level a graph is a discrete mathematical structure aimed at representing objects such that some pairs are, in some sense, related. These objects are represented by vertices (often called nodes). A graph may be: Formally, if v p and v q are two related vertices, e = (v p , v q ) is an edge when the order of the pair does not matter, an arc otherwise. Often a graph is called G = (V, E) with V the set of vertices and E the set of edges/arcs: e = (v p , v q ) ∈ E, v p , v q ∈ V . From now on, only directed graphs will be considered as an undirected graph can simply be obtained from a directed one by "forgetting" the arcs' orientation. A vertex in V of index p will be denoted v p and the i th arc of E from vertex v p to vertex v q will be denoted e i = (v p , v q ).

B.2 CONNECTIVITY Let

2 + 2∆y tan θ 2 + l + ∆x And we have the equivalence:

Several cases must be studied:

P is constant and positive, hence:

Hence:

P has no real roots but we can derive the following equations:

-If ||x i -x|| ≥ l i , P admits two real roots θ 3 and θ 4 such that:

And, assuming θ 3 < θ 4 (otherwise switch them), we have the equivalence:

Summing up: When the right hand side is defined let:

C.2 A PRÉVERT-STYLE ENUMERATION OF CASES

Following the definition of the critical angles θ 0,1,2,3,4 in SECTiON C.1 regarding the Turtle in rotation, the crossing of the solution sets of the two inequalities of the system

leads to a Prévert-style enumeration of cases.

1.

If l i = ∆x:

(a) If ∆y = 0:

In a nutshell, we have successfully shown that:

Now that we have discussed the ordering of the (θ i ) i∈ 1,4 which depends on the position of ∆x with respect to 0 and l i we can shed further light on the intervals in which the Turtle can choose a θ to orient itself. This section treats the case where ||p i -x|| ≥ l i and ∆x = 0.

If s = -1 then ∆x < 0 to comply with both s∆x > 0 and s(l i -∆x) < 0. Using the definition of the θ i provided in iTEM 1 we have

Using the definition of the θ i provided in iTEM 3 we have

In both case (s = +1 and s = -1) we have that θ 1 ≤ θ 4 and so, referring to the enumeration, the Turtle always finds an angle θ to orient itself:

The Turtle cannot enter this condition when s = +1 (otherwise it would mean that ∆x < 0 and ∆x > l i ). Hence for s = -1 the Turtle is brought here when 0 < ∆x < l i . In which case, with the definition of the θ i provided iTEM 2 we have:

We can now see that two of the four cases enumerated are impossible. We can also see that the two remaining cases yield the same result:

], but as we proved that this case is only possible when

, but as we proved that this case is only possible when

Hence when the Turtle is brought here it must choose

The Turtle cannot enter this condition when s = -1; when s = +1 the Turtle is brought here when 0 < ∆x < l i . In which case, with the definition of the θ i provided iTEM 2 we have:

We can now see that two of the four cases enumerated are impossible. We can also see that the two remaining cases yield the same result:

• We wrote : if θ 1 ≤ θ 3 and θ 2 < θ 4 then θ ∈ [θ 1 , min(θ 2 , θ 3 )], but as we proved that this case is only possible when θ 1 ≤ θ 2 < θ 3 ≤ θ 4 we now realize that θ ∈ [θ 1 , θ 2 ].

•

We wrote : if θ 3 < θ 1 and θ 4 ≤ θ 2 then θ ∈ [max(θ 1 , θ 4 ), θ 2 ], but as we proved that this case is only possible when

Hence when the Turtle is brought here it must choose

Using the definition of the θ i provided in iTEM 3 we have

Using the definition of the θ i provided in iTEM 1 we have

In both case we have max(θ 3 , θ 1 ) ≤ min(θ 4 , θ 2 ). Hence, referring to the enumeration provided above we see that one of the two cases is impossible and when the Turtle is brought here it must choose:

This appendix helps us refine the long enumeration of SECTiON C.2 into a greatly simplified version presented below. Also, the intervals where ±π appeared were left open to ensure than x → tan(x) was defined. Yet, it can be verified that the passage to the limit still defines our expressions: the intervals can be closed.

AND REPULSIVE WHEN s = +1

We now prove that the centre of rotation x acts as a repulsive (resp. attractive) point when s = +1 (resp. Recall that ∆x = x i -x and ∆y = y i -y. In the following, we assume l i to be known and fixed.

And we have the equivalence:

Several cases must be studied:

and:

Since (⋆) is true, so is θ 4 < θ and we have proven what we wished for when ∆y < 0.

We have proven that no matter the sign of ∆y the cone We have shown that if l i = 2∆x then the Turtle gets away from x when s = +1 and is drawn to it when s = -1.

■

If l i -2∆x = 0:

Then ∆ < 0 and P does not have real roots. Note that in such case we have in particular that ||p i -x|| < l i and so the Turtle cannot be here when s = -1. We can derive the following implications:

We have just proven that x is repulsive when ∆ < 0 (and s = +1, the only case possible here),

i.e. when ||p i -x|| < li 2 then P > 0, which implies ||p i+1 -x|| > ||p i -x|| and the Turtle moves away from x.

-

If ||p i -x|| ≥ li 2 P admits two real roots:

assume here that ||p i -x|| ≥ l i . Looking at ENUMERATiON C.3 we see that the only intervals that we must look to are either

. Also we subdivide R in three regions: ∆x < li 2 ; li 2 < ∆x < l i and ∆x > l i . Before investigating each of these parts we prove the following result:

Where for the record:

To prove (⋆) we are going to prove tan

. Since the function x → 2 arctan x is strictly increasing on R we will have proven the result wanted. For the sake of readability, let h = ∆x li , u = ∆y li and a

If s = +1

We could prove in this case that the Turtle moves away from x by calculation, as we did when s = +1 but simply we observe the following: the cone In this appendix we have successfully proved that no matter the relative position of p i with respect to x Since this system is trivially met when sin θ0 2 = 0 we assume it is not the case. We first prove that ||q 0 || = 1 ⇔ ||u 0 || = 1:

We have proven in this section that a unit dual quaternion contains the information about a unique line whose orientation is u 0 and going through the point u 0 × u ϵ : The exponentiated quadratic kernel is given by:

The greater σ the more correlated are far away random variables, as shown on FiGURE E.2. The amplitude parameter a simply scales the functions. (3 or less), the cones of freedom of the imperfect meshes C M ϵ vary wildly: there is a relatively high spread of the values of the three measured metrics. For more than 3 snaps, the variation is of much lower magnitude, implying that even the imperfect meshes all have a rather small cone of freedom.

These three figures, combined with FiGURE 5.34, show that the evolution of the shape of the cones C M ϵ greatly depends on the geometrical features of the perfect mesh M. While the cones abruptly shrink in size for the mesh with four dents on FiGURE F.1 and the random one on F.3, the shrinking is slower of the meshes with one and two dents on FiGURES 5.34, F.2. This difference in behaviour imply that we cannot give any

guidelines on what should be the number of face-vertex pairs prescribed to snap to reduce the cones to a small size: it depends too much on the geometry of the mesh.

On FiGURE F.1, the prescribed q encodes a vertical screw motion, shown on the right of FiGURE 5.24.

On FiGURE F.2, the prescribed q encodes a pure rotation, shown on the left of FiGURE 5.24.

On FiGURE F.3, the prescribed q encodes a pure rotation, shown on the left of FiGURE 5.24. The mesh was randomly initialised.