Mathematica-ThreeJS-graphics-engine
Mathematica-ThreeJS-graphics-engine copied to clipboard
A parser for Wolfram Mathematica's Graphics3D functions (written in JS)
Graphics3D engine based on THREE.js
written with love in Javascript
.png)
Graphics3D[{
{Emissive[Red], Sphere[{0,0,2}]},
{White, Sphere[]}
}, Lighting->None, RTX->True]
See disscussion at mathematica.stackexchange.
This is a core component of Wolfram JS Frontend project
Examples
Most Mathematica's functions for 3D plotting expands into a bunch of Graphics3D primitives
ContourPlot3D[x^3 + y^2 - z^2 == 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]
.png)
However, styling and labeling is not implemented
VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, VectorColorFunction -> Function[{x, y, z, vx, vy, vz, n}, ColorData["ThermometerColors"][x]]][[1]];
%/. {RGBColor[r_,g_,b_] :> Sequence[RGBColor[r/50,g/50,b/50], Emissive[RGBColor[r,g,b], 5]],};
Graphics3D[{%, Roughness[0], Sphere[{0,0,0}, 0.9]}, Lighting->None, RTX->True]
.png)
Custom lighting, mesh materials, shadows propeties are provided
.png)
.png)
Docs?
See HERE
Contributing
Please feel encouraged to contribute and expand features.
.png)
License
Project is released under the GNU General Public License (GPL).