Nzy3d 0.1.0
dotnet add package Nzy3d --version 0.1.0
NuGet\Install-Package Nzy3d -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" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nzy3d --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nzy3d, 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 as a Cake Addin #addin nuget:?package=Nzy3d&version=0.1.0 // Install Nzy3d as a Cake Tool #tool nuget:?package=Nzy3d&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Nzy3d
- Updated net6.0 version of nzy3d-api
- Uses OpenTK 4.6.7 and the more recent WinForms GLControl
- Perspective mode bug fixed
- Available in Winforms and native WPF (WFP available in the wpf branch due to version issue with the OpenTK control, see issue 61)
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);
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
// 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- OpenTK (>= 4.7.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Nzy3d:
Package | Downloads |
---|---|
Nzy3d.Wpf
A .Net API for 3d charts (based on nzy3d-api) |
|
Nzy3d.Winforms
A .Net API for 3d charts (based on nzy3d-api) |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.0 | 506 | 7/2/2022 |