This commit is contained in:
Laureηt 2023-12-17 16:16:59 +01:00
parent 032b2de006
commit 0a0a108b4f
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
13 changed files with 111 additions and 43 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
result
bin/ bin/
build/ build/
.gradle/ .gradle/

View file

@ -1,32 +0,0 @@
import matplotlib.pyplot as plt
import numpy as np
from math import comb
def B(n, k, t):
return comb(n, k) * t**k * (1 - t)**(n - k)
P = np.array([[0, 0], [0, 2], [1, 2], [1, 0], [1, -2], [2, -1], [2, 0]])
n = 3
S1 = np.array([sum(P[k] * B(n, k, t) for k in range(n + 1)) for t in np.linspace(0, 1, 100)])
S2 = np.array([sum(P[k + n] * B(n, k, t) for k in range(n + 1)) for t in np.linspace(0, 1, 100)])
S1p = np.array([n * sum((P[k + 1] - P[k]) * B(n - 1, k, t) for k in range(n)) for t in np.linspace(0, 1, 100)])
S2p = np.array([n * sum((P[k + 1 + n] - P[k + n]) * B(n - 1, k, t) for k in range(n)) for t in np.linspace(0, 1, 100)])
plt.subplot(121)
plt.plot(S1[:,0], S1[:,1])
plt.plot(S2[:,0], S2[:,1])
plt.plot(P[:,0], P[:,1], 'ro')
plt.axis('equal')
plt.subplot(122)
plt.plot(S1p[:,0], S1p[:,1])
plt.plot(S2p[:,0], S2p[:,1])
plt.axis('equal')
plt.show()

View file

@ -12,12 +12,12 @@ body {
</style> </style>
<p align="center"> <p align="center">
<a href="mailto:laurent.fainsin@etu.inp-n7.fr">Laurent Fainsin</a> &mdash; <a href="mailto:laurent.fainsin@etu.inp-n7.fr">Laurent Fainsin</a> &mdash;
<a href="mailto:damien.guillotin@etu.inp-n7.fr">Damien Guillotin</a> <a href="mailto:damien.guillotin@etu.inp-n7.fr">Damien Guillotin</a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://git.fainsin.bzh/ENSEEIHT/projet-modelisation-geometrique">Lien vers le répertoire</a> <a href="https://git.fainsin.bzh/ENSEEIHT/projet-modelisation-geometrique">Lien vers le répertoire</a>
</p> </p>
## Description ## Description
@ -89,34 +89,34 @@ video {
<table> <table>
<tr> <tr>
<td> <td>
<video src="tuto.webm" autoplay loop controls></video> <video src="figs/tuto.webm" autoplay loop controls></video>
</td> </td>
<td> <td>
<video src="circle.webm" autoplay loop controls></video> <video src="figs/circle.webm" autoplay loop controls></video>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<video src="waterfall.webm" autoplay loop controls></video> <video src="figs/waterfall.webm" autoplay loop controls></video>
</td> </td>
<td> <td>
<video src="island.webm" autoplay loop controls></video> <video src="figs/island.webm" autoplay loop controls></video>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<video src="demo_show.webm" autoplay loop controls></video> <video src="figs/demo_show.webm" autoplay loop controls></video>
</td> </td>
<td> <td>
<video src="demo_noshow.webm" autoplay loop controls></video> <video src="figs/demo_noshow.webm" autoplay loop controls></video>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<video src="full_show.webm" autoplay loop controls></video> <video src="figs/full_show.webm" autoplay loop controls></video>
</td> </td>
<td> <td>
<video src="full_noshow.webm" autoplay loop controls></video> <video src="figs/full_noshow.webm" autoplay loop controls></video>
</td> </td>
</tr> </tr>
</table> </table>

64
flake.lock Normal file
View file

@ -0,0 +1,64 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1702312524,
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1701253981,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

34
flake.nix Normal file
View file

@ -0,0 +1,34 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ];
perSystem = { pkgs, system, ... }: {
devShells.default = pkgs.mkShell { packages = with pkgs; [ pandoc ]; };
packages.report = pkgs.stdenvNoCC.mkDerivation {
name = "report";
src = ./docs;
dontUnpack = true;
buildInputs = with pkgs; [ pandoc ];
buildPhase = ''
pandoc $src/rapport.md -s -o index.html --katex
'';
installPhase = ''
mkdir -p $out
cp -r $src/figs $out/figs
cp index.html $out/index.html
'';
};
};
};
}