MathToad.Noise 1.0.9

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package MathToad.Noise --version 1.0.9
                    
NuGet\Install-Package MathToad.Noise -Version 1.0.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MathToad.Noise" Version="1.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MathToad.Noise" Version="1.0.9" />
                    
Directory.Packages.props
<PackageReference Include="MathToad.Noise" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MathToad.Noise --version 1.0.9
                    
#r "nuget: MathToad.Noise, 1.0.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MathToad.Noise@1.0.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MathToad.Noise&version=1.0.9
                    
Install as a Cake Addin
#tool nuget:?package=MathToad.Noise&version=1.0.9
                    
Install as a Cake Tool

MathToad.Noise

MathToad.Noise erweitert MathToad.Core um OpenSimplex2S-Noise und Octave-Utilities.

Enthaltene Bereiche

  • Namespace-Root: taunaria.mathtoad.noise.*
  • OpenSimplex2S-Implementierung
  • Octave-Generator und Octave-Envelopes
  • Noise-/HeightMap-Helfer
  • Konfigurationsobjekte wie SimplexNoiseParameterSet

Features

MathToad.Noise

  • OpenSimplex2S Noise
  • Octave-System (OctaveGenerator, OctaveEnvelope, OctaveType)
  • High-Level Helfer für Noise-Maps und Height-Maps
  • Parameterobjekte zur reproduzierbaren Konfiguration

Installation

Ziel-Framework der Pakete ist aktuell net8.0 und net10.0.

dotnet add package MathToad.Noise

Schnellstart

using taunaria.mathtoad.core.mathematics;
using taunaria.mathtoad.noise;
using taunaria.mathtoad.noise.octaves;
using taunaria.mathtoad.noise.opensimplex;

// 1) Octaves vorbereiten
var octaves = new OctaveGenerator(4, new float3(1, 1, 1), 10).Get("Default", 3);

// 2) Noise-Konfiguration aufbauen
var ps = new SimplexNoiseParameterSet(
    seed: 42,
    spatialOffset: float3.zero,
    noiseScale: new float3(0.05f),
    octaves: octaves,
    smoothness: 1
);

// 3) Karte erzeugen
var size = new size2(128, 128);
Map2<byte> map = SimplexNoiseHelper.GenerateNoiseByteMap(size, ps);

// 4) Wert lesen
byte center = map[64, 64];
Console.WriteLine(center);

Ausführliche Code-Beispiele

1) Heightmap mit Graustufen-Reduktion

using taunaria.mathtoad.core.mathematics;
using taunaria.mathtoad.noise;
using taunaria.mathtoad.noise.mapping;
using taunaria.mathtoad.noise.octaves;

var octaves = new OctaveGenerator(4, new float3(1, 1, 1), 33).Get("Default", 4);

var noiseParams = new SimplexNoiseParameterSet(
    seed: 7,
    spatialOffset: float3.zero,
    noiseScale: new float3(0.03f),
    octaves: octaves,
    smoothness: 1
);

var heightParams = new HeightMapParameterSet(
    size: new size2(128, 128),
    grayScales: 16,
    visibleGrayScales: 16,
    useMaxRange: true,
    invert: false
);

Map2<byte> height = HeightMapHelper.CreateHeightMap(heightParams, noiseParams);
var (min, max) = height.EvaluateMinMaxValues();

Console.WriteLine($"heightmap range: {min}..{max}");

2) Eigenes Octave-Verhalten registrieren

using taunaria.mathtoad.noise.octaves;

[OctaveType("MyCustom", "Custom frequency/amplitude strategy")]
public class MyCustomOctave : OctaveType
{
    public MyCustomOctave(string name, string description) : base(name, description) {}

    public override float Evaluate(float value, int octave)
    {
        // Beispiel: stärkere Gewichtung höherer Octaves
        var weight = 1f + octave * 0.35f;
        return value * weight;
    }
}

// Nutzung
var generator = new OctaveGenerator(5);
generator.AddType(new MyCustomOctave("MyCustom", "Demo"));
var customEnvelope = generator.Get("MyCustom", 4);

Abhängigkeiten

  • MathToad.Core

Lizenz

MathToad.Noise is distributed in this repository under MIT, with one documented third-party provenance exception:

  • src/MathToad.Noise/OpenSimplex/OpenSimplex2S.cs is derived from KdotJPG/OpenSimplex2 and references upstream CC0 1.0 Universal.

For the exact provenance note, see:

  • src/MathToad.Noise/OpenSimplex/OpenSimplex2S.cs
  • THIRD_PARTY_NOTICES.md
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated