フェイシャルキャプチャ― in Houdini

この記事は[Houdiniアドベントカレンダー2021](https://qiita.com/advent-calendar/2021/houdini) １日目の記事です。

![uwaaaa.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/68691d3b-25ae-5f2a-2f43-b4257b532d84.gif)

Houdini19がリリースされ、KineFXの強化や待ちに待ったMuscle機能など盛りだくさん！！Houdini最高！！　しかし、仕事が多忙だったことと、諸事情により新機能まで辿り着くことが出来ませんでした。くやしい…
そこで、この記事ではその過程で学んだ通信手法や気になった点などをまとめて執筆します。

### この記事の内容

- TCPでフェイシャルキャプチャー（iPhone X Face Motion Capture を参考に）
- UDPでフェイシャルキャプチャー（zigsim）間に合わなかったため後程追記します
- TCPとUDP
- まとめ

## 経緯
　昨年のKineFXの記事の続編としてキャラクターのHoudiniでのフェイシャル周りの整備を進めようと調査を行っていたのですが、どうにも上手い手法が思い浮かばない。試行錯誤も行き詰まり、何か良い手法は無いかと探していました。

Houdiniのフェイシャルとして先行している方の事例としては

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/ca3a050f-1210-0052-83d0-3a2a8db0d981.png)
https://www.rokandic.com/facial-rigging-in-houdini

rokさんが有名でパトロンになればチュートリアルを見ることができます。
※モーフィング含め凄いです

また、2017年当時非常に話題となった台湾のElisha Hungさんの事例でiPhone X Face Motion Captureというものもあります。
https://mur.elihung.com/iphone-x-face-tracking-capture-houdini/#more
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/a9de1089-6d3a-6f67-116e-a50169a33959.png)

https://vimeo.com/242626624

こちらの事例ではコードがgithub
https://github.com/elishahung/FaceCaptureX
に公開されているので、これはもしかしたら何かヒントになるかもしれないと、動作を見ていくことにしました。
この選択が、幸か不幸かTCP/IPの基礎を学びなおすきっかけとなりました。
ネットワークエンジニアの方にとっては、当たり前の事ばかりの記事かもしれませんがご容赦下さい。

# iPhone X Face Motion Capture 

まずはGithubからcloneします。
https://github.com/elishahung/FaceCaptureX.git
※gitを入れていない場合はzipでダウンロードでもよいです。

プロジェクトファイルの中身を見ると３つのディレクトリがあり、上の2つがSwift用、Serverがhipと顔のベースモデルとなるbegeoファイルになります。

![名称未設定-1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/41c5d493-90be-dcb8-6a67-cbbcc9292233.png)

xcodeproj（Xcodeプロジェクトデータファイル）があるところで、お察しの通りMacのXcodeでビルドする必要があるため、WindowsやLinuxしか持っていない場合は実際に動作させるのは諦めてください。（こればっかりはどうしようもない）

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/cefaa7ff-bc4e-fe25-2997-bd1b2467fda9.png)

このアプリはキャプチャを行うと顔のデータを取得し、取得したデータをパケットで送信するアプリです。
少し前に作られたプロジェクトのため、少しアラームが出ましたが、

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/dc241f4f-b1d5-5a35-af91-e58518b6992b.png)

そのままXcode13、iOS15へのビルドは問題なく行うことが出来ました。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/3f302542-58c1-1ae9-bca2-25f1cde4f617.png)

画面はこのようなものになっており、2種類のモード
- Stream
- Record

があります。Streamは顔の形状のみの取得で
Recordはテクスチャを含むようです。Recordのデータの取り出しはまだ未検証です。

※そういう意味では、完全にリアルタイムでテクスチャ込みの自分の顔を完全に再現するシーンではないので、注意が必要です。

Streamでは i マークを選択して、サーバーとなるHoudiniが動いているPCのアドレスとポートを入力します。


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/e3cfe981-97d5-c713-ffcd-0b03938c7d2b.png)


アドレスはコマンドプロンプトでipconfigを実行して
Wireless LAN adapter Wi-Fi:のIPv4 アドレス　を参照するなど、各自調べてください。

このアプリは、クライアント側のアプリのため、まず先に受け先のHoudini側でサーバーを立ち上げる必要があります。（そもそもどのポートに向けて送信するかはサーバー側のポート設定によるため）








## 構成について

Serverフォルダにはhipncとbegeo、pythonデータがあります。このなかのpythonファイルですが、このままでは使いません。このpythonはhipから参照されているわけでも、あとからpythonサーバーとして独自に立ち上げるわけでもなく、Python Source Editor（hip内）に同じコードが格納されています。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/6ed737f9-2d4a-1a50-206f-c615be08e961.png)

このPythonは、おそらくgithub上で見やすいように外に出していたのかと思います。（Houdiniに詳しくない人からすると、非常に巧妙なデコイです）

このPython Source Editorの良いところは、関数を定義しておけば、ネットワーク内のどこからでも呼び出せるし、スライダーを移動してもPythonSOPのようにフレームの都度実行されない点です。
このコードは、hipを読み込んだときとソースを更新したときに実行されます。

## Python Source Editor を読み解く

Python Source Editor では houモジュールは最初から読み込まれているので、
パラメータに値をセットするHOM(HoudiniObjectModel)である

```py
hou.node("ノードパス").parm("パラメータ名").set("値")
```

も問題なく使えます。

まず実行させる前に下準備があります。

ネットワークの真ん中にある

### streamServer

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/8ce8a3b8-a718-bc6d-9fc2-058b8764b75e.png)
こいつがPythonSourceEditor内の動作開始の関数を呼び出すボタンとIPアドレス設定を入力する、このhipファイルの重要なノードです。

IPアドレスは先ほど調べたIPv4のアドレスを入力すると以下のパラメータが参照してくれます。

```py
hou.node("/obj/geo/streamServer/").parm("ip")
```



server.py をPython3に直したもの

```py
import threading
import socket
import queue # Change for Python3!!!!!
from time import time

class FaceServer(threading.Thread): # main server to receive iphone's stream
    def __init__(self, queue):
        self.stop = False
        self.queue = queue
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        faceThreads.append(self)
        threading.Thread.__init__(self)

    def recvall(self, sock):
        data = ""
        while True:
            try:
                packet = sock.recv(65536).decode("utf-8") # Change for Python3!!!!! 
            except:
                return None
            data += packet
            if len(packet) > 0:
                end = packet[-1:]
                if end == "a": # end receiving
                    break
                elif end == "z": # iphone stop capture
                    return None
        return data

    def run(self):
        # socket setting
        address = (hou.node("/obj/geo/streamServer/").parm("ip").eval(), 0)
        #address = (hou.node("/obj/geo/streamServer/").parm("ip").eval(), 50000)
        self.sock.bind(address)
        self.sock.listen(5)

        print("server created {}:{}".format(self.sock.getsockname()[0], self.sock.getsockname()[1]))
        hou.node("/obj/geo/streamServer/").parm("info").set("Server Created > {}:{}".format(self.sock.getsockname()[0], self.sock.getsockname()[1]))

        while self.stop != True:
            # listen state
            print("listen")
            ss, addr = self.sock.accept()
            print("listen2")
            scmd = "s"
            ss.send(scmd.encode("utf-8")) # Change for Python3!!!!!
            print("get connected from", addr)

            # fps initial
            inter = 0
            fps = 0
            start_time = time()

            while self.stop != True:
                data = self.recvall(ss)
                if data is None: # back to listen state
                    print("connection missing, wait for connect...")
                    break

                try:
                    self.queue.get_nowait() # clean queue data
                except queue.Empty:
                    pass
                self.queue.put(data) # put data

                # fps performance print
                end_time = time()
                fps += 1
                inter += end_time - start_time
                if inter >= 1:
                    print(fps)
                    fps = 0
                    inter -= 1
                start_time = end_time

    def close(self):
        self.sock.close()
        self.stop = True


class HouCommander(threading.Thread): # when there's data, get the data and give it to houdini node's parm
    def __init__(self, queue):
        self.stop = False
        self.queue = queue
        faceThreads.append(self)
        self.parm = hou.node("/obj/geo/streamServer/").parm("datas")
        threading.Thread.__init__(self)

    def run(self):

        inter = 0
        fps = 0
        start_time = time()

        while self.stop != True:
            self.parm.set(self.queue.get()) # watch queue, if empty then wait

            # fps performance print
            end_time = time()
            fps += 1
            inter += end_time - start_time
            if inter >= 1:
                print("     -{}".format(fps))
                fps = 0
                inter -= 1
            start_time = end_time

    def close(self):
        self.stop = True


def startServer():
    global faceThreads
    faceThreads = []
    faceQueue = queue.Queue(maxsize=1)
    f = FaceServer(faceQueue)
    h = HouCommander(faceQueue)
    f.start()
    h.start()

def closeServer():
    global faceThreads
    for s in faceThreads:
        s.close()
    
    print("server closed")
    hou.node("/obj/geo/streamServer/").parm("info").set("Server Closed")
    

```


この中で何をしているかというと２つのスレッドがそれぞれの役割に応じて動作しています。

## ２つのスレッド

「TCPのソケット通信でiPhoneアプリで受信するスレッド」　と　「受け取った値をHoudiniのパラメータに格納するスレッド」　の２つを走らせて並列処理を行っています。

※補足：ソケットって何？→ソフトウェア間で通信する仕組み
https://e-words.jp/w/%E3%82%BD%E3%82%B1%E3%83%83%E3%83%88.html

また、この通信方式は
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
からも分かる通りTCPでの厳密なデータのやり取りを行っています。

- 一番最初のコンストラクタ（\_\_init\_\_）は、ボタンが押され startServer関数が実行された際に作られます。
- HouCommanderメソッドはstreamServerのdatasの値を定義するために参照を行っています。
  - 注意点：streamServerにdatasというパラメータが見えていませんがinvisible状態のためです
- （１）socket(ファミリー,タイプ) ソケットオブジェクト作成
- （２）bind((IP,port))　作成したオブジェクトをIPアドレスに紐づけ
- （３）listen() 接続したオブジェクトを接続可能な状態にする
- （４）accept() 待ち受け開始
- ★アプリからデータ送信開始　send
- 受信するスレッドFaceServerがiPhoneアプリにコネクション用のsを送信して、受信できる状態に。
- （５）recv() データ受信
  - アプリ側でStreamingボタンが押されるとサーバーに向かって大量のデータがソケットとして降り注ぎます。ソケット通信の文字の最後にaがついていたら完了 ソケット通信の文字の最後にzがついていたら途中終了 という処理が記述されています。
- パラメータに受信データ格納
- ループ
- サーバー終了ボタンが押されたら（６）close

swift のソースを確認してもaを付与しているのがわかります。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/f05b809d-cd55-dd78-d499-07ed3b06a5c2.png)


補足：ポート番号について

0を指定するとランダムなポートでサーバーが起動します。

※補足
・ポートは0番から65535番までの窓口
・0から1023のポートは well-knownポートと呼ばれ、ランダムポートは1024以降に
有名ポート番号「Service Name and Transport Protocol Port Number Registry」より
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml



## 受信データの整形

アプリから受信したデータは以下のように非常に長い（4万5千文字以上）もので、これがdatasのstringパラメータに入っています。※おそらく長すぎるパラメータ代入の表示処理を省略しているためにinvisibleにしているのではないかと思われます。

```
-0.13103403:-0.71503973:-0.68669355:0.0:0.9913747:-0.0927892:-0.09255346:0.0:0.0024616704:-0.6928984:0.7210309:0.0:0.0:0.0:0.0:1.0~0.9873261:-0.029493716:-0.15593831:0.0:0.06902398:0.964583:0.25458807:0.0:0.14290673:-0.2621252:0.954394:0.0:-0.021382233:0.22615758:-0.27421638:1.0~4.5538756e-05:-0.03075028:0.05621421~5.9314065e-05:-0.03446306:0.057219706~2.9799261e-05:-0.026344504:0.055521034~2.3135764e-05:-0.02289825:0.055479407~2.2552365e-05:-0.020220594:0.056027897~2.5052525e-05:-0.017178904:0.06002092~2.7197795e-05:-0.013124387:0.06590174~2.8336968e-05:-0.00880225:0.06858297~2.7347372e-05:-0.002975121:0.06911241~2.4717707e-05:0.0021583247:0.06711893~2.2369373e-05:0.0063728876:0.064482175~1.9180072e-05:0.010079449:0.061855633~1.6129512e-05:0.013886816:0.0592656~1.3519872e-05:0.018219583:0.056907773~9.760258e-06:0.022040911:0.05454138~4.832803e-06:0.03344221:0.050358243~3.6280726e-06:0.038478926:0.050132122~1.8228392e-06:0.046918083:0.051693168~1.0944505e-06:0.05598841:0.05249159~1.6936906e-06:0.06538623:0.051579908~-3.4801433e-06:0.097008:0.040800687~6.630552e-05:-0.037823692:0.058116473~7.177965e-05:-0.04104074:0.05734918~7.768361e-05:-0.043664895:0.054812886~7.942941e-05:-0.04480384:0.051023062~0.000110287816:-0.045472782:0.052379712~0.000110981906:-0.048279274:0.053997237~0.00010739031:-0.05107815:0.054580584~0.0001031982:-0.054254692:0.054227255~9.869608e-05:-0.0566419:0.05245936~9.527901e-05:-0.05856046:0.05085715~8.9363064e-05:-0.06031799:0.04892515~8.493635e-05:-0.06281641:0.047680855~8.057535e-05:-0.06550702:0.04676698~6.85258e-05:-0.06940676:0.046308093~4.6589623e-05:-0.07532265:0.0458226~6.297435e-06:0.027085936:0.051917944~2.677175e-05:-0.015681345:0.06279566~2.3493716e-05:-0.018536739:0.057778~-0.0786874:0.038308114:-0.013877376~-0.02767191:0.022605851:0.04238877~-0.031016467:0.022329656:0.04245315~-0.0343758:0.022684857:0.04215842~-0.043629143:0.023435175:0.03763262~-0.04127482:0.023253215:0.039228387~-0.03789191:0.023080062:0.04100206~-0.04765267:0.026973166:0.034284078~-0.024616197:0.023167977:0.042249683~-0.021904832:0.024167163:0.042182356~-0.015464835:0.016318098:0.04692085~-0.033071555:0.034513284:0.045041617~-0.029418813:0.03473669:0.045226123~-0.026069699:0.034756962:0.044149518~-0.04037463:0.033221867:0.042473547~-0.03665653:0.03399262:0.044182453~-0.043138348:0.03225968:0.040504783~-0.045799706:0.030697355:0.03743531~-0.076430485:0.011258416:-0.022866057~-0.035321757:-0.057291437:0.03732617~-0.03988627:-0.058533024:0.035031345~-0.04599848:-0.060088508:0.029851219~-0.059529692:-0.049176022:0.017644085~-0.025635444:-0.038340244:0.04692803~-0.028333206:-0.03507187:0.045843154~-0.031925853:-0.031556185:0.04484255~-0.028665142:-0.025792975:0.04573647~-0.011078032:-0.016240044:0.05370119~-0.012857955:-0.013922427:0.05545013~-0.011681799:-0.015002123:0.05410865~-0.011674306:-0.0123423:0.05401026~-0.008224983:-0.030651417:0.055524852~-0.007956454:-0.011998298:0.062015492~-0.0058083907:-0.010355648:0.06021599~-0.0039866637:-0.014316795:0.058410544~-0.0038784067:-0.013401228:0.057305183~-0.0036652614:-0.01547993:0.059151307~-0.0044999016:-0.01865605:0.055034887~-0.0060572806:-0.016703794:0.0549157~-0.006431769:-0.0151475975:0.05420699~-0.011172776:-0.011688908:0.056768246~-0.012553811:-0.012838928:0.057941828~-0.010327766:-0.012267306:0.059800588~-0.013379471:-0.010355223:0.060511895~-0.0039264155:-0.030386921:0.056460295~-0.020917542:-0.03796184:0.049681485~-0.017262705:-0.034521963:0.05196846~-0.0122063635:-0.02701748:0.052873284~-0.010469088:-0.018052159:0.05257175~-0.0074622645:-0.025972325:0.05447156~-0.012904759:-0.03231725:0.05396976~-0.004127623:-0.033557683:0.05728404~-0.008511758:-0.034170814:0.056257516~-0.004137328:-0.03672053:0.057861608~-0.0041734725:-0.043438718:0.054081958~-0.008660055:-0.037448153:0.05627785~-0.007491639:-0.0434371:0.052959748~-0.012712474:-0.039080277:0.05419449~-0.010912845:-0.043960497:0.05091215~-0.012798132:-0.03596065:0.05444543~-0.016707815:-0.038105536:0.05209697~-0.020075388:-0.040702473:0.04949797~-0.024220053:-0.041041456:0.04707643~-0.022720959:-0.042803567:0.047009923~-0.0184686:-0.04623698:0.044680946~-0.021325938:-0.04470267:0.046494067~-0.013788786:-0.04474338:0.04902994~-0.016200082:-0.045618232:0.046840496~-0.019088108:-0.043020632:0.048872937~-0.016216893:-0.041216478:0.051514834~-0.031279996:-0.05587826:0.038717072~-0.025969781:-0.05331568:0.041659225~-0.028362652:-0.054678325:0.040149327~-0.030901749:-0.060923595:0.037535124~-0.03438293:-0.0636694:0.0353036~-0.028927688:-0.06757399:0.036679868~-0.023634262:-0.05510672:0.042818695~-0.019695211:-0.05464082:0.04563254~-0.021038901:-0.048825927:0.044449717~-0.024087805:-0.05185659:0.04293416~-0.022103837:-0.053347193:0.044118807~-0.019746348:-0.04944095:0.04575442~-0.016435685:-0.04644051:0.047237683~-0.018109605:-0.050114617:0.04727024~-0.018897893:-0.052365597:0.046811264~-0.0023127066:-0.01660323:0.05973205~-0.0065335343:-0.012245526:0.06386614~-0.0037474385:-0.012869673:0.06518808~-0.0046873917:-0.009009561:0.067332335~-0.008001848:-0.0091722375:0.065191336~-0.005094111:-0.0033315415:0.06765519~-0.0765766:0.049796984:-0.0062252353~-0.03588029:0.09281918:0.033308826~-0.054279506:0.032749027:0.03124035~-0.018298574:0.009715672:0.047408413~-0.01875849:0.013336719:0.04609191~-0.0146579575:0.0088768145:0.050209537~-0.014233675:0.0050465744:0.051705252~-0.015407882:-0.0047061876:0.0570145~-0.020746749:0.0028254217:0.047426708~-0.018277925:-0.00391493:0.048820347~-0.017438564:-0.009226005:0.055934705~-0.015121413:-0.00745877:0.05900493~-0.015411467:-0.0120363:0.057390373~-0.017463062:-0.006256527:0.054573536~-0.017722279:0.0058660246:0.048622034~-0.021613767:0.006807686:0.046521973~-0.022105329:0.010776237:0.04540137~-0.03313005:-0.02111668:0.04612838~-0.036360096:-0.027747026:0.04471743~-0.04128029:-0.023215462:0.043937452~-0.037863925:-0.015460938:0.04579813~-0.0428133:-0.0077382172:0.043614764~-0.05034791:-0.005545819:0.03947603~-0.047964808:0.0036767793:0.040156744~-0.041737944:0.0028388188:0.042511795~-0.053589076:0.0057601016:0.03665624~-0.00500029:0.0014183589:0.06584146~-0.004738939:0.012816981:0.058205303~-0.0047428925:0.016887346:0.055851378~-0.024192574:0.0575704:0.050359644~-0.0150996465:0.012772725:0.048660442~-0.033511024:0.04391798:0.046391234~-0.05226664:0.050523844:0.036532223~-0.038718265:0.043065123:0.04508657~-0.048161495:0.039093386:0.039365113~-0.051755182:0.03635501:0.03533485~-0.057522293:0.033128:0.028137067~-0.072556145:0.06105716:0.0004291875~-0.012762805:0.03945914:0.04671773~-0.02259166:0.033872638:0.04333907~-0.020908108:0.042854242:0.04706204~-0.020306023:0.032698333:0.042393442~-0.028041502:-0.04880381:0.041886948~-0.029850174:-0.048788406:0.04155865~-0.032032225:-0.048576396:0.04108859~-0.03607946:-0.047887333:0.039861858~-0.04011136:-0.046856184:0.038760442~-0.044280514:-0.044817187:0.03709273~-0.06587:0.009846929:0.023382626~-0.043454155:-0.031166023:0.04118505~-0.03892655:-0.03464021:0.04241895~-0.034034345:-0.038381696:0.043014247~-0.03078326:-0.04007105:0.044040587~-0.028233143:-0.04220663:0.044870302~-0.026646739:-0.04365:0.044977594~-0.024864754:-0.04508597:0.044758637~-0.023282101:-0.046145268:0.04442415~-0.020337263:-0.046895072:0.04313126~-0.026615651:-0.048705507:0.042156693~-0.021863958:-0.047462452:0.042157657~-0.02487134:-0.048456155:0.042472374~-0.027895087:-0.058751564:0.03941145~-0.02555024:-0.056801073:0.041178957~-0.024207732:-0.060983315:0.040987417~-0.020844216:-0.056655474:0.044346068~-0.022366127:-0.05862841:0.042762022~-0.02640883:-0.0638265:0.038993396~-0.04855143:0.04648684:0.040130418~-0.05279875:0.04294133:0.03596904~-0.05652133:0.045589205:0.0317234~-0.05940747:0.04010453:0.027222874~-0.055778563:0.03867921:0.031749837~-0.018274833:-0.012221983:0.051845048~-0.016249718:-0.013203424:0.054888748~-0.018109418:-0.013872112:0.04992666~-0.025094206:-0.03002252:0.047033813~-0.015871413:-0.014678535:0.053351212~-0.027261188:0.044204284:0.04726875~-0.075465515:-0.02494753:-0.021849401~-0.03203265:0.057102058:0.047923435~-0.039755054:0.05614415:0.044719305~-0.045860205:0.08881103:0.027813142~-0.054586362:0.08355126:0.021653686~-0.06765852:0.06837268:0.0081102885~-0.07392795:0.03485832:0.0033293094~-0.07052238:0.044046316:0.008749687~-0.0669581:0.05466489:0.013702327~-0.061643507:0.06178285:0.02081857~-0.04869321:0.07283193:0.03232578~-0.040223464:0.076395296:0.037959218~-0.031093182:0.07926999:0.04243901~-0.06714005:0.04368529:0.015278281~-0.06327381:0.05113865:0.020615274~-0.05871305:0.05816518:0.02618515~-0.045521423:0.06741813:0.03709139~-0.037428994:0.07019559:0.04204351~-0.028774688:0.07216432:0.0458284~-0.06376183:0.042186197:0.021055952~-0.060201045:0.0488115:0.025935607~-0.055717364:0.054919295:0.031277433~-0.043010708:0.062445614:0.040942937~-0.035206035:0.064583644:0.045161698~-0.02695668:0.0659569:0.04848073~-0.017927269:0.0662366:0.050672606~-0.061850347:0.033161853:0.023482982~-0.063870646:0.026398864:0.02092522~-0.07029137:0.03395274:0.011302378~-0.0041652853:-0.040922537:0.056565482~-0.008116221:-0.041151278:0.05508022~-0.011957377:-0.042092457:0.05290248~-0.01482957:-0.043641992:0.05018046~-0.017533159:-0.044985972:0.0477043~-0.019421503:-0.04609209:0.04560116~-0.021380894:-0.04681336:0.04409998~-0.0230148:-0.04796344:0.042663768~-0.020087712:-0.04751972:0.04478183~-0.017318225:-0.047871754:0.047470298~-0.015646102:-0.04592148:0.04637291~-0.01741628:-0.046474133:0.04473574~-0.021354048:-0.0471769:0.041093376~-0.020168971:-0.046389513:0.041364726~-0.018421048:-0.04586246:0.043007847~-0.015977168:-0.045272507:0.044912137~-0.013090002:-0.044916805:0.046957616~-0.00996423:-0.044495232:0.048579887~-0.0067331605:-0.04453828:0.049897894~-0.0033284358:-0.04461634:0.050780907~-0.005325858:-0.06953089:0.045880016~-0.0046561523:-0.06288176:0.047473177~-0.004458455:-0.06052117:0.048781645~-0.004320618:-0.0584037:0.050777774~-0.0043173437:-0.056465916:0.052362036~-0.0043377476:-0.05390929:0.05384769~-0.004103818:-0.050834373:0.05421096~-0.003927635:-0.047916792:0.053768277~-0.003630867:-0.04524079:0.05215086~-0.01088973:-0.0691775:0.044667605~-0.009596324:-0.062621646:0.04694~-0.009110402:-0.060165744:0.04838578~-0.008789411:-0.058061335:0.05013505~-0.00863859:-0.055981148:0.05168869~-0.008713227:-0.05343174:0.052886657~-0.00840613:-0.050294265:0.05303396~-0.008112717:-0.047401514:0.052614335~-0.0072780093:-0.045158178:0.051346865~-0.013523471:-0.04548276:0.04821291~-0.014399761:-0.04644347:0.04892716~-0.015108656:-0.04844818:0.049251717~-0.01582595:-0.050925817:0.049171682~-0.016234703:-0.053589825:0.048742507~-0.016751986:-0.056006342:0.04738667~-0.019483464:-0.0010812972:0.04788191~-0.016399806:-0.068168186:0.04292704~-0.0144046135:-0.061759993:0.04595574~-0.0136318:-0.05940662:0.047427736~-0.01311648:-0.057306275:0.04892293~-0.012792498:-0.054969758:0.050477937~-0.012727367:-0.052317876:0.051248364~-0.012158769:-0.049330782:0.051231846~-0.011765748:-0.046797168:0.050844397~-0.010734289:-0.045245558:0.050001148~-0.02244006:-0.03399276:0.048839252~-0.018910816:-0.0098531945:0.049041435~-0.003456204:-0.02627582:0.055622347~-0.018147286:-0.010561238:0.053815827~-0.07576841:-0.013773327:-0.021687023~-0.017666336:-0.028437607:0.050430797~-0.014947933:-0.016548809:0.05195179~-0.018622983:-0.007896391:0.052410387~-0.014062457:0.0013257037:0.05328086~-0.004793859:0.008974711:0.060687847~-0.0147211:-0.0020541546:0.055136267~-0.004938237:0.0053809932:0.06327663~-0.016485792:-0.0011270553:0.050654676~-0.01688334:0.0021165558:0.04959478~-0.01880424:-0.046794936:0.043232746~-0.019193655:-0.04680364:0.044316996~-0.0064387033:-0.020983918:0.05376593~-0.014323605:-0.018303078:0.05037978~-0.021567978:-0.024355609:0.0473178~-0.025289979:-0.020060591:0.045835216~-0.029304855:-0.0152003495:0.04648609~-0.01818958:-0.0151765:0.048435982~-0.019742422:-0.009717137:0.04755555~-0.022145692:-0.005279618:0.04694845~-0.018196553:-0.0059659546:0.050392166~-0.016956437:-0.003850054:0.05251482~-0.024171993:-0.00073258067:0.04674587~-0.025475988:0.003803357:0.045897067~-0.02602194:0.008271489:0.044756304~-0.032962162:-0.009485586:0.04656134~-0.03552819:-0.002952715:0.045386594~-0.035783805:0.0041213874:0.043705106~-0.0030363328:-0.022449013:0.05515669~-0.0024395462:-0.019656973:0.055625744~-0.01888781:-0.009751788:0.051100783~-0.04387467:0.041617:0.042704973~-0.036567744:0.05021526:0.046516873~-0.029311396:0.050499108:0.04846964~-0.022031322:0.05044498:0.050053317~-0.06152884:0.07727587:0.015218737~-0.055867556:0.068024926:0.026583694~-0.05272833:0.063284576:0.031949453~-0.049936518:0.059163127:0.036501635~-0.04666793:0.053848963:0.04087369~-0.043193553:0.04907081:0.043742344~-0.017568521:-0.05813148:0.045966234~-0.01873058:-0.060341705:0.044435896~-0.020073634:-0.06282763:0.042868372~-0.015303763:-0.064546786:0.04446445~-0.021642879:-0.06614978:0.04093137~-0.023672428:-0.07050794:0.038878586~-0.017960459:-0.072871394:0.041329477~-0.012162671:-0.07439674:0.043714255~-0.0061807693:-0.07512958:0.04548847~-0.01004904:-0.06556075:0.045713488~-0.0048644817:-0.06561641:0.046491757~-0.006179416:0.039066292:0.049039066~-0.01450368:0.04868516:0.050866656~-0.016071793:0.05687421:0.051859453~-0.019279225:0.07262904:0.048606366~-0.02092924:0.08036079:0.04592432~-0.024521705:0.09557301:0.03744667~-0.060019232:0.014841018:0.028533831~-0.056959186:-0.0033203752:0.03419358~-0.060119215:0.021195922:0.025549991~-0.04586317:0.023836318:0.035803158~-0.018151606:0.030479362:0.041742418~-0.017123701:0.027374573:0.0417242~-0.009479317:0.03088655:0.04608636~-0.0051989667:0.032565173:0.048977524~-0.008282924:0.014650517:0.053989004~-0.008857479:-0.00049012457:0.06319629~-0.008700956:0.003206564:0.060881063~-0.008303989:0.010719469:0.05615006~-0.008491671:0.006879049:0.0584701~-0.008341197:0.023744514:0.04909924~-0.008345253:0.018869266:0.051592164~-0.011506244:0.011892079:0.05199364~-0.011331633:0.007949021:0.05393775~-0.0117047625:0.019749224:0.047878474~-0.011668882:0.015864315:0.05006295~-0.008792143:-0.0045061563:0.06491344~-0.012006785:-0.0059208455:0.06186054~-0.010908314:-0.009123615:0.062747054~-0.06578091:0.018581912:0.020817904~-0.07618567:-0.0026951889:-0.021905238~-0.05336378:0.014916908:0.034107562~-0.04985158:0.012128233:0.037293494~-0.045358162:0.01044823:0.039825402~-0.040263046:0.009752966:0.04147148~-0.035297297:0.010147468:0.04251262~-0.030540522:0.011304922:0.043141175~-0.026332466:0.01267322:0.043566585~-0.022694625:0.014523997:0.043976214~-0.019414946:0.016726324:0.04452208~-0.016039485:0.019399537:0.045214728~-0.004882679:0.021386897:0.053179245~-0.055012006:0.018766437:0.030927535~-0.058227733:0.008989085:0.032291275~-0.06377149:-0.00035318767:0.027087757~-0.06699556:-0.035816543:0.010632315~-0.05807313:-0.06782282:-0.0027279584~-0.021401834:-0.047047645:0.040567208~-0.021730425:-0.047428768:0.04211456~-0.023155138:-0.047567803:0.04291482~-0.025028523:-0.047376268:0.043180503~-0.026466945:-0.047016796:0.043302547~-0.028096927:-0.046528045:0.0431391~-0.029941756:-0.045678165:0.04298185~-0.032413535:-0.044591166:0.042328343~-0.035712656:-0.04309049:0.04128988~-0.040492993:-0.041374046:0.040046718~-0.044568215:-0.03854778:0.03863923~-0.020073714:-0.047068294:0.042189244~-0.02041188:-0.04717488:0.043162704~-0.021533994:-0.04788605:0.043600537~-0.022826757:-0.048733957:0.043091003~-0.02620346:-0.05046316:0.041811753~-0.027788118:-0.051142626:0.041213553~-0.030579032:-0.051944263:0.040134165~-0.03418758:-0.05246911:0.038979683~-0.038459573:-0.05240602:0.037840366~-0.04304045:-0.0518165:0.03577408~-0.048500568:-0.05048488:0.0319121~-0.0555972:0.02329041:0.028641611~-0.047084134:0.025342051:0.03462217~-0.046940766:0.029315481:0.035810985~-0.055383354:0.028053606:0.028739113~-0.05939607:0.027505398:0.025162373~-0.007094658:0.0472301:0.051419515~-0.007878961:0.05641368:0.052432645~-0.008783808:0.06590744:0.051469583~-0.009472194:0.072162375:0.04993796~-0.010322687:0.080270454:0.047683664~-0.012249273:0.096737936:0.03997031~-0.01998411:0.025484556:0.042008378~-0.004743634:0.026046887:0.05088958~-0.0028739362:-0.015079663:0.062431384~-0.0045946627:-0.0138420705:0.06153853~-0.0046897284:-0.012358526:0.061108578~-0.0040239524:-0.011067801:0.060207255~-0.012004469:0.023782656:0.04562842~-0.030559644:0.00606768:0.04426162~-0.0300618:0.0006632947:0.0456631~-0.028360086:-0.004715358:0.046599437~-0.025607038:-0.009910384:0.04658558~-0.022355473:-0.014934519:0.046144813~-0.018875264:-0.0191404:0.047238346~-0.015111896:-0.021791602:0.049704965~-0.01070273:-0.021823324:0.051998246~-0.00799626:-0.017328804:0.053913187~-0.008515871:-0.01565803:0.05371021~-0.00949028:-0.01106278:0.058481786~-0.01215159:-0.0026871008:0.060133506~-0.011579951:0.000564298:0.058077086~-0.01133605:0.0042038704:0.055937532~-0.04610964:-0.018366016:0.041780416~-0.048528533:-0.027531037:0.03868375~-0.049290337:-0.035197653:0.03600983~-0.049139284:-0.042681046:0.03385984~-0.05259775:-0.015746841:0.03695376~-0.053544424:-0.024735987:0.03474273~-0.05384681:-0.032224793:0.03235699~-0.05848768:-0.023470748:0.029483872~-0.05822097:-0.013966304:0.031613637~-0.06372907:-0.013456455:0.025132112~-0.062968105:-0.023178:0.02370289~-0.07063857:0.015559998:0.013928809~-0.070641465:0.00594612:0.015362935~-0.06476539:-0.032798827:0.017203841~-0.06329594:-0.04404744:0.01372214~-0.06460048:-0.05961422:-0.011252541~-0.06984793:-0.0045876023:0.01645983~-0.0729482:-0.007920423:0.0072088246~-0.07141093:-0.018085428:0.007827889~-0.07568608:0.024231102:0.00055965234~-0.078355744:0.025469843:-0.019331602~-0.069427595:-0.027442329:0.0087802885~-0.068341844:-0.015367929:0.016712727~-0.06661689:-0.02486711:0.016692635~-0.07386152:0.0031522333:0.006851354~-0.07399142:0.0137957:0.007436306~-0.0725057:0.024545588:0.008310353~-0.066674866:0.033692256:0.017130839~-0.06943302:0.024730582:0.014469194~-0.061832964:-0.03069403:0.022940006~-0.054118123:-0.054226916:0.02372345~-0.054115456:-0.047049493:0.026960716~-0.054044973:-0.040200584:0.029657856~-0.058833394:-0.04331351:0.02167779~-0.058218192:-0.037678897:0.025658553~-0.062172834:-0.03883247:0.0192564~-0.05834692:-0.0308827:0.027479034~-0.060886174:-0.035793256:0.022608452~-0.0021043872:-0.017944943:0.057400655~-0.0037183554:-0.01699161:0.056937758~-0.004925883:-0.015677627:0.056349717~-0.0050139427:-0.014245104:0.05560296~0.078717224:0.03825948:-0.013949282~0.028080286:0.022661135:0.04236215~0.031502984:0.022367606:0.042354286~0.034917478:0.022685828:0.041954074~0.04399618:0.023335785:0.03726~0.041735258:0.02315822:0.038887195~0.038417377:0.023030568:0.04071838~0.04784985:0.026891435:0.03387749~0.024923407:0.023216426:0.042217728~0.022113653:0.024196066:0.04209358~0.015467278:0.016304025:0.046868276~0.03374116:0.03442717:0.044787314~0.030117938:0.03471049:0.04512821~0.026743634:0.034787305:0.044209447~0.04080253:0.033092473:0.04206582~0.037217185:0.03387268:0.043826643~0.0434731:0.032142352:0.040099908~0.04604624:0.030595373:0.037026826~0.035493102:-0.057304576:0.037140977~0.04008092:-0.05854545:0.034858238~0.046193466:-0.06008756:0.029653884~0.059660096:-0.049150486:0.017475277~0.025711862:-0.038324166:0.046742853~0.028395204:-0.0350461:0.04565757~0.03198252:-0.031529162:0.044666063~0.028707985:-0.02576712:0.045580484~0.011108345:-0.016210712:0.053640116~0.012885543:-0.013902295:0.055390593~0.011710024:-0.014974929:0.054048944~0.011698139:-0.012318929:0.05395794~0.008319157:-0.03064353:0.055442303~0.007994915:-0.011996115:0.061982714~0.0058480357:-0.010345152:0.060186177~0.004026162:-0.014300292:0.05838521~0.003916514:-0.013381897:0.057276994~0.0037099181:-0.015463316:0.05913033~0.004542263:-0.018639704:0.05500227~0.006094489:-0.016677711:0.05488069~0.0064648925:-0.015119235:0.054171115~0.011203914:-0.011676936:0.056720227~0.012585333:-0.012828361:0.057889376~0.010361743:-0.012263203:0.059758157~0.013413147:-0.010350613:0.060460825~0.00402012:-0.030386027:0.05641727~0.021012634:-0.037958838:0.04951012~0.017358238:-0.03451846:0.051826388~0.012276216:-0.026994037:0.052780095~0.01050326:-0.018022979:0.05250335~0.0075251213:-0.025956383:0.05440507~0.013003502:-0.032310415:0.05385582~0.0042463248:-0.03355722:0.057240695~0.008629264:-0.03416665:0.0561712~0.0042718463:-0.03672069:0.0578141~0.004323828:-0.043445583:0.05402599~0.008788778:-0.03745126:0.056184534~0.007639334:-0.04344546:0.052868053~0.01283934:-0.03909147:0.05406608~0.011059328:-0.04397332:0.050787613~0.012915043:-0.035961565:0.054323852~0.016817072:-0.038111754:0.051943943~0.020184621:-0.040707573:0.049318004~0.02431594:-0.0410326:0.04688184~0.02283375:-0.042803545:0.046805035~0.018611025:-0.04626767:0.044468474~0.021453355:-0.044720322:0.046278678~0.013935245:-0.044760484:0.048876766~0.01634535:-0.045636505:0.04665874~0.019208964:-0.04303925:0.048680957~0.016338238:-0.041235793:0.05135313~0.03143714:-0.05589534:0.03852011~0.026133249:-0.053344443:0.041458618~0.028520977:-0.054702688:0.039952863~0.031062653:-0.060930192:0.037363347~0.03455796:-0.06367045:0.035150196~0.02908637:-0.06755983:0.03653612~0.02379668:-0.055131327:0.042627227~0.019864231:-0.05466633:0.04545338~0.021201894:-0.04887408:0.04423666~0.024251636:-0.051890604:0.042724602~0.022269152:-0.053378455:0.043923866~0.019915983:-0.049484942:0.045554016~0.016621398:-0.046483025:0.047065448~0.018287046:-0.05015596:0.04708086~0.01907197:-0.052400406:0.04662429~0.002363194:-0.016591957:0.059717778~0.006579587:-0.012241541:0.063839324~0.0037986112:-0.012866002:0.0651718~0.004739793:-0.009010959:0.06731359~0.00804762:-0.009173547:0.06516226~0.0051436787:-0.0033370322:0.06763616~0.076584816:0.049747333:-0.0063118455~0.03586625:0.09277863:0.03321522~0.054339394:0.03269512:0.03094871~0.018297877:0.009710288:0.04733315~0.018756842:0.013327915:0.04602851~0.014666008:0.00886841:0.050147496~0.014245684:0.005042642:0.051644567~0.015430671:-0.004702913:0.056956246~0.020742107:0.0028323294:0.047337923~0.018280664:-0.003902746:0.048730936~0.01746226:-0.009212588:0.05586374~0.015150373:-0.0074545424:0.05894822~0.015442567:-0.012021362:0.057326406~0.017481726:-0.006245718:0.054501392~0.017725475:0.005865178:0.04854625~0.021604376:0.006809388:0.046431072~0.022103632:0.010774741:0.045323856~0.033163287:-0.0210945:0.04598356~0.036413413:-0.027726868:0.044558555~0.041332334:-0.023184752:0.043760218~0.037891097:-0.015432957:0.045641735~0.042828273:-0.0076992502:0.043448035~0.05034887:-0.005497176:0.03929679~0.047950525:0.003704547:0.03998571~0.0417297:0.0028621403:0.042356975~0.05357287:0.005789422:0.036472976~0.0050454256:0.001412776:0.06582486~0.0047663334:0.012811286:0.058188822~0.0047639846:0.016880237:0.055834755~0.024195718:0.057538:0.050276306~0.015105092:0.012761825:0.048599605~0.033590678:0.043889467:0.046276145~0.05225734:0.050477292:0.036386672~0.038791906:0.043035343:0.04494041~0.048241172:0.03904281:0.03913264~0.051827196:0.03629909:0.035059243~0.057532776:0.03308115:0.027914042~0.07254832:0.06100828:0.00033081256~0.01283238:0.039432433:0.046693467~0.023131039:0.033895515:0.04346549~0.020999448:0.04282398:0.047007736~0.020672696:0.03268498:0.04249034~0.02821011:-0.048836444:0.041677408~0.030012209:-0.048809435:0.04135151~0.032184746:-0.04858424:0.04087293~0.03623154:-0.047882974:0.039629262~0.04027003:-0.046856616:0.03856132~0.044446595:-0.0448106:0.036884904~0.06583813:0.009855962:0.023248237~0.04354374:-0.031141171:0.040987507~0.03901568:-0.034624275:0.042241048~0.034119785:-0.038353384:0.0428016~0.030871242:-0.04004714:0.043832276~0.028329732:-0.042192407:0.044664357~0.026754614:-0.0436418:0.044766676~0.02499068:-0.045090176:0.044536006~0.023418732:-0.04616521:0.04418951~0.020476164:-0.046938695:0.042894006~0.026786821:-0.048745967:0.041937724~0.022012655:-0.04752794:0.041918293~0.025040608:-0.048506968:0.042239122~0.028050777:-0.05876503:0.039227042~0.025709715:-0.05681886:0.040989164~0.024367968:-0.060988702:0.04081119~0.021008503:-0.056674775:0.044169895~0.02252676:-0.058641076:0.04258565~0.026568362:-0.06382298:0.038829662~0.04857089:0.046446238:0.039963685~0.052806117:0.04289273:0.03579162~0.056504264:0.045541957:0.031568214~0.05938517:0.040058136:0.027065808~0.055786155:0.0386303:0.03154683~0.018293796:-0.012202079:0.05175499~0.016277874:-0.013182051:0.054814357~0.018126601:-0.013850656:0.04982293~0.025144557:-0.029996917:0.04687484~0.015899118:-0.0146542145:0.053269416~0.027352583:0.044178277:0.04718901~0.032035436:0.057067174:0.04781876~0.03975837:0.056107465:0.044595383~0.045839652:0.088765495:0.027704958~0.054561805:0.08350278:0.021539146~0.06763926:0.06832182:0.008001172~0.063741714:0.04213763:0.020925675~0.060178623:0.048760068:0.025796656~0.0556974:0.054870516:0.03113742~0.043006673:0.062404007:0.04081624~0.03520455:0.06454715:0.045052707~0.026959417:0.06592545:0.048394345~0.017930664:0.0662135:0.05061361~0.061825357:0.0331167:0.023325002~0.06384424:0.026355967:0.020766234~0.004307603:-0.04092899:0.056510624~0.008256071:-0.041161038:0.054984543~0.012093433:-0.042111926:0.05277087~0.014968619:-0.043663178:0.05001968~0.017668087:-0.04500817:0.047511607~0.01955724:-0.046120994:0.045385037~0.021518072:-0.046850413:0.04386332~0.02317244:-0.0480231:0.04241737~0.020254904:-0.047569163:0.044574168~0.019106561:-0.047785684:0.045839496~0.017499587:-0.04791165:0.047290727~0.015833672:-0.045958675:0.046213422~0.0175952:-0.046516426:0.044559237~0.02149627:-0.047250748:0.040860035~0.020298725:-0.046442438:0.041128676~0.01856305:-0.045901634:0.042788725~0.016126039:-0.045297407:0.04472802~0.013239229:-0.04493352:0.04681234~0.01011182:-0.04450491:0.04846277~0.006882099:-0.044545215:0.049811635~0.0034834656:-0.044625398:0.050733887~0.0054528876:-0.069526814:0.045844663~0.0048214514:-0.06288438:0.047434777~0.0046351883:-0.06052237:0.04874414~0.0045080725:-0.058405004:0.05073589~0.004511969:-0.056469075:0.052314904~0.004540969:-0.053917434:0.053795356~0.0043151597:-0.050844327:0.05415958~0.004147204:-0.047929294:0.053717386~0.0038521776:-0.045258176:0.052101985~0.011010771:-0.06917024:0.044596937~0.009756376:-0.06262376:0.046865016~0.009281849:-0.060167953:0.04830875~0.008969737:-0.058064956:0.050051205~0.008826718:-0.055987768:0.051596828~0.008908465:-0.053445242:0.052787874~0.008609471:-0.05031283:0.052935135~0.008325157:-0.047422815:0.05251671~0.007494435:-0.04518294:0.051253933~0.013722488:-0.045518894:0.048068814~0.014595427:-0.046481207:0.04877281~0.015298405:-0.048483107:0.04908971~0.016010582:-0.050960653:0.04900127~0.016414821:-0.053613994:0.048576463~0.016924465:-0.05602219:0.047229648~0.019484984:-0.0010694271:0.047790803~0.016534884:-0.06815844:0.04281469~0.014564433:-0.06176348:0.04584183~0.01379864:-0.05941132:0.04731069~0.013290673:-0.05731421:0.04879851~0.012975004:-0.054982863:0.050343353~0.012915857:-0.052340988:0.051108014~0.012355003:-0.049358338:0.05109499~0.011970576:-0.04682812:0.050711915~0.010945202:-0.045279242:0.04987674~0.022508863:-0.03397988:0.04867935~0.018918524:-0.0098339105:0.048940852~0.0035178913:-0.026272278:0.05558721~0.018168624:-0.010543439:0.05373543~0.07583146:-0.013796044:-0.021706123~0.017728314:-0.02841551:0.05030826~0.014975888:-0.016523166:0.051863812~0.018638942:-0.007880592:0.052326236~0.0140765365:0.0013244181:0.053220645~0.0048273345:0.008969756:0.060671926~0.014739793:-0.002051539:0.05507697~0.0049789296:0.005376081:0.063261725~0.01649371:-0.0011214939:0.05057833~0.01689108:0.0021205444:0.049517885~0.018974178:-0.04684673:0.043040633~0.019361638:-0.046856616:0.04411479~0.0064852787:-0.020959925:0.053717256~0.014353625:-0.018276026:0.050285306~0.02160558:-0.0243236:0.0471863~0.02531433:-0.020031469:0.045694605~0.029320583:-0.015177345:0.046354037~0.01820684:-0.015150751:0.04832693~0.01974557:-0.009693479:0.047448322~0.022142781:-0.005260863:0.04684331~0.01820527:-0.0059523326:0.050304394~0.016967919:-0.0038419878:0.05243979~0.024162482:-0.000718453:0.0466396~0.025462694:0.0038119594:0.04579083~0.026011625:0.008276155:0.044656448~0.032967642:-0.00946045:0.04642654~0.035521682:-0.002926005:0.045246404~0.035776734:0.004137883:0.043569736~0.0030859224:-0.022441369:0.055130742~0.0024848776:-0.019649785:0.05560658~0.018901514:-0.009734162:0.051009662~0.043951888:0.041579254:0.042518668~0.03658914:0.05018411:0.046397004~0.02933237:0.050469164:0.048373323~0.022042716:0.05041173:0.049974073~0.061504725:0.07722557:0.015104481~0.049924806:0.05911643:0.036364626~0.04666775:0.053808406:0.040733967~0.043213297:0.049037937:0.043600477~0.01773389:-0.058142915:0.04581412~0.018892305:-0.060349476:0.04428521~0.020232042:-0.06282882:0.04271195~0.015453406:-0.06454499:0.04434938~0.021798763:-0.06613971:0.040780805~0.023816396:-0.07048699:0.038744826~0.018079564:-0.07285086:0.041226257~0.01225985:-0.074382246:0.043644648~0.00627346:-0.07512133:0.04545287~0.010190999:-0.065558404:0.045643266~0.0050149662:-0.065615766:0.046457477~0.006192031:0.03904918:0.04901341~0.0145100625:0.04865971:0.050810486~0.016073626:0.056851372:0.051803842~0.0245129:0.09554265:0.03737623~0.059993915:0.0148353735:0.028334772~0.05694523:-0.0032673446:0.034018684~0.06011194:0.021163158:0.025326256~0.04612871:0.023744613:0.035412993~0.018318877:0.030432004:0.041727692~0.0172033:0.027336935:0.041612983~0.009496215:0.030863862:0.046050522~0.0052095107:0.0325524:0.048958886~0.008298835:0.014638398:0.05395742~0.008896414:-0.0004984702:0.06316797~0.008734826:0.00319946:0.060853433~0.008326378:0.010709273:0.056120392~0.008519189:0.0068706227:0.05844208~0.0083471425:0.023727486:0.049065877~0.008356892:0.018854301:0.051558368~0.011518029:0.011878559:0.05194723~0.011349195:0.007939543:0.053892903~0.011706778:0.019730637:0.047833823~0.011677673:0.015848631:0.05001719~0.00883525:-0.0045135776:0.06488298~0.012041815:-0.005925028:0.06181824~0.010946664:-0.009125141:0.06270692~0.06575259:0.018561268:0.020676183~0.076246195:-0.0027256545:-0.02193972~0.053376373:0.014902698:0.033855032~0.049869698:0.012127608:0.0370721~0.045373574:0.010452376:0.039631326~0.0402757:0.009755712:0.04130412~0.035312943:0.010148199:0.042371806~0.030568713:0.011309975:0.04304523~0.02636185:0.012679117:0.043499094~0.022724938:0.014524275:0.04393912~0.019442186:0.01671928:0.044490743~0.016048534:0.019384945:0.045166906~0.0048988312:0.021376718:0.053161025~0.055026334:0.018738348:0.03064233~0.05819714:0.009008577:0.032106474~0.06374657:-0.00030979156:0.02694027~0.05821434:-0.0678651:-0.0027646632~0.021531472:-0.047114767:0.040324595~0.021876238:-0.047484927:0.041871246~0.023304421:-0.047616247:0.042666372~0.025181495:-0.047407813:0.04294312~0.026617741:-0.047038864:0.043075085~0.028240563:-0.046541333:0.0429217~0.030075157:-0.045679238:0.042768497~0.032536693:-0.04458035:0.04210813~0.03583497:-0.04307208:0.04106328~0.040626995:-0.041371167:0.039852332~0.044702657:-0.038531512:0.038427234~0.020231087:-0.047132116:0.041977514~0.020570606:-0.047235344:0.04294443~0.021694316:-0.04794309:0.043372847~0.02298894:-0.04878804:0.042861145~0.026374236:-0.050501212:0.04159939~0.027956631:-0.051174276:0.04100932~0.030740751:-0.051966406:0.039928954~0.03435062:-0.052482046:0.038760807~0.038632434:-0.052416228:0.037642203~0.043231253:-0.05182269:0.035579916~0.04868244:-0.050471056:0.03168931~0.055635408:0.023248326:0.028333882~0.0473016:0.025258357:0.034221116~0.04715158:0.02922426:0.035401702~0.055439666:0.028002732:0.02842946~0.0594025:0.02746216:0.024932707~0.007096517:0.04721529:0.051393535~0.007881571:0.05639957:0.052405857~0.008787569:0.065895215:0.05144007~0.012240588:0.096722:0.039931666~0.020127976:0.025490303:0.041867126~0.0047542024:0.026034374:0.050872587~0.0029244893:-0.015071119:0.062417097~0.004637392:-0.013831558:0.061516892~0.004730527:-0.012347448:0.061084624~0.0040646004:-0.011053575:0.06018258~0.011994752:0.023760207:0.045573436~0.030547565:0.0060767992:0.044144772~0.030049814:0.00067932793:0.045542784~0.028354155:-0.0046952255:0.046480194~0.025607929:-0.009888177:0.04646699~0.022365417:-0.014904247:0.04601934~0.018900497:-0.019106377:0.047119845~0.01515158:-0.02176009:0.049607735~0.010749493:-0.021793596:0.051923726~0.00803024:-0.017298644:0.05386493~0.008547908:-0.015626939:0.053663444~0.00952457:-0.011056121:0.058441784~0.012182667:-0.0026918054:0.060090914~0.0116069745:0.00055947667:0.05803432~0.011359012:0.004197658:0.05589527~0.046156757:-0.01832448:0.041585878~0.048605703:-0.027492054:0.038464714~0.049404785:-0.035165127:0.035775993~0.049286325:-0.042656407:0.03362667~0.052624885:-0.015689887:0.036748003~0.053599395:-0.024678178:0.0345155~0.053932488:-0.032172926:0.032120544~0.058527924:-0.023400718:0.029270018~0.05823289:-0.013901833:0.03142355~0.0637371:-0.013398068:0.02496828~0.063006006:-0.023115797:0.023523282~0.064844854:-0.032746516:0.017053267~0.06340976:-0.04401968:0.01359049~0.078410275:0.025423719:-0.019389741~0.06665565:0.03364911:0.017006963~0.06941902:0.024697855:0.014358527~0.061897133:-0.030632209:0.022750955~0.054281205:-0.05420583:0.023514476~0.054258764:-0.047018114:0.026733689~0.054162923:-0.04015741:0.029418131~0.058945626:-0.043272413:0.021480532~0.058313783:-0.03762221:0.02543313~0.06226634:-0.038782142:0.019081054~0.058415655:-0.030818824:0.02726004~0.06097093:-0.03573508:0.022410557~0.0021522033:-0.017936274:0.057384055~0.0037627497:-0.016974093:0.056911703~0.004966168:-0.015654594:0.05632117~0.0050502582:-0.014220252:0.055572677~-0.0744262:-0.03408877:-0.021150658~-0.07155605:-0.04623838:-0.019383475~0.05148258:-0.07474913:0.005238011~0.044183318:-0.079768345:0.011904036~0.035893764:-0.08406997:0.01786794~0.029069727:-0.08757579:0.023127232~0.023362406:-0.08973878:0.027453205~0.019228403:-0.091114216:0.030042663~0.014416691:-0.09219588:0.032334395~0.007587849:-0.093233:0.034128416~-0.0075145657:-0.093237594:0.034144063~-0.0143400505:-0.0922108:0.03236847~-0.019145984:-0.09113179:0.03009071~-0.023271248:-0.08975445:0.027513767~-0.028966062:-0.087586105:0.023200639~-0.03576823:-0.08406482:0.017955769~-0.04404123:-0.07973654:0.01199454~-0.051339116:-0.07470803:0.0053064614~-0.031021606:-0.08265283:0.027325269~-0.03791808:-0.07871324:0.022792008~-0.046015907:-0.0742608:0.01801917~-0.053503226:-0.0687504:0.012141953~-0.059848685:-0.060994774:0.0055758753~-0.06570528:-0.05358979:-0.0019030626~-0.07063689:-0.0439538:-0.0074003767~-0.07395998:-0.03305546:-0.01039537~-0.075556085:-0.023930281:-0.012237363~-0.076461114:-0.011668551:-0.013281204~-0.04687529:-0.06664677:0.023976086~-0.053836934:-0.061218936:0.018969472~-0.06025936:-0.05518319:0.012877572~-0.06521046:-0.04810257:0.006602538~-0.069064155:-0.03999229:0.0026706762~-0.071957275:-0.031066747:0.00026177044~-0.07404347:-0.02125433:-0.0010207252~-0.07530359:-0.010111091:-0.0012195042~-0.07632532:0.0007610376:-0.0023682036~0.07382197:0.047599785:0.0011681988~0.07625835:0.03658851:-0.0040509677~0.07748762:0.025004828:-0.009617297~0.020377204:-0.08790148:0.034021173~-0.07744454:0.025042815:-0.009555235~-0.0762362:0.03663174:-0.0039734025~-0.07381879:0.047645908:0.0012601134~-0.06995099:0.056964606:0.0075810803~-0.06550909:0.06482831:0.013562144~-0.058899667:0.07265204:0.021108367~-0.051784318:0.07816333:0.027329884~-0.043142106:0.08257754:0.03334516~-0.033488315:0.08585797:0.038694844~-0.022738125:0.08775018:0.042634655~-0.011347345:0.08813311:0.044913843~-2.1357152e-06:0.08788264:0.045762114~0.01134309:0.08811654:0.044872858~0.022730913:0.08771769:0.04255949~0.033476017:0.08581566:0.03859524~0.04312264:0.082530834:0.03323009~0.05176008:0.07811441:0.027206741~0.058873907:0.07259996:0.020985082~0.06548779:0.06477547:0.013445498~0.06993916:0.056914356:0.0074748974~0.077470094:0.011881852:-0.012507676~0.076499246:0.0112167755:-0.022910686~-0.07707544:-0.0006451766:-0.013236489~-0.07740893:0.011910008:-0.012460087~0.037566695:-0.06725742:0.031922076~0.030947194:-0.07155865:0.034088872~0.025230464:-0.07502967:0.03664484~0.019559707:-0.07807367:0.039623283~0.013478285:-0.08021432:0.042255364~0.006875397:-0.08117121:0.04407168~3.5737165e-05:-0.081371196:0.044715542~-0.006801474:-0.08117857:0.04410674~-0.013397622:-0.080235995:0.042322002~-0.019461228:-0.07810381:0.03971868~-0.025108187:-0.07506026:0.03676456~-0.030801507:-0.07158282:0.03422225~-0.0373886:-0.06726018:0.032073457~0.014316366:-0.08569289:0.039833385~0.0074632084:-0.08682163:0.041474216~-0.007393448:-0.086829886:0.04150276~-0.0142414095:-0.08571725:0.039892226~-0.020425253:-0.08343285:0.03743254~-0.02574528:-0.08037755:0.034596246~-0.031604774:-0.0768691:0.031238921~-0.03847945:-0.07257432:0.027868034~0.038060322:-0.07870438:0.022669788~0.031134613:-0.08262903:0.027226908~0.025488537:-0.08565402:0.031053647~0.014435114:-0.08969603:0.036431562~0.0075734803:-0.090587206:0.038147572~-0.007502628:-0.0905949:0.0381697~-0.014359786:-0.08971647:0.036477458~-0.020294137:-0.087930635:0.034088876~-0.025392942:-0.08568308:0.031137709~0.077136874:-0.00065794657:-0.013270194~0.07653879:-0.0116690295:-0.01329846~0.07565188:-0.023952946:-0.01224173~0.07407189:-0.03308565:-0.010401637~0.07076428:-0.04398635:-0.0074162805~0.06583743:-0.05361482:-0.0019429128~0.059989907:-0.06101361:0.0054920074~0.0536603:-0.06876867:0.012024776~0.04617923:-0.07427418:0.017882746~0.07536471:-0.010104934:-0.0012586172~0.07638176:0.00075367815:-0.0024123061~0.07616679:0.013845271:-0.0011948199~0.07571791:0.024199411:0.0004882008~0.07394158:0.03481937:0.0032437511~0.07051883:0.044000074:0.008644855~0.066939004:0.054610442:0.013583916~0.061615895:0.061727677:0.020689655~0.055840902:0.067971855:0.02645324~0.048672702:0.0727838:0.03219897~0.04020881:0.07635089:0.03784343~0.03108433:0.07922916:0.04234028~0.02092594:0.08033247:0.045851275~0.010321057:0.080254704:0.047645424~-5.3139354e-07:0.07982232:0.04822655~-0.0761222:0.013865677:-0.0011361503~0.0670917:-0.035784546:0.010527104~0.069508806:-0.027414953:0.008691589~0.07147155:-0.018059528:0.0077505372~0.07298571:-0.007904853:0.0071389787~0.07387983:0.0031511697:0.0067791813~0.07400266:0.013777311:0.007355731~0.07251399:0.024515072:0.0082206465~0.070288114:0.03391182:0.011198475~0.06712658:0.043634124:0.015160748~0.06325139:0.05108457:0.020485492~0.058687083:0.05811109:0.026049731~0.05270601:0.06323252:0.031814493~0.045507953:0.06737264:0.03696362~0.037421193:0.07015533:0.041931145~0.02877235:0.07212802:0.045736667~0.019281378:0.07260403:0.048541535~0.009474869:0.07214901:0.04990494~1.2092943e-06:0.071539186:0.050210457~0.06667227:-0.024818117:0.016561374~0.06837135:-0.015325322:0.016594658~0.06985363:-0.0045589227:0.016353548~0.07063334:0.0059527177:0.015263537~0.07062694:0.015542135:0.0138255255~3.53664e-05:-0.093669616:0.034797024~3.4158467e-05:-0.09108932:0.03864687~3.3665357e-05:-0.08744613:0.042074982~0.020511381:-0.08339908:0.037347734~0.025847292:-0.0803425:0.034491926~0.031730622:-0.07684045:0.03111876~0.03864053:-0.07256426:0.027720945~0.047049876:-0.066644624:0.023796111~0.054002292:-0.061213586:0.018796934~0.060402766:-0.055174183:0.0127448775~0.06533736:-0.04809562:0.0065148654~0.0691802:-0.03998724:0.002606633~0.072059415:-0.031061051:0.00021277607~0.0741245:-0.02124856:-0.0010595629~0.028383218:0.026100677:0.042901512~0.03169812:0.025555495:0.043354243~0.035407:0.025737768:0.04294074~0.038707953:0.026354391:0.041958824~0.041460887:0.027168697:0.040614173~0.043407176:0.02791408:0.03909797~0.044185296:0.028332843:0.03836581~0.044783656:0.028633885:0.037762552~0.045070518:0.02893374:0.037323732~0.04405648:0.029214334:0.038714755~0.04297038:0.029604692:0.039934658~0.041761413:0.030023193:0.04094178~0.03970428:0.030839408:0.04229401~0.036939435:0.031793464:0.043815386~0.033988044:0.03242801:0.044774886~0.030836362:0.032870907:0.04483844~0.027912924:0.032813832:0.04423027~0.025422957:0.03229554:0.043783795~0.023349788:0.031702574:0.04288298~0.020748159:0.030021407:0.041962698~0.01858792:0.027755909:0.04010016~0.020977143:0.027468868:0.04060176~0.02317301:0.02724453:0.041210674~0.025674881:0.02671093:0.04208744~-0.027851453:0.026045768:0.04298756~-0.025274448:0.026676074:0.042195212~-0.022907257:0.027237164:0.04136804~-0.020809755:0.027481524:0.040784918~-0.018479422:0.027793499:0.04023457~-0.020501396:0.030062525:0.041951247~-0.02278846:0.031711515:0.04271994~-0.024610218:0.032285985:0.043606438~-0.026892155:0.032810856:0.04415616~-0.02970676:0.03293667:0.044981852~-0.03288784:0.032585923:0.045158047~-0.035953704:0.031987634:0.0443713~-0.038876187:0.031023128:0.042924773~-0.0410741:0.030186737:0.04154162~-0.04237082:0.029752959:0.040502243~-0.043545846:0.029351607:0.039254~-0.04461584:0.029064381:0.037865076~-0.044296883:0.028767802:0.0382883~-0.04363883:0.028473446:0.03889~-0.042822685:0.028052663:0.03961364~-0.04081622:0.027285716:0.04107178~-0.038025264:0.026416155:0.042331785~-0.034711473:0.025736647:0.043210123~-0.031056521:0.025507776:0.043498952~0.051656112:0.025018074:0.031216694~0.050918587:0.022026604:0.03237391~0.049232148:0.019715609:0.034677576~0.046311762:0.018118326:0.037093967~0.04289203:0.017615382:0.038899355~0.039119888:0.017387591:0.04036941~0.03508026:0.017465867:0.041467715~0.030963149:0.017757574:0.04221061~0.027312739:0.018509766:0.04260741~0.024029307:0.019403385:0.04264955~0.020917524:0.020661807:0.042823847~0.01801641:0.022312792:0.042894844~0.014292841:0.02599805:0.042435482~0.013762463:0.031046128:0.043263298~0.016417561:0.0352887:0.043987878~0.02206738:0.037035078:0.044739615~0.026322104:0.03797852:0.045524113~0.030964319:0.038338803:0.045969274~0.03604406:0.038215578:0.0454781~0.040774334:0.03751232:0.043811675~0.044762693:0.03590216:0.041200627~0.047393903:0.03384074:0.03807262~0.049278554:0.03112477:0.034992155~0.05106295:0.02814407:0.032021295~-0.049147073:0.031194918:0.03537836~-0.050946657:0.028208923:0.032412864~-0.051564075:0.025074009:0.03159404~-0.050837245:0.022080157:0.032734122~-0.04912259:0.019769989:0.035016604~-0.046154734:0.01816729:0.037394773~-0.042700406:0.017656544:0.039166503~-0.03891164:0.01741361:0.040590506~-0.034861054:0.01747513:0.041626424~-0.030742306:0.017747533:0.04229247~-0.027108762:0.01849061:0.04262486~-0.023855265:0.01938621:0.04264803~-0.020804543:0.020653524:0.042856734~-0.017953137:0.022314928:0.042963833~-0.014274612:0.026025612:0.04251904~-0.013720617:0.031080177:0.043307547~-0.01629169:0.03531567:0.04398892~-0.021815123:0.0370366:0.044731013~-0.026055334:0.037982866:0.045564502~-0.03073109:0.03835832:0.046080153~-0.03586231:0.038250603:0.045654766~-0.040621266:0.037561595:0.044039924~-0.044618543:0.035965033:0.041483246~-0.047259048:0.03390899:0.038408726~0.045749154:0.027570639:0.036223534~0.045151576:0.026879717:0.036758576~0.0437561:0.026402986:0.038208637~0.041689392:0.0257172:0.039830875~0.038710784:0.025074154:0.041384917~0.03510212:0.024581717:0.0424732~0.03163903:0.024401024:0.042950917~0.028396945:0.02491231:0.042692162~0.025618535:0.025615156:0.042161968~0.022932546:0.026267555:0.041712735~0.020621972:0.026856821:0.04145849~0.018084532:0.027550092:0.041301936~0.019586124:0.030222207:0.042311456~0.02202816:0.03214908:0.042891648~0.024132092:0.03333743:0.0436306~0.027294239:0.03407897:0.044611823~0.030420415:0.033974122:0.04506484~0.033703886:0.0337109:0.044779442~0.037003696:0.033225108:0.043845072~0.040356554:0.032417428:0.042239517~0.042735368:0.03142891:0.04056524~0.04439598:0.030499963:0.038861934~0.045641594:0.02966748:0.037181687~0.04613998:0.028529003:0.036052886~-0.045839354:0.028638393:0.0364848~-0.045319036:0.029783985:0.03761941~-0.043993495:0.030629683:0.039319742~-0.042253967:0.031573854:0.04103367~-0.039798904:0.032574307:0.042709664~-0.03630582:0.033375386:0.044262692~-0.032868024:0.03382417:0.04507669~-0.029532248:0.034014385:0.045179784~-0.026495654:0.034057006:0.044553086~-0.023477025:0.033315346:0.043482345~-0.021569379:0.03216043:0.042766005~-0.019371727:0.030269139:0.042309802~-0.017985944:0.027588535:0.041421052~-0.020463906:0.026861088:0.041632194~-0.022674462:0.026250798:0.041850206~-0.025232757:0.02557146:0.04224235~-0.027896233:0.024852779:0.04275348~-0.031048398:0.024354802:0.043075707~-0.034461614:0.024579467:0.042708866~-0.03808242:0.025132893:0.04171617~-0.041112866:0.025826775:0.040232327~-0.04325675:0.026529025:0.03864964~-0.04475498:0.02699782:0.03720014~-0.04540171:0.027684165:0.03666321~-0.009909433:-0.014661651:0.053272676~0.009939176:-0.014630992:0.053221326~0.022597414:-0.05042058:0.043533858~0.020992748:-0.051412277:0.045024987~0.024619406:-0.04970753:0.042268418~-0.024450969:-0.0496607:0.0424898~-0.022434184:-0.050375793:0.043745864~-0.020824878:-0.051371805:0.045224752~0.075535655:-0.024984796:-0.021854926~0.07450807:-0.03415043:-0.021152798~0.071666524:-0.046301:-0.019385714~0.06472673:-0.059666134:-0.011261853~0.018123504:-0.046647906:0.045599263~-0.017946718:-0.046600793:0.045787055~-0.018933829:-0.047742076:0.046034332~mouthPucker:0.08734058~tongueOut:2.563477e-06~jawForward:0.02892696~eyeLookUp_R:0~eyeBlink_R:0~eyeSquint_R:0.08319904~eyeLookIn_R:0.2166351~eyeLookOut_L:0.09830751~mouthShrugUpper:0.2118743~eyeLookDown_L:0.2252227~eyeWide_R:0.1143136~cheekPuff:0.05735976~mouthLeft:0.008691858~browOuterUp_R:0~browDown_R:0.1969353~noseSneer_R:0.2316793~mouthClose:0.05717209~browDown_L:0.1969564~eyeSquint_L:0.08320011~mouthLowerDown_L:0.03377907~browInnerUp:0.1363169~browOuterUp_L:0~mouthStretch_L:0.1937261~cheekSquint_L:0.09288503~mouthRight:0~mouthFrown_L:0~mouthFrown_R:0~mouthShrugLower:0.2013897~mouthFunnel:0.06165875~mouthStretch_R:0.1777198~mouthLowerDown_R:0.03306262~jawRight:0~mouthPress_L:0.1020638~mouthSmile_L:0.004829308~eyeLookUp_L:0~jawLeft:0.00499342~eyeLookIn_L:0~mouthRollLower:0.07578316~eyeLookOut_R:0~mouthUpperUp_L:0.04741809~eyeWide_L:0.1143506~mouthDimple_L:0.07029209~noseSneer_L:0.2344854~mouthUpperUp_R:0.04430725~eyeLookDown_R:0.2237619~jawOpen:0.05115993~mouthRollUpper:0.02149319~mouthSmile_R:0.007893873~mouthPress_R:0.1013608~cheekSquint_R:0.08690659~mouthDimple_R:0.06673943~eyeBlink_L:0a
```



これを分割しているのがstreamServer1のcodeタブにあるWrangleです。（さすがWrangle高速です）

```c
string datas = chs("datas"); // data parm is invisible
string data[] = split(datas, "~");
string points = data[i@ptnum+2];
string p[] = split(points, ":");

// make matrix
string ms[] = split(data[1], ":");
matrix m = ident();
int ix = 0;
for (int i = 0; i < 4; i++){
    for (int r = 0; r < 4; r++){
        setcomp(m, atof(ms[ix]), i, r);
        ix += 1;
    }
}

// apply position
v@P = set(atof(p[0]), atof(p[1]), atof(p[2])) * m;

```

以上がおおまかな概要となります。
Elisha Hungさんマジで凄い。


# UDPでフェイシャル

今半分くらいの状況　時間が出来たら追記します。

## ZigSim

アプリはここからダウンロードしてください。
https://apps.apple.com/jp/app/zig-sim-pro/id1481556614
https://play.google.com/store/apps/details?id=com.oneten.drive.zig_sim&hl=ja&gl=US

フェイシャルキャプチャをする場合はARKitのセンサーを利用できるZig Sim Proの購入が必要です、ただしフェイシャルはARKitを使用しているのでiOSのみです。Proではない通常のバージョンであればAndroidでも利用可能です。


ドキュメントはこちらです
https://1-10.github.io/zigsim/docs.html

PCで確認するために
ZIGインジケーターをダウンロードします
Windows：https：//zig-project.com/release/ZIG_indicator_v1.1.0_x64.zip
macOS：https：//zig-project.com/release/ZIG_indicator_v1.1.0_osx.zip

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/a65019ef-086d-5c40-1a21-16a13fd6d7c3.png)


## oscモジュールのダウンロード

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/524a7919-c523-f964-f980-251bb074e95e.png)

TouchDesigner
なら超簡単に取得できますが、Houdiniには残念ながらoscを読み込むモジュールがありません

https://pypi.org/project/python-osc/
からpython-oscをpipインストールします。

ドキュメントはこちら
https://python-osc.readthedocs.io/en/latest/


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/ff4a2030-1423-f84a-aeaf-348e3c28b5c1.png)



![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/b2e74282-4dcc-b080-02f9-ff019cd121c9.png)

osc なんて無いぞ！と怒られたのでモジュールを
インポートします
モジュールのインポートは
https://qiita.com/ijiVFX/items/2321dd77642a8dc85ac3
や
https://support.borndigital.co.jp/hc/ja/articles/4404557527577-Houdini-%E3%81%AB%E5%A4%96%E9%83%A8%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%92%E3%82%A4%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%88%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95
にあるようにpip のインストールから始める必要があります。

https://bootstrap.pypa.io/get-pip.py
からget-pip.pyをダウンロードして

Houdini で Windows > Shell
から

```
hython C:\Users\jyour\Documents\pipforhoudini\get-pip.py
```
を実行します。
※パスは自分の環境にあわせてください
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/d9c4db6a-4d77-d97c-3d75-90b9e7c9a889.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/529dff7c-eaa4-2ea9-0bc2-9dd927a99909.png)

※Houdini19からは念願のpython3になったので、
https://bootstrap.pypa.io/pip/2.7/get-pip.py
からダウンロードする必要はありません

ここで
今回は
https://pypi.org/project/python-osc/
のモジュールをインストールします。

```
hython -m pip install python-osc
```

を実行します。

## Houdiniでの実装

TBD


# TCP とUDP

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/64b9c803-e854-2e9c-cea2-009cc424b51c.png)

この２つはトランスポート層の代表的なプロトコルです。
TCPは信頼性のある通信を提供し、UDPは同報通信や細かい制御は後は任せたという通信に利用されます。どちらが上とかそういうものではなく用途に応じてプロトコルの選択を行います。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/73308335-06e3-d6e1-e911-5fde3afb547d.png)
※詳しくは　[マスタリングTCP/IP](https://www.amazon.co.jp/%E3%83%9E%E3%82%B9%E3%82%BF%E3%83%AA%E3%83%B3%E3%82%B0TCP-IP-%E5%85%A5%E9%96%80%E7%B7%A8%EF%BC%88%E7%AC%AC6%E7%89%88%EF%BC%89-%E4%BA%95%E4%B8%8A%E7%9B%B4%E4%B9%9F-ebook/dp/B0827QNDNT)　がお勧めです。

TCPの流れについては以下の記事が非常にわかりやすいです。
http://www.ne.jp/asahi/hishidama/home/tech/socket/
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151589/1b1be524-1431-3de1-a6da-68e9aafb5948.png)

# Python2からPython3への移行

Houdini19になり、Houdiniでの環境はPython3の環境になりました。
これ自体は非常に素晴らしい事なのですが、過去の2の資産コードを3に移行するのは
思った以上に手間がかかる場合があります。
小規模なものであれば print "test" を print("test")に直す程度ですみのですがなかなかそう簡単にはいきません。[2to3.py](https://docs.python.org/ja/3/library/2to3.html) というナイスな変換ツールもありますが、これも完璧ではありません。

[このサイト](http://diveintopython3-ja.rdy.jp/porting-code-to-python-3-with-2to3.html)にある通り、多くの破壊的な変更があるため
単純に　2to3.py を実行したとしてもそれで終了というわけにはいきません。

Queue モジュールがqueueモジュールになったところは自動で変えてくれましたが、3からの変更点であるsocket通信時に使用する　socket モジュールが、byte でしか通信出来ないらしくencode　decodeをそれぞれ行う必要がありました。

http://esperancery.seesaa.net/article/473004245.html

この記事がなければ、あと1週間はわからなかった、、
他にも色々なトラップが仕込んでありそうです。。恐ろしい！

ちなみにHoudini で利用できるモジュール一覧は Python Shell に

```
help('modules')
```
と入力すると確認ができます。

# まとめ
- センサーとHoudiniの相性は抜群、あとはどれだけノウハウを貯められるかにかかっている
- 中規模以上の処理はいきなり全部つくるのではなく小さくはじめて徐々にスケールしよう
- 自分が知らない分野に挑戦しよう！なんの因果かそれは将来思いがけない場所で非常に役に立ちます

以上

次回2日目の記事はてんちょー さんの「SOP~TOPまでのワークフロー的なやつをかきます」です