Nzy3d.Winforms 0.1.0

dotnet add package Nzy3d.Winforms --version 0.1.0
NuGet\Install-Package Nzy3d.Winforms -Version 0.1.0
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="Nzy3d.Winforms" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nzy3d.Winforms --version 0.1.0
#r "nuget: Nzy3d.Winforms, 0.1.0"
#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.
// Install Nzy3d.Winforms as a Cake Addin
#addin nuget:?package=Nzy3d.Winforms&version=0.1.0

// Install Nzy3d.Winforms as a Cake Tool
#tool nuget:?package=Nzy3d.Winforms&version=0.1.0

Nzy3d

How to

Samples

See Nzy3d.WinformsDemo and the ChartsHelper for Winforms examples

Mapper surface

// Create the chart
Chart.Chart chart = new Chart.Chart(renderer3D, Quality.Nicest);
chart.View.Maximized = false;
chart.View.CameraMode = CameraMode.PERSPECTIVE;
chart.View.IncludingTextLabels = true;

// Create a range for the graph generation
var range = new Maths.Range(-150, 150);
const int steps = 50;

// Build a nice surface to display with cool alpha colors 
// (alpha 0.8 for surface color and 0.5 for wireframe)
var surface = Plot3D.Builder.Builder.BuildOrthonomal(new OrthonormalGrid(range, steps, range, steps), new MyMapper());
surface.ColorMapper = new ColorMapper(new ColorMapRainbow(), surface.Bounds.ZMin, surface.Bounds.ZMax, new Color(1, 1, 1, 0.8));
surface.FaceDisplayed = true;
surface.WireframeDisplayed = true;
surface.WireframeColor = Color.CYAN;
surface.WireframeColor.Mul(new Color(1, 1, 1, 0.5));

// Add surface to chart
chart.Scene.Graph.Add(surface);

surface_ripples

Delaunay surface

// Create data
const int size = 100;
List<Coord3d> coords = new List<Coord3d>(size);
float x, y, z;
var r = new Random(0);

for (int i = 0; i < size; i++)
{
	x = r.NextSingle() - 0.5f;
	y = r.NextSingle() - 0.5f;
	z = r.NextSingle() - 0.5f;
	coords.Add(new Coord3d(x, y, z));
}

// Create chart
Chart.Chart chart = new Chart.Chart(renderer3D, Quality.Nicest);
chart.View.Maximized = false;
chart.View.CameraMode = CameraMode.PERSPECTIVE;
chart.View.IncludingTextLabels = true;

// Create surface
var surface = Plot3D.Builder.Builder.BuildDelaunay(coords);
surface.ColorMapper = new ColorMapper(new ColorMapRainbow(), surface.Bounds.ZMin, surface.Bounds.ZMax, new Color(1, 1, 1, 0.8));
surface.FaceDisplayed = true;
surface.WireframeDisplayed = true;
surface.WireframeColor = Color.CYAN;
surface.WireframeColor.Mul(new Color(1, 1, 1, 0.5));

// Add surface to chart
chart.Scene.Graph.Add(surface);

Scatter graph

scatter_1million

// Create data
var points = new Coord3d[size];
var colors = new Color[size];

float x, y, z;
const float a = 0.25f;

var r = new Random(0);
for (int i = 0; i < size; i++)
{
	x = r.NextSingle() - 0.5f;
	y = r.NextSingle() - 0.5f;
	z = r.NextSingle() - 0.5f;
	points[i] = new Coord3d(x, y, z);
	colors[i] = new Color(x, y, z, a);
}

// Create chart
Chart.Chart chart = new Chart.Chart(renderer3D, Quality.Nicest);
chart.View.Maximized = false;
chart.View.CameraMode = CameraMode.PERSPECTIVE;
chart.View.IncludingTextLabels = true;

// Create scatter
var scatter = new Scatter(points, colors);

// Add surface to chart
chart.Scene.Graph.Add(scatter);

References

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.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
0.1.0 224 7/2/2022