commit c6b224e86e88a89cd790919544ef1cacb8334661
Author: = <=>
Date: Thu Nov 12 08:38:54 2026 -0500
init
diff --git a/Raytracer/Program.cs b/Raytracer/Program.cs
new file mode 100644
index 0000000..8fcd3dd
--- /dev/null
+++ b/Raytracer/Program.cs
@@ -0,0 +1,106 @@
+// See https://aka.ms/new-console-template for more information
+
+using System.Text;
+using System.Text.Encodings;
+
+namespace Ray
+{
+ struct Vec3
+ {
+ double x, y, z;
+ }
+
+ readonly struct Color
+ {
+ public readonly byte r, g, b;
+
+ public Color(byte r, byte g, byte b)
+ {
+ this.r = r;
+ this.g = g;
+ this.b = b;
+ }
+ }
+
+ class BitmapImage
+ {
+ public readonly UInt16 width, height;
+ private Color[,] pixels;
+
+
+ public BitmapImage(UInt16 width, UInt16 height)
+ {
+ this.width = width;
+ this.height = height;
+ this.pixels = new Color[width,height];
+ }
+
+ public void setPixel(in UInt16 x, in UInt16 y, in Color c)
+ {
+ this.pixels[x,y] = c;
+ }
+
+ public void writeImage(in string path)
+ {
+ //Rows in BMP images must be divisibly by 4... for some reason.
+ int padding = (4 - (width * 3) % 4) % 4;
+ //8 bit color depth + 26 bytes for header and BITMAPCORE header
+ Int32 bfSize = (width * height * 3) + (padding * this.height) + 26;
+
+ using (FileStream fs = new FileStream(path, FileMode.Create))
+ using (BinaryWriter bw = new BinaryWriter(fs))
+ {
+ //File header
+ bw.Write('B');
+ bw.Write('M');
+ bw.Write(bfSize);
+ bw.Write((Int32)0); //bfReserved 1 and 2
+ bw.Write((Int32)26);
+ //DIB header (Bitmap core)
+ bw.Write((Int32)12);
+ bw.Write(this.width);
+ bw.Write(this.height);
+ bw.Write((Int16)1);
+ bw.Write((Int16)24);
+
+ for (ushort i = 0; i < this.width; i++)
+ {
+ for (ushort j = 0; j < this.height; j++)
+ {
+ bw.Write(this.pixels[i, j].b);
+ bw.Write(this.pixels[i, j].g);
+ bw.Write(this.pixels[i, j].r);
+ }
+ for (ushort j = 0; j < padding; j++) //end-of-row padding.
+ {
+ bw.Write((byte)0);
+ }
+ }
+ }
+ }
+ }
+ class Raytracer
+ {
+ static void Main()
+ {
+ var BMP = new BitmapImage(255, 255);
+ for (ushort i = 0; i < 255; i++)
+ {
+ for (ushort j = 0; j < 255; j++)
+ {
+ BMP.setPixel(i, j, new Color((byte)i, 0, (byte)j));
+ }
+ }
+
+ for (ushort i = 200; i < 255; i++)
+ {
+ for (ushort j = 200; j < 255; j++)
+ {
+ BMP.setPixel(i, j, new Color(0, 255, 0));
+ }
+ }
+
+ BMP.writeImage("C:/Users/Lizzy/test2.bmp");
+ }
+ }
+};
\ No newline at end of file
diff --git a/Raytracer/Raytracer.csproj b/Raytracer/Raytracer.csproj
new file mode 100644
index 0000000..2150e37
--- /dev/null
+++ b/Raytracer/Raytracer.csproj
@@ -0,0 +1,10 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+
+
+
diff --git a/Raytracer/bin/Debug/net8.0/Raytracer.deps.json b/Raytracer/bin/Debug/net8.0/Raytracer.deps.json
new file mode 100644
index 0000000..64873de
--- /dev/null
+++ b/Raytracer/bin/Debug/net8.0/Raytracer.deps.json
@@ -0,0 +1,23 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v8.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v8.0": {
+ "Raytracer/1.0.0": {
+ "runtime": {
+ "Raytracer.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Raytracer/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/Raytracer/bin/Debug/net8.0/Raytracer.dll b/Raytracer/bin/Debug/net8.0/Raytracer.dll
new file mode 100644
index 0000000..c38724c
Binary files /dev/null and b/Raytracer/bin/Debug/net8.0/Raytracer.dll differ
diff --git a/Raytracer/bin/Debug/net8.0/Raytracer.exe b/Raytracer/bin/Debug/net8.0/Raytracer.exe
new file mode 100644
index 0000000..4297489
Binary files /dev/null and b/Raytracer/bin/Debug/net8.0/Raytracer.exe differ
diff --git a/Raytracer/bin/Debug/net8.0/Raytracer.pdb b/Raytracer/bin/Debug/net8.0/Raytracer.pdb
new file mode 100644
index 0000000..a9981cc
Binary files /dev/null and b/Raytracer/bin/Debug/net8.0/Raytracer.pdb differ
diff --git a/Raytracer/bin/Debug/net8.0/Raytracer.runtimeconfig.json b/Raytracer/bin/Debug/net8.0/Raytracer.runtimeconfig.json
new file mode 100644
index 0000000..becfaea
--- /dev/null
+++ b/Raytracer/bin/Debug/net8.0/Raytracer.runtimeconfig.json
@@ -0,0 +1,12 @@
+{
+ "runtimeOptions": {
+ "tfm": "net8.0",
+ "framework": {
+ "name": "Microsoft.NETCore.App",
+ "version": "8.0.0"
+ },
+ "configProperties": {
+ "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/Raytracer/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/Raytracer/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs
new file mode 100644
index 0000000..2217181
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.AssemblyInfo.cs b/Raytracer/obj/Debug/net8.0/Raytracer.AssemblyInfo.cs
new file mode 100644
index 0000000..e96fc6a
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.AssemblyInfo.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("Raytracer")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyProductAttribute("Raytracer")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Raytracer")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// Generated by the MSBuild WriteCodeFragment class.
+
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.AssemblyInfoInputs.cache b/Raytracer/obj/Debug/net8.0/Raytracer.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..a18bb1c
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+e378de223b87c96dc2c0d6a9c2dcdd819f80d6312e9ae270253e4be16082b3ca
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.GeneratedMSBuildEditorConfig.editorconfig b/Raytracer/obj/Debug/net8.0/Raytracer.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000..17f2fba
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,13 @@
+is_global = true
+build_property.TargetFramework = net8.0
+build_property.TargetPlatformMinVersion =
+build_property.UsingMicrosoftNETSdkWeb =
+build_property.ProjectTypeGuids =
+build_property.InvariantGlobalization =
+build_property.PlatformNeutralAssembly =
+build_property.EnforceExtendedAnalyzerRules =
+build_property._SupportedPlatformList = Linux,macOS,Windows
+build_property.RootNamespace = Raytracer
+build_property.ProjectDir = C:\Users\Lizzy\source\repos\Raytracer\Raytracer\
+build_property.EnableComHosting =
+build_property.EnableGeneratedComInterfaceComImportInterop =
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.GlobalUsings.g.cs b/Raytracer/obj/Debug/net8.0/Raytracer.GlobalUsings.g.cs
new file mode 100644
index 0000000..8578f3d
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.GlobalUsings.g.cs
@@ -0,0 +1,8 @@
+//
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.IO;
+global using global::System.Linq;
+global using global::System.Net.Http;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.assets.cache b/Raytracer/obj/Debug/net8.0/Raytracer.assets.cache
new file mode 100644
index 0000000..77ff95c
Binary files /dev/null and b/Raytracer/obj/Debug/net8.0/Raytracer.assets.cache differ
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.csproj.BuildWithSkipAnalyzers b/Raytracer/obj/Debug/net8.0/Raytracer.csproj.BuildWithSkipAnalyzers
new file mode 100644
index 0000000..e69de29
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.csproj.CoreCompileInputs.cache b/Raytracer/obj/Debug/net8.0/Raytracer.csproj.CoreCompileInputs.cache
new file mode 100644
index 0000000..a144211
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+8d9819bd4cb3fc5ce88e0af92e6f3172bfaaaf9edfed30de3ca9ecd4eb30e7b0
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.csproj.FileListAbsolute.txt b/Raytracer/obj/Debug/net8.0/Raytracer.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..7891594
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.csproj.FileListAbsolute.txt
@@ -0,0 +1,14 @@
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\bin\Debug\net8.0\Raytracer.exe
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\bin\Debug\net8.0\Raytracer.deps.json
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\bin\Debug\net8.0\Raytracer.runtimeconfig.json
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\bin\Debug\net8.0\Raytracer.dll
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\bin\Debug\net8.0\Raytracer.pdb
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.GeneratedMSBuildEditorConfig.editorconfig
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.AssemblyInfoInputs.cache
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.AssemblyInfo.cs
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.csproj.CoreCompileInputs.cache
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.dll
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\refint\Raytracer.dll
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.pdb
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\Raytracer.genruntimeconfig.cache
+C:\Users\Lizzy\source\repos\Raytracer\Raytracer\obj\Debug\net8.0\ref\Raytracer.dll
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.dll b/Raytracer/obj/Debug/net8.0/Raytracer.dll
new file mode 100644
index 0000000..c38724c
Binary files /dev/null and b/Raytracer/obj/Debug/net8.0/Raytracer.dll differ
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.genruntimeconfig.cache b/Raytracer/obj/Debug/net8.0/Raytracer.genruntimeconfig.cache
new file mode 100644
index 0000000..044537c
--- /dev/null
+++ b/Raytracer/obj/Debug/net8.0/Raytracer.genruntimeconfig.cache
@@ -0,0 +1 @@
+168f6cf40c8ec39129e210947bcc73c35d0fa1b59a1f10868cc2e26f82ab6187
diff --git a/Raytracer/obj/Debug/net8.0/Raytracer.pdb b/Raytracer/obj/Debug/net8.0/Raytracer.pdb
new file mode 100644
index 0000000..a9981cc
Binary files /dev/null and b/Raytracer/obj/Debug/net8.0/Raytracer.pdb differ
diff --git a/Raytracer/obj/Debug/net8.0/apphost.exe b/Raytracer/obj/Debug/net8.0/apphost.exe
new file mode 100644
index 0000000..4297489
Binary files /dev/null and b/Raytracer/obj/Debug/net8.0/apphost.exe differ
diff --git a/Raytracer/obj/Debug/net8.0/ref/Raytracer.dll b/Raytracer/obj/Debug/net8.0/ref/Raytracer.dll
new file mode 100644
index 0000000..246b04c
Binary files /dev/null and b/Raytracer/obj/Debug/net8.0/ref/Raytracer.dll differ
diff --git a/Raytracer/obj/Debug/net8.0/refint/Raytracer.dll b/Raytracer/obj/Debug/net8.0/refint/Raytracer.dll
new file mode 100644
index 0000000..246b04c
Binary files /dev/null and b/Raytracer/obj/Debug/net8.0/refint/Raytracer.dll differ
diff --git a/Raytracer/obj/Raytracer.csproj.nuget.dgspec.json b/Raytracer/obj/Raytracer.csproj.nuget.dgspec.json
new file mode 100644
index 0000000..8afd47e
--- /dev/null
+++ b/Raytracer/obj/Raytracer.csproj.nuget.dgspec.json
@@ -0,0 +1,72 @@
+{
+ "format": 1,
+ "restore": {
+ "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj": {}
+ },
+ "projects": {
+ "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj",
+ "projectName": "Raytracer",
+ "projectPath": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj",
+ "packagesPath": "C:\\Users\\Lizzy\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Lizzy\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ }
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.412/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Raytracer/obj/Raytracer.csproj.nuget.g.props b/Raytracer/obj/Raytracer.csproj.nuget.g.props
new file mode 100644
index 0000000..ca30bad
--- /dev/null
+++ b/Raytracer/obj/Raytracer.csproj.nuget.g.props
@@ -0,0 +1,16 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\Lizzy\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
+ PackageReference
+ 6.13.2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Raytracer/obj/Raytracer.csproj.nuget.g.targets b/Raytracer/obj/Raytracer.csproj.nuget.g.targets
new file mode 100644
index 0000000..3dc06ef
--- /dev/null
+++ b/Raytracer/obj/Raytracer.csproj.nuget.g.targets
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Raytracer/obj/project.assets.json b/Raytracer/obj/project.assets.json
new file mode 100644
index 0000000..0dcc194
--- /dev/null
+++ b/Raytracer/obj/project.assets.json
@@ -0,0 +1,78 @@
+{
+ "version": 3,
+ "targets": {
+ "net8.0": {}
+ },
+ "libraries": {},
+ "projectFileDependencyGroups": {
+ "net8.0": []
+ },
+ "packageFolders": {
+ "C:\\Users\\Lizzy\\.nuget\\packages\\": {},
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj",
+ "projectName": "Raytracer",
+ "projectPath": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj",
+ "packagesPath": "C:\\Users\\Lizzy\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Lizzy\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net8.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ },
+ "restoreAuditProperties": {
+ "enableAudit": "true",
+ "auditLevel": "low",
+ "auditMode": "direct"
+ }
+ },
+ "frameworks": {
+ "net8.0": {
+ "targetAlias": "net8.0",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.412/PortableRuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Raytracer/obj/project.nuget.cache b/Raytracer/obj/project.nuget.cache
new file mode 100644
index 0000000..9e9e007
--- /dev/null
+++ b/Raytracer/obj/project.nuget.cache
@@ -0,0 +1,8 @@
+{
+ "version": 2,
+ "dgSpecHash": "FMPI4qfQck4=",
+ "success": true,
+ "projectFilePath": "C:\\Users\\Lizzy\\source\\repos\\Raytracer\\Raytracer\\Raytracer.csproj",
+ "expectedPackageFiles": [],
+ "logs": []
+}
\ No newline at end of file