Premier commit - Introdution au système git.

This commit is contained in:
2021-05-19 00:04:11 +02:00
commit 3ecabe62fa
84 changed files with 8742 additions and 0 deletions
BIN
View File
Binary file not shown.
+275
View File
@@ -0,0 +1,275 @@
\documentclass[11pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[french]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{courier}
\usepackage{appendix}
\usepackage{appendixnumberbeamer}
\usepackage{minted}
\usetheme{Madrid}
%\usetheme{Warsaw}
\addtobeamertemplate{frametitle}{
\let\insertframetitle\insertsectionhead}{}
\addtobeamertemplate{frametitle}{
\let\insertframesubtitle\insertsubsectionhead}{}
\makeatletter
\CheckCommand*\beamer@checkframetitle{\@ifnextchar\bgroup\beamer@inlineframetitle{}}
\renewcommand*\beamer@checkframetitle{\global\let\beamer@frametitle\relax\@ifnextchar\bgroup\beamer@inlineframetitle{}}
\makeatother
\hypersetup{pdfpagemode=FullScreen}
% Transition en fade-in par défaut
\addtobeamertemplate{background canvas}{\transfade[duration=0.4]}{}
\usebeamercolor{orchid}
\begin{document}
\author{Samy Avrillon - 24817}
\title{Stockage et génération de topographie artificielle de fond océanique}
\subtitle{Projet "Sonar de l'infini"}
\logo{\includegraphics[width=.5cm]{logoLafayette}}
\institute{Lycée Lafayette}
%\subject{}
%\setbeamercovered{transparent}
%\setbeamertemplate{navigation symbols}{}
\begin{frame}[plain]
\maketitle
\end{frame}
\section*{Sommaire}
\begin{frame}
\frametitle{Sommaire}
\pause
\begin{multicols}{2}
\tableofcontents[pausesections]
\end{multicols}
\end{frame}
\section{Introduction}
\subsection{Le but : un format inéxistant}
\begin{frame}
\pause
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\item<2-4> Un champ des hauteurs
\item<3-4> Une discrétisation 3D
\item<4> Quelques formats privés
\end{itemize}
\column{0.5\textwidth}
\only<2>{
\begin{figure}
\includegraphics[width=\textwidth]{heightmapExample}
\caption{Exemple de champ de hauteur}
\end{figure}
}
\only<3>{
\begin{figure}
\includegraphics[width=\textwidth]{discretisation3d}
\caption{Exemple de discrétisation 3d de l'espace}
\end{figure}
}
\end{columns}
\end{frame}
\subsection{Débouchés et utilisations}
\begin{frame}
\pause
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}[<+->]
\item<2-4> Jeu vidéo on monde ouvert
\item<3-4> Graphisme, cinéma
\item<4> Simulation physique ou de rover
\end{itemize}
\column{0.5\textwidth}
\only<2>{
\begin{figure}
\includegraphics[width=\textwidth]{minecraftOcean}
\caption{Capture du jeu vidéo Minecraft}
\end{figure}
}
\only<3>{
\begin{figure}
\includegraphics[width=0.8\textwidth]{nemoCoraux}
\includegraphics[width=0.8\textwidth]{samyTortue}
\caption{Extrait des films \fg{} Le monde de némo \og et \fg{} Le Voyage extraordinaire de Samy \og}
\end{figure}
}
\end{columns}
\end{frame}
\section{Le format TMF}
\subsection{Contraintes}
\begin{frame}
\pause
\begin{itemize}[<+->]
\item Liberté totale
\item Complexité spatiale
\item Référencabilité
\end{itemize}
\end{frame}
\subsection{Modélisation}
\begin{frame}
\frametitle{Modélisation}
\pause
\begin{figure}
\includegraphics[height=0.6\textheight]{fond}
\caption{Représentation 2D du stockage des colonnes}
\end{figure}
\end{frame}
\subsection{Réalité du stoquage}
\begin{frame}
Ici format de fichier,
\end{frame}
\subsection{Algorithme d'abstraction: tmfeur}
\section{Module Objection}
\subsection{Minecraft}
\begin{frame}
\pause
\begin{figure}
\includegraphics[height=0.6\textheight]{minecraftGrottes}
\caption{Usage de Minecraft comme moteur graphique}
\end{figure}
\end{frame}
\subsection{Rectangle}
\begin{frame}
\pause
\begin{figure}
\includegraphics[height=0.6\textheight]{recImage}
\caption{Usage de rectangles}
\end{figure}
\end{frame}
\subsection{Colonnes}
\begin{frame}
\pause
\begin{figure}
\includegraphics[height=0.6\textheight]{filImage}
\caption{Usage de parallélépipèdes}
\end{figure}
\end{frame}
\subsection{Triangles}
\begin{frame}
\pause
\begin{figure}
\includegraphics[height=0.6\textheight]{triImage}
\caption{Usage de triangles}
\end{figure}
\end{frame}
\section{Génération}
\subsection{Contraintes}
\begin{frame}
\pause
\begin{itemize}[<+->]
\item Infinité
\item Répétabilité
\item Modulabilité
\end{itemize}
\end{frame}
\subsection{Noisette}
\subsubsection{Méthodes et attributs}
\begin{frame}
\pause
\begin{itemize}[<+->]
\item \texttt{getChunk(self,x,y,n)}
\item \texttt{\_\_add\_\_(self,other)}
\item \texttt{\_\_rmul\_\_(self,other)}
\item \texttt{\_\_sub\_\_(self,other)}
\end{itemize}
\end{frame}
\subsubsection{Bruits généraux}
\begin{frame}
\pause
\begin{itemize}[<+->]
\item Bruit sur le cercle trigonométrique
\item Bruit avec des interpolations linéaires
\item Bruit avec des droites
\item Bruit de Perlin (2d)
\item Bruit fractal
\end{itemize}
\end{frame}
\subsection{Cartman}
\begin{frame}
\frametitle{Bruit de Perlin}
\pause
\begin{figure}
\includegraphics[height=0.6\textheight]{perlin}
\caption{Heightmap créée par un bruit de perlin}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{Bruit Fractal}
\begin{columns}
\pause
\begin{column}{0.5\textwidth}
\begin{figure}
\includegraphics[width=0.8\textwidth]{bfractal}
\caption{Bruit fractal avec peu de droites}
\end{figure}
\end{column}
\pause
\begin{column}{0.5\textwidth}
\begin{figure}
\includegraphics[width=0.8\textwidth]{hfractal}
\caption{Bruit fractal avec plus de droites}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\subsubsection{Quelques algorithmes}
\begin{frame}
Bruit Caverne à présenter
\end{frame}
\appendix
\section{Sommaire}
\begin{frame}
TODO sommaire de l'appendice
\end{frame}
\section{Python}
\subsection{data.py}
\begin{frame}[allowframebreaks]
\inputminted[fontsize=\footnotesize,breaklines=true]{python}{data.py}
\end{frame}
\subsection{objection.py}
\begin{frame}[allowframebreaks]
\inputminted[fontsize=\footnotesize,breaklines=true]{python}{objection.py}
\end{frame}
\subsection{perlin.py}
\begin{frame}[allowframebreaks]
\inputminted[fontsize=\footnotesize,breaklines=true]{python}{perlin.py}
\end{frame}
\subsection{tmf.py}
\begin{frame}[allowframebreaks]
\inputminted[fontsize=\footnotesize,breaklines=true]{python}{tmf.py}
\end{frame}
\end{document}
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=Diapo-compesse.pdf Diapo.pdf
+153
View File
@@ -0,0 +1,153 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 28 17:39:43 2019
Module contanant les classes générales structurant les données, ainsi que les
@author: mysaa
"""
import numpy as np
def appendeur(l1,l2):
"""
Effectue l1=l1+l2 de manière opti
"""
for l in l2:
l1.append(l)
class WorldChunk():
def getSize(self):
raise NotImplementedError("Vous avez fait un monde qui n'implemente pas cette méthode. Vous êtes bizzare vous savez ? Un monde sans taille !!!")
def getColumn(self,x,y):
raise NotImplementedError("Vous avez fait un monde qui n'implemente pas cette méthode. Vous êtes bizzare vous savez ?")
def asList(self):
return [ [self.getColumn(x,y) for y in range(self.size[1])] for x in range(self.size[0]) ]
def getIndexed(self,fullCoords=False,addZero=False):
points = []
pointIndexes = [0]
for pos in np.ndindex(self.getSize()):
col = self.getColumn(pos[0],pos[1])
if(addZero): col = np.insert(col,0,0)
if(fullCoords): col = [(pos[0],pos[1],c) for c in col]
appendeur(points,col)
pointIndexes.append(pointIndexes[-1]+len(col))
return points,pointIndexes
class CollageWorldChunk(WorldChunk):
def __init__(self,chunk,xp,yp,xy):
self.orgChunk,self.xp,self.yp,self.xy = chunk,xp,yp,xy
self.orgSize = chunk.getSize()
def getSize(self) : return (self.orgChunk.size[0]+1,self.orgChunk.size[1]+1)
def getColumn(self,x,y):
xout,yout = x>=self.orgSize[0],y>=self.orgSize[1]
if(xout and yout):
return self.xy.getColumn(x-self.orgSize[0],y-self.orgSize[1])
if(xout):
return self.xp.getColumn(x-self.orgSize[0],y)
if(yout):
return self.yp.getColumn(x,y-self.orgSize[1])
return self.orgChunk.getColumn(x,y)
class ArrayedWorldChunk(WorldChunk):
def fromList(liste):
size = len(liste),len(liste[0])
indexes=np.empty(size[0]*size[1]+1,dtype=np.uint32)
index = 0
data = []
for y in range(size[1]):
for x in range(size[0]):
indexes[x+size[0]*y]=index
data += liste[x][y]
index += len(liste[x][y])
indexes[size[0]*size[1]] = index
data = np.array(data,dtype=np.float)
return ArrayedWorldChunk(size,indexes,data)
def __init__(self,size,indexes,data):
self.size = size
self.indexes=indexes
self.data=data
def getColumn(self,x,y):
i0,i1 = self.indexes[x+self.size[0]*y],self.indexes[x+self.size[0]*y+1]
return self.data[i0:i1]
def getSize(self) : return self.size
class Noise:
def getChunk(self,x,y,n):
"""
Cette fonction renvoie un array numpy de taille rx*ry correspondant au chunk x y avec le seed donné.
Cette fonction doit être déterministe (si les attributs de l'objets ne sont pas changés bien sur)
"""
raise NotImplementedError("Vous avez fait un bruit qui n'implemente pas cette méthode. Vous êtes bizzare vous savez ?")
def __add__(self,other):
def addedChunk(self,x,y,n):
return self.noise1.getChunk(x,y,n) + self.noise2.getChunk(x,y,n)
noise = Noise()
noise.noise1 = self
noise.noise2 = other
noise.getChunk = addedChunk
return noise
def __iadd__(self,other):
return self.__add__(other)
def __rmul__(self,other):
if type(other) in ['float','int']:
def mulChunk(self,x,y,n):
return self.prop*self.noise1.getChunk(x,y,n)
noise = Noise()
noise.noise1 = self
noise.prop = other
noise.getChunk = mulChunk
else:
def mulChunk(self,x,y,n):
return self.noise1.getChunk(x,y,n) * self.noise2.getChunk(x,y,n)
noise = Noise()
noise.noise1 = self
noise.noise2 = other
noise.getChunk = mulChunk
return noise
def __sub__(self,other):
def subChunk(self,x,y,n):
return self.noise1.getChunk(x,y,n) - self.noise2.getChunk(x,y,n)
noise = Noise()
noise.noise1 = self
noise.noise2 = other
noise.getChunk = subChunk
return noise
Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 KiB

+665
View File
@@ -0,0 +1,665 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="171mm"
height="96mm"
viewBox="0 0 171 96.000002"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="fond.svg">
<defs
id="defs2">
<marker
inkscape:stockid="Arrow1Send"
orient="auto"
refY="0.0"
refX="0.0"
id="marker5549"
style="overflow:visible;"
inkscape:isstock="true">
<path
id="path5547"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#ffffff;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.2) rotate(180) translate(6,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Sstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Sstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4945"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#ffffff;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.2) translate(6,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Send"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Send"
style="overflow:visible;"
inkscape:isstock="true">
<path
id="path4948"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#ffffff;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.2) rotate(180) translate(6,0)" />
</marker>
<marker
style="overflow:visible"
id="DistanceStart"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="DistanceStart"
inkscape:isstock="true">
<g
id="g2300"
style="stroke:#000000;stroke-opacity:1;fill:#ffffff;fill-opacity:1">
<path
style="fill:#ffffff;stroke:#000000;stroke-width:1.15;stroke-linecap:square;stroke-opacity:1;fill-opacity:1"
d="M 0,0 L 2,0"
id="path2306" />
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;fill-opacity:1"
d="M 0,0 L 13,4 L 9,0 13,-4 L 0,0 z "
id="path2302" />
<path
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-opacity:1;fill-opacity:1"
d="M 0,-4 L 0,40"
id="path2304" />
</g>
</marker>
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mend"
style="overflow:visible;"
inkscape:isstock="true">
<path
id="path4942"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#ffffff;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.4) rotate(180) translate(10,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4951"
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) translate(1,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="545.48304"
inkscape:cy="160.38082"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="mm"
inkscape:pagecheckerboard="false"
inkscape:window-width="1366"
inkscape:window-height="709"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-200.99998)">
<rect
style="fill:#2e00d3;fill-opacity:1;stroke:none;stroke-width:0.79403234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4653"
width="170.6492"
height="95.87648"
x="0.17539978"
y="201.06174" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.5159505;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10"
width="5.0079031"
height="73.768311"
x="5.3582149"
y="218.42317" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.53897732;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-6"
width="5.0171337"
height="80.351669"
x="10.361502"
y="211.85553" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.30675566;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-7"
width="5.0079031"
height="26.075878"
x="15.404671"
y="266.15738" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.28103706;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-5"
width="5.0079031"
height="21.886734"
x="20.412569"
y="270.34653" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.26525033;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-3"
width="5.0351334"
height="19.391466"
x="25.297941"
y="272.96432" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.24671662;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-56"
width="5.0351334"
height="16.776276"
x="30.333073"
y="275.57953" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.24395819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-2"
width="5.1045647"
height="16.180122"
x="35.3335"
y="276.21039" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.23208007;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-9"
width="5.0351334"
height="14.844803"
x="40.403351"
y="277.51099" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.21698384;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-1"
width="5.1315393"
height="12.732593"
x="45.390278"
y="279.67139" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.24474481;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-27"
width="5.0351334"
height="16.509188"
x="50.473614"
y="275.84659" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22369346;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-0"
width="5.0351334"
height="13.791304"
x="55.508751"
y="278.56448" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.19373304;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-93"
width="5.0351334"
height="10.344419"
x="60.543877"
y="282.01138" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.23857896;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-60"
width="5.0351334"
height="15.687835"
x="65.579018"
y="276.66797" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-62"
width="5.0300837"
height="14.060173"
x="70.614151"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-61"
width="5.0300837"
height="14.060173"
x="75.644226"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-8"
width="5.0300837"
height="14.060173"
x="80.674309"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-79"
width="5.0300837"
height="14.060173"
x="85.704399"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-20"
width="5.0300837"
height="14.060173"
x="90.734489"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-23"
width="5.0300837"
height="14.060173"
x="95.764587"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-75"
width="5.0300837"
height="14.060173"
x="100.79462"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-92"
width="5.0300837"
height="14.060173"
x="105.82474"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-28"
width="5.0300837"
height="14.060173"
x="110.85483"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-97"
width="5.0300837"
height="14.060173"
x="115.8849"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36"
width="5.0300837"
height="14.060173"
x="120.91499"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-1"
width="5.0300837"
height="14.060173"
x="125.94507"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-2"
width="5.0300837"
height="14.060173"
x="130.97516"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-9"
width="5.0300837"
height="14.060173"
x="136.00525"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-3"
width="5.0300837"
height="14.060173"
x="141.03534"
y="278.25549" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.51674014;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-19"
width="5.0079031"
height="73.994278"
x="146.06543"
y="218.32138" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.52555859;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-19-4"
width="5.0079031"
height="76.541336"
x="151.07333"
y="215.77432" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.54030454;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-19-7"
width="5.0079031"
height="80.896736"
x="156.08124"
y="211.41893" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.52905655;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-19-8"
width="5.0079031"
height="77.563599"
x="161.08914"
y="214.75206" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.30675566;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-7-4"
width="5.0079031"
height="26.07588"
x="15.378635"
y="210.79721" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.28387639;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-3-5"
width="5.0351334"
height="22.210445"
x="25.470028"
y="206.0863" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.28517467;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-56-0"
width="5.0351334"
height="22.414066"
x="30.505161"
y="208.52849" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.31338966;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-2-3"
width="5.0351334"
height="27.068741"
x="35.540306"
y="206.51961" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.33414468;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-9-6"
width="5.0351334"
height="30.772858"
x="40.575436"
y="208.10709" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.32834858;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-1-1"
width="5.0351334"
height="29.714539"
x="45.610569"
y="205.46129" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.30311945;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-27-0"
width="5.0693293"
height="25.15283"
x="50.628605"
y="207.3943" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.2901814;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-0-6"
width="5.0351334"
height="23.208008"
x="55.680836"
y="208.2637" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.28728414;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-93-3"
width="5.0351334"
height="22.746889"
x="60.715961"
y="207.13734" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.31338966;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-60-2"
width="5.0351334"
height="27.068741"
x="65.751114"
y="204.93213" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.3009901;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-3-5-0"
width="5.047533"
height="24.907778"
x="20.422495"
y="208.15141" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.19651835;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-62-6"
width="5.0593157"
height="10.593125"
x="70.771629"
y="241.73154" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.20728494;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-61-1"
width="5.0485487"
height="11.810781"
x="75.807098"
y="244.00478" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-8-5"
width="5.0300837"
height="14.060173"
x="80.846413"
y="245.45027" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.27457732;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-79-5"
width="4.9812565"
height="21.003906"
x="85.900917"
y="241.77057" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22912541;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-20-4"
width="5.0144625"
height="14.528869"
x="90.889984"
y="243.37294" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-23-7"
width="5.0300837"
height="14.060173"
x="95.842194"
y="246.47086" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.24984716;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-75-6"
width="5.014329"
height="17.2761"
x="100.88016"
y="245.42041" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-92-5"
width="5.0300837"
height="14.060173"
x="105.99683"
y="243.86279" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.23376569;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-28-6"
width="5.038465"
height="15.051262"
x="111.02273"
y="241.74196" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.27858368;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-97-9"
width="5.0064182"
height="21.51265"
x="116.06884"
y="237.88997" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.29652894;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-37"
width="4.9840579"
height="24.48278"
x="121.11011"
y="238.51682" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.30494329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-1-4"
width="4.9643555"
height="25.994709"
x="126.15005"
y="239.5341" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.30701888;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-2-5"
width="4.9781718"
height="26.276651"
x="131.17323"
y="236.98726" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.33450949;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-9-2"
width="4.958868"
height="31.314398"
x="136.21298"
y="235.14709" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.3934584;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-36-3-5"
width="4.9187098"
height="43.677338"
x="141.26314"
y="225.03587" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.28808108;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-62-4"
width="5.0459113"
height="22.824408"
x="70.778336"
y="206.51169" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.26175141;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-61-7"
width="4.9870887"
height="19.065166"
x="75.837822"
y="207.5735" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.25958091;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-8-4"
width="5.0300837"
height="18.590023"
x="80.846405"
y="206.26607" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.24191141;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-79-4"
width="5.0181313"
height="16.183794"
x="85.882469"
y="207.58391" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-20-3"
width="5.0300837"
height="14.060173"
x="90.906578"
y="208.1071" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-23-0"
width="5.0300837"
height="14.060173"
x="95.936684"
y="207.57793" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.22575018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-75-7"
width="5.0300837"
height="14.060173"
x="100.96672"
y="207.04877" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.21416378;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-92-8"
width="5.0300837"
height="12.653961"
x="105.99683"
y="206.33833" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.18696997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-28-68"
width="5.0200224"
height="9.6637945"
x="111.03195"
y="207.37691" />
<rect
style="fill:#b1b1b1;fill-opacity:1;stroke:#000000;stroke-width:0.14067207;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect10-97-8"
width="5.0300837"
height="5.4594669"
x="116.057"
y="209.82872" />
<path
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0.75189924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5549)"
d="M 3.7041667,292.4141 V 204.96278"
id="path4931"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:5.82004309px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14550108"
x="5.1185122"
y="209.7113"
id="text5934"><tspan
sodipodi:role="line"
id="tspan5932"
x="5.1185122"
y="209.7113"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Linux Libertine Display O';-inkscape-font-specification:'Linux Libertine Display O';fill:#ffffff;fill-opacity:1;stroke-width:0.14550108">z=42m</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:5.82004309px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14550108"
x="4.907176"
y="295.92572"
id="text5934-7"><tspan
sodipodi:role="line"
x="4.907176"
y="295.92572"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Linux Libertine Display O';-inkscape-font-specification:'Linux Libertine Display O';fill:#ffffff;fill-opacity:1;stroke-width:0.14550108"
id="tspan5954">z=0m</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

+98
View File
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="371.862"
height="336.866"
viewBox="0 0 371.862 336.866"
version="1.1"
id="svg863"
sodipodi:docname="logo_lafayette.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:export-filename="F:\Sonar\Diapo\logo_lafayette.svg.png"
inkscape:export-xdpi="92.800003"
inkscape:export-ydpi="92.800003">
<metadata
id="metadata869">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs867" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="962"
id="namedview865"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.97816438"
inkscape:cx="65.453353"
inkscape:cy="186.91296"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg863" />
<path
d="M 172.72,49.576 256.622,14.607 209.616,12.904 Z M 296.255,0 269.303,12.261 h 0.14 l 51.307,1.872 z"
id="path843"
inkscape:connector-curvature="0"
style="fill:#8c0a71" />
<path
d="m 31.366,111.525 45.861,29.02 3.938,-3.91 15.501,-15.362 0.028,-0.028 v -0.056 l 1.09,-37.343 -66.418,27.68 z m 1.62,4.33 v 0.027 l 15.613,53.151 v 0.028 l 22.064,-21.98 4.525,-4.498 -5.893,-3.714 -36.31,-23.015 z"
id="path845"
inkscape:connector-curvature="0"
style="fill:#ec7303" />
<path
d="m 99.04,263.605 h -0.028 l -37.482,-14.412 2.263,57.592 h 3.184 l 8.267,-11.116 z m 28.35,10.893 -0.028,-0.028 -25.612,-9.832 h -0.028 l -22.68,30.584 -8.602,11.563 h 74.043 z"
id="path847"
inkscape:connector-curvature="0"
style="fill:#77b827" />
<path
d="M 218.777,309.578 H 149.12 l 14.44,27.288 81.584,-17.15 -26.366,-10.138 z m -7.29,-2.793 -57.731,-22.177 -22.4,-8.602 16.283,30.779 64.044,0.084 z"
id="path849"
inkscape:connector-curvature="0"
style="fill:#079283" />
<path
d="m 330.05,306.785 h 29.69 l 12.122,-21.171 -41.811,21.17 z m -75.047,13.714 23.768,9.133 39.605,-20.054 H 226.57 l 28.433,10.92 z"
id="path851"
inkscape:connector-curvature="0"
style="fill:#046aa5" />
<path
d="m 99.543,118.368 h 0.028 l 14.999,-14.915 v -0.028 l 46.084,-45.805 -60.05,25.053 -1.06,35.695 z m 1.983,-66.725 -0.838,27.958 65.161,-27.148 0.056,-0.028 0.028,-0.028 23.21,-23.098 z"
id="path853"
inkscape:connector-curvature="0"
style="fill:#d30846" />
<path
d="M 47.258,174.34 0,221.32 57.117,208.835 h 0.028 l -0.056,-0.978 -9.831,-33.516 z m 78.344,0.168 -47.984,-30.388 -5.335,5.306 -22.79,22.652 v 0.028 l 10.39,35.471 0.027,0.642 88.455,-19.3 z m -3.687,-5.642 v -0.028 l -9.245,-59.547 -13.238,13.127 -2.877,2.849 v 0.028 l -16.898,16.785 7.066,4.469 35.192,22.316 z"
id="path859"
inkscape:connector-curvature="0"
style="fill:#f5ba0f" />
<path
d="m 152.36,190.93 h -0.057 l -92.28,20.138 1.396,35.08 39.325,15.139 h 0.028 l 31.924,-43.013 20.445,-27.511 v -0.028 l -0.782,0.196 z m -48.907,71.39 5.866,2.262 16.06,6.145 h 0.028 l 3.938,1.508 v 0.028 l 19.998,7.653 -17.652,-55.609 z M 57.117,244.268 V 211.833 L 2.391,223.32 Z"
id="path861"
inkscape:connector-curvature="0"
style="fill:#c7d504" />
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 MiB

+365
View File
@@ -0,0 +1,365 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 22 19:46:36 2019
@author: mysaa
"""
import numpy as np
from data import CollageWorldChunk
from perlin import CavernedNoise2,TestNoise
def getTriangles(x0,y0,chunk,xp,yp,xy):
nx,ny = chunk.size
newChunk = CollageWorldChunk(chunk,xp,yp,xy)
# pointIndexes = np.zeros((nx+1,ny+1),dtype=np.uint32)
# pointLengthes = np.zeros((nx+1,ny+1),dtype=np.uint32)
# points = []
#
#
# pos = 0
# for j in range(ny):
# for i in range(nx):
# carotte = [(x0+i/nx,y0+j/ny,z) for z in sorted([0.]+list(chunk.getColumn(i,j)))]
# points += carotte
# pointLengthes[i,j] = len(carotte)
# pointIndexes[i,j] = pos
# pos+=len(carotte)
# carotte = [(x0+1,y0+j/ny,z) for z in sorted([0.]+list(xp.getColumn(0,j)))]
# points += carotte
# pointLengthes[nx,j]= len(carotte)
# pointIndexes[nx,j] = pos
# pos+=len(carotte)
# for i in range(nx):
# carotte = [(x0+i/nx,y0+1,z) for z in sorted([0.]+list(yp.getColumn(i,0)))]
# points += carotte
# pointLengthes[i,ny] = len(carotte)
# pointIndexes[i,ny] = pos
# pos+=len(carotte)
# carotte = [(x0+1,y0+1,z) for z in sorted([0.]+list(xy.getColumn(0,0)))]
# points += carotte
# pointLengthes[nx,ny] = len(carotte)
# pointIndexes[nx,ny] = pos
points,pointIndexes = newChunk.getIndexed(fullCoords=True,addZero=True)
points=[(p[0]/nx+x0,p[1]/ny+y0,p[2]) for p in points]
pointLengthes = np.reshape([pointIndexes[i+1]-pointIndexes[i] for i in range(len(pointIndexes)-1)],(nx+1,ny+1))
pointIndexes = np.reshape(pointIndexes[:-1],(nx+1,ny+1))
print(points,pointIndexes,pointLengthes)
triangles = []
for x in range(nx*2):
for y in range(ny):
# On récupère les coordonées entières du triangle indicé (x,y)
if(x%2==0):
col0=(x//2 ,y )
col1=(x//2+1,y )
col2=(x//2 ,y+1)
else:
col0=(x//2+1,y+1)
col1=(x//2+1,y )
col2=(x//2 ,y+1)
# On récupère la liste des points dans la colonne
colonne0 = points[pointIndexes[col0[0],col0[1]]:pointIndexes[col0[0],col0[1]]+pointLengthes[col0[0],col0[1]]]
colonne1 = points[pointIndexes[col1[0],col1[1]]:pointIndexes[col1[0],col1[1]]+pointLengthes[col1[0],col1[1]]]
colonne2 = points[pointIndexes[col2[0],col2[1]]:pointIndexes[col2[0],col2[1]]+pointLengthes[col2[0],col2[1]]]
#print("colonne:",colonne1)
# st contient des triplets (numéro de colonne,index interne dans la colonne,coordonée z)
st = [(0,i,colonne0[i][2]) for i in range(len(colonne0))]
st += [(1,i,colonne1[i][2]) for i in range(len(colonne1))]
st += [(2,i,colonne2[i][2]) for i in range(len(colonne2))]
# On y trie par coordonée z
st = sorted(st,key=lambda c:c[2])
#Liste des coordonées des colonnes, pour pouvoir sélectionner les coordonées selon l'index de la colonne
cols = [col0,col1,col2]
# Là, tout est bon à peu près
i=0
try:
while i<len(st):
v1 = st[i] ; i+=1
v2 = st[i] ; i+=1
if v1[0]==v2[0]: continue #Cas où une colonne apparait puis disparaît
v3 = st[i] ; i+=1
v4=v3 # Pour pouvoir observer le changement de colonne dans la chaine aller/retour 2/1
while v1[0]+v2[0]+v3[0]!=3:
# On est dans la chaine aller-retour 2/1
if v4[0]!=v3[0]:
# Les deux colonnes ont disparu
# On peut créer le rectangle v1,v2,v3,v4
triangle1 = [pointIndexes[cols[v[0]]] + v[1] for v in (v1,v2,v3)]
triangle2 = [pointIndexes[cols[v[0]]] + v[1] for v in (v1 if v1[0]==v3[0] else v2,v3,v4)]
triangles.append(triangle1)
triangles.append(triangle2)
break
v4=v3
v3 = st[i] ; i+=1
else:
# On est dans le cas ou v1,v2,v3 correspondent à trois colonnes
# différentes (le cas (1,1,1) ayant déjà été filtré par la première condition)
# On ajoute le triangle en dessous
triangle = [pointIndexes[cols[v[0]]] + v[1] for v in (v1,v2,v3)]
triangles.append(triangle)
# On "attends" jusqu'à ce que les trois colonnes soient à nouveau vides
vs = [None,None,None]
while None in vs:
v = st[i] ; i+=1
vs[v[0]] = v if vs[v[0]]==None else None
# Avec cette mthode, on déssine le triangle avec les derniers points étant apparus (les plus hauts)
triangle = [pointIndexes[cols[v[0]]] + v[1] for v in vs]
triangles.append(triangle)
continue
except ValueError:
# Une fin de liste a été atteinte, la colonne n'a pas été refermée: lance un warn
print("Attention ! Une colonne n'avait pas de toit. veuillez vérifier que vos colonnes aient un nombre impair de coordonées, merci !")
return points,triangles
########################################
# while i<len(st):
# #Plein
# v0 = st[i]
# i+=1
# v1 = st[i]
# i+=1
# if(v0[0] == v1[0]): # S'est la même colonne qui est apparu puis disparu
#
# print("Tribord")
# colz = cols[v0[0]]
# # Triangle sur les bords
# # Demis-points
# halfZ = (v0[2]+v1[2])/2
# #Les deux autres colonnes sont :
# cola = cols[(v0[0]+1)%3]
# colb = cols[(v0[0]+2)%3]
#
# zi1,zi2=pointIndexes[colz]+v0[1],pointIndexes[colz]+v1[1]
# print('OoOOoO',points[zi1],points[zi2])
#
## points.append( (x0+(cola[0])/nx,y0+(cola[1])/ny,halfZ) )
## points.append( (x0+(colb[0])/nx,y0+(colb[1])/ny,halfZ) )
##
## triangles.append([zi1,len(points)-1,len(points)-2])
## triangles.append([zi2,len(points)-1,len(points)-2])
# print("Tribord-fin")
# # print(points[-1],points[-2],points[zi1])
# #print(cola,colb,points[triangles[-1][0]-1],points[triangles[-1][1]-1],points[triangles[-1][2]-1])
#
# else: # Deux colonnes différentes ont apparus successivement
# # vs stoque les états des colonnes
# # vs[i] est l'état de la ième colonne, le point de st, dernier à apparaître si
# # cette colonne est présente, None sinon
# vs=[None,None,None]
# vs[v0[0]] = v0
# vs[v1[0]] = v1
# while None in vs and vs != [None,None,None]:# Tant qu'il y a une abscente ou une présente
# v2 = st[i]
# i+=1
# vs[v2[0]] = v2 if vs[v2[0]]==None else None
#
# if not None in vs:
# # Une face complète a été créée
# # Triangle complet
# # Face dessous (apparition de la colonne)
# triangle = [pointIndexes[cols[i]] + vs[i][1] for i in range(3)]
# triangles.append(triangle)
# #print("#",[points[triangle[i]] for i in range(0,3)])
#
#
# # On inverse le sens de vs, et stoque les premiers points à apparaître
# vs = [None,None,None]
# while None in vs and i<len(st):
# v2 = st[i]
# i+=1
# vs[v2[0]] = v2 if vs[v2[0]]==None else None
#
# #Face dessus
# if not None in vs:
# triangle = [pointIndexes[cols[i]] + vs[i][1] for i in range(3)]
# triangles.append(triangle)
# #print("0",[points[triangle[i]] for i in range(3)])
# else:
# # Il faut placer un carré
# #########################################
# print(points)
# return points,triangles
def getRectangles(x0,y0,chunk):
nx,ny = chunk.size
triangles = []
points = []
for x in range(nx) :
for y in range(ny):
for z in [0]+chunk.getColumn(x,y):
points.append([x/nx+x0,y/ny+y0,z])
points.append([x/nx+x0+1/nx,y/ny+y0,z])
points.append([x/nx+x0,y/ny+y0+1/ny,z])
points.append([x/nx+x0+1/nx,y/ny+y0+1/ny,z])
triangles.append([len(points)-4,len(points)-3,len(points)-2])
triangles.append([len(points)-3,len(points)-2,len(points)-1])
return points,triangles
def getRectCols(x0,y0,chunk):
nx,ny = chunk.size
triangles = []
points = []
e=0.3
for x in range(nx) :
for y in range(ny):
for z in [0]+chunk.getColumn(x,y):
points.append([x/nx+x0-e,y/ny+y0-e,z])
points.append([x/nx+x0+e,y/ny+y0-e,z])
points.append([x/nx+x0-e,y/ny+y0+e,z])
points.append([x/nx+x0+e,y/ny+y0+e/ny,z])
triangles.append([len(points)-4,len(points)-3,len(points)-2])
triangles.append([len(points)-3,len(points)-2,len(points)-1])
return points,triangles
def getFilled(x0,y0,chunk):
nx,ny = chunk.size
triangles = []
points = []
for x in range(nx) :
for y in range(ny):
boule = True
lz = 0
for z in sorted(chunk.getColumn(x,y)):
if boule:
points.append([x/nx+x0 ,y/ny+y0 ,z ])
points.append([x/nx+x0+1/nx,y/ny+y0 ,z ])
points.append([x/nx+x0 ,y/ny+y0+1/ny,z ])
points.append([x/nx+x0+1/nx,y/ny+y0+1/ny,z ])
points.append([x/nx+x0 ,y/ny+y0 ,lz])
points.append([x/nx+x0+1/nx,y/ny+y0 ,lz])
points.append([x/nx+x0 ,y/ny+y0+1/ny,lz])
points.append([x/nx+x0+1/nx,y/ny+y0+1/ny,lz])
l = len(points)
triangles.append([l-4,l-2,l-1])
triangles.append([l-4,l-3,l-1])
triangles.append([l-4,l-2,l-6])
triangles.append([l-4,l-8,l-6])
triangles.append([l-4,l-3,l-7])
triangles.append([l-4,l-8,l-7])
triangles.append([l-5,l-1,l-2])
triangles.append([l-5,l-6,l-2])
triangles.append([l-5,l-6,l-8])
triangles.append([l-5,l-7,l-8])
triangles.append([l-5,l-7,l-3])
triangles.append([l-5,l-1,l-3])
boule = not boule
lz = z
return points,triangles
def printObject(file,name,delta,points,triangles):
file.write("o "+name+"\n\n")
sf = lambda x : "%.6f" % float(x)
si = lambda x : str(int(x+1)+delta)
for p in points:
file.write("v "+sf(p[0])+" "+sf(p[1])+" "+sf(np.array(p[2])/20.)+"\n")
file.write("\n")
for t in triangles:
file.write("f "+" ".join([si(tp) for tp in t])+"\n")
def writeMap(filePath,noise,x0,y0,sx,sy,cx,cy,objType='triangle',log=print):
log("Génération de la carte")
generated = {}
formatter='\rÉcriture du chunk {};{} '+" "*(sx//10+sy//10)
for i in range(x0,sx+x0+(1 if objType=='triangle' else 0)):
for j in range(y0,sy+y0+(1 if objType=='triangle' else 0)):
log(formatter.format(i,j), end='\r')
generated[(i,j)] = noise.getChunk(i,j,(cx,cy))
log("Génération des objets")
file = open(filePath,"w+")
file.write("g carte\n")
delta=0
for i in range(x0,sx+x0):
for j in range(y0,sy+y0):
log(formatter.format(i,j), end='\r')
if objType=='triangle':
points,triangles = getTriangles(i,j,generated[(i,j)],generated[(i+1,j)],generated[(i,j+1)],generated[(i+1,j+1)])
elif objType=='rectangle':
points,triangles = getRectangles(i,j,generated[(i,j)])
elif objType=='filled':
points,triangles = getFilled(i,j,generated[(i,j)])
elif objType=='rectcols':
points,triangles = getRectCols(i,j,generated[(i,j)])
else:
raise ValueError("Je en connais pas le type d'objet "+objType)
printObject(file,"chunk_"+objType+"_"+str(i)+"-"+str(j),delta,points,triangles)
file.write("\n\n")
delta+=len(points)
log("\nTerminé ! "+" "*(sx//10+sy//10))
file.close()
noise = CavernedNoise2(93152)
size = 12
taille=16
#writeMap("gros.obj",noise,-size//2+1,-size//2+1,size,size,taille,taille,'triangle')
#writeMap("carte.obj",noise,2,1,1,1,4,4,'triangle')
#writeMap("carteTri.obj",noise,-8,-8,16,16,16,16,'triangle')
writeMap("carteRec.obj",noise,-8,-8,16,16,16,16,'rectangle')
writeMap("carteFil.obj",noise,-8,-8,16,16,16,16,'filled')
writeMap("carteRCo.obj",noise,-8,-8,16,16,16,16,'rectcols')
#xy0=-taille*size
#for x in range(2*taille):
# for y in range(2*taille):
#
# writeMap("render2/carte"+str(x)+","+str(y)+".obj",noise,xy0-size//2+x*size,xy0-size//2+y*size,size,size,'rectangle')
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+465
View File
@@ -0,0 +1,465 @@
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 8 15:13:12 2019
Ce module contient de nombreuses implémentations de Noise, permetant en les assemblant de créer des mondes
@author: mysaa
"""
from data import ArrayedWorldChunk,Noise
import random as r
import numpy as np
import sys
import matplotlib.pyplot as pp
import matplotlib.image as img
from mpl_toolkits.mplot3d import Axes3D
from math import sqrt,floor,ceil,pi
##### Paramètres #####
G = 4.5
F = 5.2
class RandNoise(Noise):
"""
Ce bruit renvoie une carte de vecteurs complexes (2d) du cercle trigonométrique (de module 1)
"""
seed = None
f = None
def __init__(self,seed,f=lambda r : r.random()):
self.seed = seed
self.f = f
def getRandomly(self,xg,yg):
"""
Cette fonction renvoie un nombre complexe aléatoire du cercle
trigonométrique, uniformément distribué selon l'argument.
Cette fonction est déterministe pour un même seed demandé.
"""
s = ((self.seed & 0xFFFFFFFFFFFFFFFF) << 64) | ((int(xg) & 0xFFFFFFFF) << 32) | (int(yg) & 0xFFFFFFFF)
r.seed(s)
return self.f(r)
def getChunk(self,x,y,n):
"""
x,y sont les coordonées du chunk à considérer (boucle au bout de 4294967296=2^32) java:int
n est un couple ou une liste d'aumoins deux éléments contenant la précision suivant x et y du chunk
"""
randomizer = lambda i,j : self.getRandomly(x+i,y+j)
return np.fromfunction(np.vectorize(randomizer),(n[0],n[1]))
class RandLinNoise(RandNoise):
y0 = 0
y1 = 1
def __init__(self,seed,y0,y1):
super().__init__(seed,lambda r : (y1-y0)*r.random() + y0)
class RandTrigNoise(RandNoise):
def __init__(self,seed):
super().__init__(seed,lambda r : np.exp(1j*2*pi*r.random()))
class DroiteNoise(Noise):
seed = None
F,D = 0,0
def __init__(self,seed,F,D):
self.seed = seed
self.F,self.D = F,D
def getChunk(self,x,y,n=None):
return self.getLoadedDroites(x,y)
# randomizer = lambda i,j : self.getRandomGradient(x+i,y+j)
#
# return np.fromfunction(np.vectorize(randomizer),(n,))
def getLoadedDroites(self,x,y):
"""
Cette fonction renvoie la liste des droites devant être considérées dans la génération du chunk x,y. Cela permet d'effectuer la génération procédurale.
"""
def dst(x0,x1,y0,y1):
"""
Cette fonction renvoie la ditance eucildienne 2D entre les points (x0,y0) et (x1,y1)
"""
return sqrt( (x1-x0)**2 + (y1-y0)**2 )
F = self.F
x0 = floor(x-F)
x1 = floor(x+F+1)
y0 = floor(y-F)
y1 = floor(y+F+1)
# print(x0,x1,y0,y1)
drts = []
for i in range(x0,x1+1):
for j in range(y0,y1+1):
for d in self.getDroitesOnChunk(i,j):
# Tester si la droite sera utile
dx = d[0]+i
dy = d[1]+j
if (x <= dx <= x+1 and y-F <= dy <= y+F+1) or (y <= dy <= y+1 and x-F <= dx <= x+F+1) or (min(dst(x,dx,y,dy),dst(x+1,dx,y,dy),dst(x+1,dx,y+1,dy),dst(x,dx,y+1,dy)) <= F):
drts.append((dx,dy,d[2]))
# print(len(drts))
return drts
def getDroitesOnChunk(self,xg,yg):
s = ((self.seed & 0xFFFFFFFFFFFFFFFF) << 64) | ((int(xg) & 0xFFFFFFFF) << 32) | (int(yg) & 0xFFFFFFFF)
r.seed(s)
L = []
for i in range(self.D):
lx = r.random()
ly = r.random()
theta = r.random()*2*pi
L.append((lx,ly,theta))
return L
class PerlinNoise(Noise):
G = None
randomizer = None
interpol = None
wrapper = None
def __init__(self,G,randomizer,interpol=lambda a,b,w : (b-a)*w**2*6*(1/2-w/3)+a,wrapper = lambda x : np.tanh(x*3.8622)): # Par défaut, un banale interpolation linéaire
self.G = G
if type(randomizer) == int:
randomizer = RandTrigNoise(randomizer)
self.randomizer = randomizer
self.interpol = interpol
self.wrapper = wrapper
def getChunkGradients(self,x,y):
G=self.G # Python de merde !
x0 = floor(x/G)
x1 = ceil((x+1)/G)
y0 = floor(y/G)
y1 = ceil((y+1)/G)
nx = x1-x0+1
ny = y1-y0+1
# grads = np.fromfunction(np.vectorize(lambda x,y : self.getPerlinGradient(x+x0,y+y0)),(nx,ny))
grads = self.randomizer.getChunk(x0,y0,(nx,ny))
return grads,x0,y0
def getChunk(self,x,y,n):
G = self.G
chunk = np.zeros(n) # Initialise la sortie
gradients,x0,y0 = self.getChunkGradients(x,y)
def dotGridGradient(ix, iy, tx, ty):
dx = tx - ix
dy = ty - iy
return (np.conj(gradients[ix-x0][iy-y0])*(dx+1j*dy)).real
for i in range(n[0]):
for j in range(n[1]):
#C------------D#
#| |#
#| |#
#| |#
#| x M |#
#| |#
#A------------B#
posx = x + i/n[0]
posy = y + j/n[1]
xx = posx / G
yy = posy / G
xx0 = floor(xx)
yy0 = floor(yy)
xx1 = xx0 + 1
yy1 = yy0 + 1
gA = dotGridGradient(xx0, yy0, xx, yy);
gB = dotGridGradient(xx1, yy0, xx, yy);
gC = dotGridGradient(xx0, yy1, xx, yy);
gD = dotGridGradient(xx1, yy1, xx, yy);
haut = self.interpol(gA, gB, xx - xx0);
bas = self.interpol(gC, gD, xx - xx0);
valeur = self.interpol(haut, bas, yy - yy0);
chunk[i,j] = valeur
return self.wrapper(chunk)
class FractalNoise(Noise):
F = None
D = None
epsilon = None
interpol = None
droiteMaker = None
def interpolizer(n,F):
"""
Retourne une fonction polynomiale réelle sur [-F,F] et nulle autre part, s'annule en F et -F, vaut 1 en 0 et a comme dérivée 0 en -F,0 et F. n+1 est le degré de la racine 0.
"""
return lambda x : 0 if abs(x)>F else 1 + (2*n**2+6*n+4)/(F**(2*n+4)) * ((x**2)/(2*n+4)-(F**2)/(2*n+2))*abs(x)**(2*n+2)
def __init__(self,F,D,epsilon,droiteMaker,n = 1):
self.F = F
self.D = D
self.epsilon = epsilon
if type(droiteMaker) == int:
droiteMaker = DroiteNoise(droiteMaker,F,D)
self.droiteMaker = droiteMaker
self.interpol = FractalNoise.interpolizer(n,F)
def getChunk(self,x,y,n):
drts = self.droiteMaker.getChunk(x,y)
chunk = np.zeros(n)
epsilon = self.epsilon
interpol = self.interpol
def dst(x0,x1,y0,y1):
return sqrt( (x1-x0)**2 + (y1-y0)**2 )
def kelkote(drt,x,y):
dx = drt[0]
dy = drt[1]
#print(x,y,dx,dy)
return 1 if (np.exp(1j*(drt[2]+pi/2)) * ((x-dx)+(dy-y)*1j)).real >= 0 else -1
# FractalNoise(0.7,511,0.01,42).getChunk(3,3,(16,16))
#33.8 s ± 72.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
for d in drts:
drteffect = lambda i,j : interpol(dst(d[0],i/n[0] + x,d[1],j/n[1] + y))*kelkote(d,i/n[0] + x,j/n[1] + y)*epsilon
chunk += np.fromfunction(np.vectorize(drteffect),n)
# FractalNoise(0.7,511,0.01,42).getChunk(3,3,(16,16))
#28.9 s ± 344 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
# for i in range(n[0]):
# for j in range(n[1]):
# posx = i/n[0] + x
# posy = j/n[1] + y
# value = 0
## print(i,j)
# for d in drts:
# value += interpol(dst(d[0],posx,d[1],posy))*kelkote(d,posx,posy)*epsilon
# chunk[i,j] = value
return chunk
class TestNoise(Noise):
nn = PerlinNoise
def getChunk(self,x,y,n):
indexes = np.array([i for i in range(n[0]*n[1]+1)])
data = np.ones((n[0]*n[1]))
return WorldChunk(n,indexes,data)
class CavernedNoise(Noise):
perlinSurface = None
perlinGrotte = None
perlinFond = None
def __init__(self):
self.perlinSurface = PerlinNoise(.5,64)
self.perlinGrotte = PerlinNoise(7 ,77)
self.perlinFond = PerlinNoise(.3 ,23)
def getChunk(self,x,y,n):
chk = self.perlinSurface.getChunk(x,y,n)
fond = self.perlinFond.getChunk(x,y,n)
grotte=self.perlinGrotte.getChunk(x,y,n)
out = []
for i in range(n[0]):
lig = []
for j in range(n[1]):
if(grotte[i,j]>.2): # Pas de grotte
lig.append([chk[i,j]])
elif(grotte[i,j]>0):
lig.append([fond[i,j]])
else:
lig.append([fond[i,j],chk[i,j]-0.1*abs(grotte[i,j]),chk[i,j]])
out.append(lig)
return out
class CavernedNoise2(Noise):
perlinCielH = None
perlinGHaut = None
perlinGH = None
perlinGHp = None
perlinGBas = None
#-x^(4)+4x^(3)-6x^(2)+4x
def __init__(self,seed):
self.perlinCielH = PerlinNoise(7 ,seed)
self.perlinGHaut = PerlinNoise(5 ,seed)
self.perlinGH = PerlinNoise(25 ,seed)
self.perlinGHp = PerlinNoise(1 ,seed)
self.perlinGBas = PerlinNoise(5 ,seed)
def getChunk(self,x,y,n):
gtTransform = np.vectorize(lambda x : 0 if x<0 else sqrt(2*x-x**2)**1.5)
transform=lambda M,a,b : M*b+a
cielH = transform(self.perlinCielH.getChunk(x,y,n),28,28)
gHaut = transform(self.perlinGHaut.getChunk(x,y,n),60,20)
ghp = transform(self.perlinGHp.getChunk(x,y,n) ,0.005,0.005)
ghh = transform(self.perlinGHp.getChunk(x,y,n) ,0.5,0.5)
gBas = transform(self.perlinGBas.getChunk(x,y,n),10,10)
gh = gtTransform(ghp+ghh)
toit = 128
out = []
for i in range(n[0]):
lig = []
for j in range(n[1]):
ch = cielH[i,j] # la hauteur entre la surface et le ciel
ght = gHaut[i,j] # haut limite de la grotte
gbs = gBas[i,j] # bas limite de la grotte
hauteur=gh[i,j] # pourcentage de hauteur de la grotte
grh = (ght+gbs +hauteur*(ght-gbs))/2 # vrai plafond de la grotte
grb = (ght+gbs -hauteur*(ght-gbs))/2 # vrai sol de la grotte
if(ght<=40):print(ght)
if hauteur==0:
# Pas de grotte
lig.append([toit-ch])
elif(grh+ch>=toit):
# La grotte est ouverte sur la surface
lig.append([grb])
else:
# Grotte souterraine et surface
lig.append([grb,grh,toit-ch])
out.append(lig)
return ArrayedWorldChunk.fromList(out)
#for c in cmaps:
# pp.figure()
# print(c)
# pp.imshow(I, cmap=c)
#sys.exit()
####### Fenêtre graphique #######
#from PyQt5.QtWidgets import QVBoxLayout,QHBoxLayout,QPushButton,QWidget,QApplication,QFormLayout,QLabel,QTextEdit,QDial
#
#app = QApplication([])
#
#class ExplorerWidget(QWidget):
#
# def __init__():
# print('wow')
#
##### Control Panel ####
#seedSelector = QTextEdit()
#ndroitesSelector = QDial()
#
#cPanel = QFormLayout()
#cPanel.addWidget(QLabel("Seed : "))
#cPanel.addWidget(seedSelector)
#cPanel.addWidget(QLabel("Nombre de droites :"))
#cPanel.addWidget(ndroitesSelector)
#
#globalL = QHBoxLayout()
#globalL.addStretch(1)
#globalL.addLayout(cPanel)
#
#window = QWidget()
#window.setLayout(globalL)
#window.show()
#
#app.exec_()
#
#(x0,x1,y0,y1) = (0,4,0,4)
#n = 100
#
#
#x = np.linspace(x0,x1,n)
#y = np.linspace(y0,y1,n)
#x00 = int(x0)-1
#y00 = int(y0)-1
#x11 = int(x1)+1
#y11 = int(y1)+1
#gradient = np.exp(np.random.rand(x11-x00+1,y11-y00+1)*2*np.pi*1j)
#X,Y = np.meshgrid(x,y)
##print(gradient)
#
#def lerp(a0, a1, w):
# return a0 + (a1-a0)*(-2*w*w*w+3*w*w)
#
#def dotGridGradient(ix, iy, x, y):
# dx = x - ix
# dy = y - iy
# return (np.conj(gradient[iy-y00][ix-x00])*(dx+1j*dy)).real
#
#def bruit(x,y):
# (x0,y0) = (int(x),int(y))
# (x1,y1) = (x0+1,y0+1)
#
# sx = x - x0;
# sy = y - y0;
#
# n0 = dotGridGradient(x0, y0, x, y);
# n1 = dotGridGradient(x1, y0, x, y);
# ix0 = lerp(n0, n1, sx);
# n0 = dotGridGradient(x0, y1, x, y);
# n1 = dotGridGradient(x1, y1, x, y);
# ix1 = lerp(n0, n1, sx);
# return lerp(ix0, ix1, sy);
#
#
#
#Z = np.zeros((n,n))
#for i in range(n):
# for j in range(n):
# Z[i,j] = bruit(x[i],y[j])
#
#pp.imshow(Z,cmap='autumn')
#
#fig = pp.figure()
#ax = pp.axes(projection='3d')
#
#ax.view_init(80, 42)
#ax.plot_surface(X,Y,Z, rstride=1, cstride=1,
# cmap='autumn', edgecolor='none')
+137
View File
@@ -0,0 +1,137 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pythonhighlight}[2011/09/19 python code highlighting; provided by Olivier Verdier <olivier.verdier@gmail.com>]
\RequirePackage{listings}
\RequirePackage{xcolor}
\renewcommand*{\lstlistlistingname}{Code Listings}
\renewcommand*{\lstlistingname}{Code Listing}
\definecolor{gray}{gray}{0.5}
\colorlet{commentcolour}{green!50!black}
\colorlet{stringcolour}{red!60!black}
\colorlet{keywordcolour}{magenta!90!black}
\colorlet{exceptioncolour}{yellow!50!red}
\colorlet{commandcolour}{blue!60!black}
\colorlet{numpycolour}{blue!60!green}
\colorlet{literatecolour}{magenta!90!black}
\colorlet{promptcolour}{green!50!black}
\colorlet{specmethodcolour}{violet}
\newcommand*{\framemargin}{3ex}
\newcommand*{\literatecolour}{\textcolor{literatecolour}}
\newcommand*{\pythonprompt}{\textcolor{promptcolour}{{>}{>}{>}}}
\lstdefinestyle{mypython}{
%\lstset{
%keepspaces=true,
language=python,
showtabs=true,
tab=,
tabsize=2,
basicstyle=\ttfamily\footnotesize,%\setstretch{.5},
stringstyle=\color{stringcolour},
showstringspaces=false,
alsoletter={1234567890},
otherkeywords={\%, \}, \{, \&, \|},
keywordstyle=\color{keywordcolour}\bfseries,
emph={and,break,class,continue,def,yield,del,elif ,else,%
except,exec,finally,for,from,global,if,import,in,%
lambda,not,or,pass,print,raise,return,try,while,assert,with},
emphstyle=\color{blue}\bfseries,
emph={[2]True, False, None},
emphstyle=[2]\color{keywordcolour},
emph={[3]object,type,isinstance,copy,deepcopy,zip,enumerate,reversed,list,set,len,dict,tuple,xrange,append,execfile,real,imag,reduce,str,repr},
emphstyle=[3]\color{commandcolour},
emph={Exception,NameError,IndexError,SyntaxError,TypeError,ValueError,OverflowError,ZeroDivisionError},
emphstyle=\color{exceptioncolour}\bfseries,
%upquote=true,
morecomment=[s]{"""}{"""},
commentstyle=\color{commentcolour}\slshape,
%emph={[4]1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
emph={[4]ode, fsolve, sqrt, exp, sin, cos,arctan, arctan2, arccos, pi, array, norm, solve, dot, arange, isscalar, max, sum, flatten, shape, reshape, find, any, all, abs, plot, linspace, legend, quad, polyval,polyfit, hstack, concatenate,vstack,column_stack,empty,zeros,ones,rand,vander,grid,pcolor,eig,eigs,eigvals,svd,qr,tan,det,logspace,roll,min,mean,cumsum,cumprod,diff,vectorize,lstsq,cla,eye,xlabel,ylabel,squeeze},
emphstyle=[4]\color{numpycolour},
emph={[5]__init__,__add__,__mul__,__div__,__sub__,__call__,__getitem__,__setitem__,__eq__,__ne__,__nonzero__,__rmul__,__radd__,__repr__,__str__,__get__,__truediv__,__pow__,__name__,__future__,__all__},
emphstyle=[5]\color{specmethodcolour},
emph={[6]assert,yield},
emphstyle=[6]\color{keywordcolour}\bfseries,
emph={[7]range},
emphstyle={[7]\color{keywordcolour}\bfseries},
% emph={[7]self},
% emphstyle=[7]\bfseries,
literate=*%
{:}{{\literatecolour:}}{1}%
{=}{{\literatecolour=}}{1}%
{-}{{\literatecolour-}}{1}%
{+}{{\literatecolour+}}{1}%
{*}{{\literatecolour*}}{1}%
{**}{{\literatecolour{**}}}2%
{/}{{\literatecolour/}}{1}%
{//}{{\literatecolour{//}}}2%
{!}{{\literatecolour!}}{1}%
%{(}{{\literatecolour(}}{1}%
%{)}{{\literatecolour)}}{1}%
{[}{{\literatecolour[}}{1}%
{]}{{\literatecolour]}}{1}%
{<}{{\literatecolour<}}{1}%
{>}{{\literatecolour>}}{1}%
{>>>}{\pythonprompt}{3}%
,%
%aboveskip=.5ex,
frame=trbl,
%frameround=tttt,
%framesep=.3ex,
rulecolor=\color{black!40},
%framexleftmargin=\framemargin,
%framextopmargin=.1ex,
%framexbottommargin=.1ex,
%framexrightmargin=\framemargin,
%framexleftmargin=1mm, framextopmargin=1mm, frame=shadowbox, rulesepcolor=\color{blue},#1
%frame=tb,
backgroundcolor=\color{white},
breakindent=.5\textwidth,frame=single,breaklines=true%
%}
}
\newcommand*{\inputpython}[3]{\lstinputlisting[firstline=#2,lastline=#3,firstnumber=#2,frame=single,breakindent=.5\textwidth,frame=single,breaklines=true,style=mypython]{#1}}
\lstnewenvironment{python}[1][]{\lstset{style=mypython}}{}
\lstdefinestyle{mypythoninline}{
style=mypython,%
basicstyle=\ttfamily,%
keywordstyle=\color{keywordcolour},%
emphstyle={[7]\color{keywordcolour}},%
emphstyle=\color{exceptioncolour},%
literate=*%
{:}{{\literatecolour:}}{2}%
{=}{{\literatecolour=}}{2}%
{-}{{\literatecolour-}}{2}%
{+}{{\literatecolour+}}{2}%
{*}{{\literatecolour*}}2%
{**}{{\literatecolour{**}}}3%
{/}{{\literatecolour/}}{2}%
{//}{{\literatecolour{//}}}{2}%
{!}{{\literatecolour!}}{2}%
%{(}{{\literatecolour(}}{2}%
%{)}{{\literatecolour)}}{2}%
{[}{{\literatecolour[}}{2}%
{]}{{\literatecolour]}}{2}%
{<}{{\literatecolour<}}{2}%
{<=}{{\literatecolour{<=}}}3%
{>}{{\literatecolour>}}{2}%
{>=}{{\literatecolour{>=}}}3%
{==}{{\literatecolour{==}}}3%
{!=}{{\literatecolour{!=}}}3%
{+=}{{\literatecolour{+=}}}3%
{-=}{{\literatecolour{-=}}}3%
{*=}{{\literatecolour{*=}}}3%
{/=}{{\literatecolour{/=}}}3%
%% emphstyle=\color{blue},%
}
\newcommand*{\pyth}{\lstinline[style=mypythoninline]}
Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Module contant les fonctions permettant de lire et écrire des fichiers dans le format TMF
@author: mysaa
"""
class WorldSaver():
def __init__():
regSize=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB