Skip to content

Commit

Permalink
HAUS
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronw-dev committed May 26, 2024
1 parent 878d995 commit 3b421f9
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 11 deletions.
9 changes: 7 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,17 @@ public static void Main(string[] args)

int homeX;
int homeY;

Vector3 drag = Vector3.Zero;
Vector3 lift = Vector3.Zero;

Raylib.InitWindow(windowWidth, windowHeight, "Aviary");
Raylib.SetTargetFPS(120);

bool flipAirfoil = true;
bool flipAirfoil = false;
//List<Vector2> currentAirfoil = getAirfoil(filepath: "C:/Users/Aaron/Aviary/airfoils/fauvel.dat", ref airfoilName,flipAirfoil);
List<Vector2> currentAirfoil = getAirfoil(filepath: "C:/Users/Aaron/Aviary/airfoils/n0009sm.dat", ref airfoilName, flipAirfoil);
//List<Vector2> currentAirfoil = getAirfoil(filepath: "C:/Users/Aaron/Aviary/airfoils/n0009sm.dat", ref airfoilName, flipAirfoil);
List<Vector2> currentAirfoil = getAirfoil(filepath: "C:/Users/Aaron/Aviary/airfoils/hause.dat", ref airfoilName, flipAirfoil);
//List<Vector2> currentAirfoil = getAirfoil(filepath: "C:/Users/Aaron/Aviary/airfoils/stcyr171.dat", ref airfoilName, flipAirfoil);
Console.WriteLine("Current airfoil: " + airfoilName);

Expand Down
11 changes: 11 additions & 0 deletions airfoils/hause.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
a fricking house
0.167 0.375
0.167 -0.125
0.5 -0.375
0.833 -0.125
0.833 0.375
0.583 0.375
0.583 0.083
0.417 0.083
0.417 0.375
0.167 0.375
Binary file modified bin/Debug/net6.0/Aviary.dll
Binary file not shown.
Binary file modified bin/Debug/net6.0/Aviary.pdb
Binary file not shown.
10 changes: 5 additions & 5 deletions obj/Aviary.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"format": 1,
"restore": {
"c:\\Users\\Aaron\\Aviary\\Aviary.csproj": {}
"C:\\Users\\Aaron\\Aviary\\Aviary.csproj": {}
},
"projects": {
"c:\\Users\\Aaron\\Aviary\\Aviary.csproj": {
"C:\\Users\\Aaron\\Aviary\\Aviary.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "c:\\Users\\Aaron\\Aviary\\Aviary.csproj",
"projectUniqueName": "C:\\Users\\Aaron\\Aviary\\Aviary.csproj",
"projectName": "Aviary",
"projectPath": "c:\\Users\\Aaron\\Aviary\\Aviary.csproj",
"projectPath": "C:\\Users\\Aaron\\Aviary\\Aviary.csproj",
"packagesPath": "C:\\Users\\Aaron\\.nuget\\packages\\",
"outputPath": "c:\\Users\\Aaron\\Aviary\\obj\\",
"outputPath": "C:\\Users\\Aaron\\Aviary\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Aaron\\AppData\\Roaming\\NuGet\\NuGet.Config",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Aviary
build_property.ProjectDir = c:\Users\Aaron\Aviary\
build_property.ProjectDir = C:\Users\Aaron\Aviary\
Binary file modified obj/Debug/net6.0/Aviary.assets.cache
Binary file not shown.
Binary file modified obj/Debug/net6.0/Aviary.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion obj/Debug/net6.0/Aviary.genruntimeconfig.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7ae0dd5699a7c8a975f7fe20c7f9aab6c7359d8e
91290c5ce13e857678b6d2307147b38c07562dfb
Binary file modified obj/Debug/net6.0/Aviary.pdb
Binary file not shown.
4 changes: 2 additions & 2 deletions obj/project.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": 2,
"dgSpecHash": "4omFQvbCvMpWK5tmafaRWetNQJueH9BV22zDVKwnOA8Hunutfa5GfbhvdikSm5G9eYxA75dGXt4NDsCl7CxhgA==",
"dgSpecHash": "g6SNMX5XY+wmtAFmVagVnNf19iuGONg1ek/0aEuP353Tp6Qaou6/W42tsggh/YYSTLcITMQNJKNMHXuGtMn7Hg==",
"success": true,
"projectFilePath": "c:\\Users\\Aaron\\Aviary\\Aviary.csproj",
"projectFilePath": "C:\\Users\\Aaron\\Aviary\\Aviary.csproj",
"expectedPackageFiles": [
"C:\\Users\\Aaron\\.nuget\\packages\\microsoft.toolkit.highperformance\\7.1.2\\microsoft.toolkit.highperformance.7.1.2.nupkg.sha512",
"C:\\Users\\Aaron\\.nuget\\packages\\raylib-cslo\\4.2.0.9\\raylib-cslo.4.2.0.9.nupkg.sha512",
Expand Down
33 changes: 33 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>

<head>
<title>Inkscape Output</title>
</head>

<body>
<canvas id='canvas' width='960' height='960'></canvas>
<script>
var ctx = document.getElementById("canvas").getContext("2d");

// #path2
ctx.beginPath();
ctx.strokeStyle = 'rgb(255, 0, 0)';
ctx.lineWidth = 90.709000;
ctx.moveTo(160.000000, -120.000000);
ctx.lineTo(160.000000, -600.000000);
ctx.lineTo(480.000000, -840.000000);
ctx.lineTo(800.000000, -600.000000);
ctx.lineTo(800.000000, -120.000000);
ctx.lineTo(560.000000, -120.000000);
ctx.lineTo(560.000000, -400.000000);
ctx.lineTo(400.000000, -400.000000);
ctx.lineTo(400.000000, -120.000000);
ctx.lineTo(160.000000, -120.000000);
ctx.closePath();
ctx.stroke();

</script>
</body>

</html>
23 changes: 23 additions & 0 deletions turnitintoadatfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
file = '''
ctx.moveTo(160.000000, -120.000000);
ctx.lineTo(160.000000, -600.000000);
ctx.lineTo(480.000000, -840.000000);
ctx.lineTo(800.000000, -600.000000);
ctx.lineTo(800.000000, -120.000000);
ctx.lineTo(560.000000, -120.000000);
ctx.lineTo(560.000000, -400.000000);
ctx.lineTo(400.000000, -400.000000);
ctx.lineTo(400.000000, -120.000000);
ctx.lineTo(160.000000, -120.000000);
'''
final = []
for section in file.strip().split("\n"):
beautifulstring = (section.strip()[section.strip().find("(")+1:-2])
splitstring = beautifulstring.split(", ")
splitstring = [int(i.replace(".000000", "")) for i in splitstring]
splitstring[1] += 480
splitstring = [str(round((i / 960), 3)) for i in splitstring]
print(" ".join(splitstring))
final.append(" \t".join(splitstring))
with open("output.dat", "w") as file:
file.write("OUTPUT AIRFOIL\n"+("\n".join(final)))

0 comments on commit 3b421f9

Please sign in to comment.