Creating 3D graphics
The VectSharp.ThreeD NuGet package can be used to create 3D plots using the same general approach as VectSharp (naturally, with some complications due to the nature of 3D graphics, such as lights and camera positioning). The 3D scene can be rendered either as a raster image or as a vector image, which is particularly useful for plots of 3D functions.
Here are a few examples of 3D graphics produced with VectSharp.ThreeD:
- An indoors scene with moonlight and two lightbulbs.
- The plot of a function of two variables.
- Two visualisations of a p orbital of the Hydrogen atom (n=2, l=1). On the left, as a point cloud (the probability of finding a point at a certain combination of coordinates is proportional to the squared modulus of the wave function); on the right, as a set of surfaces (the squared modulus of the wave function is constant on each surface; on the outer surface it is 20% of the maximum value and it increases by 10% for each surfance until the inner surface, where it is 90% of the maximum value). The nodal plane is highlighted in grey.
The following code example shows how to plot a cube using VectSharp.ThreeD:
For more details, look at the Readme file in the VectSharp.ThreeD repository.