SplatMesh
PacletDirectoryLoad[NotebookDirectory[]];
<<CoffeeLiqueur`Workshop`SplatMesh`
mesh = Import[FileNameJoin[{"Examples", "butterfly.spz"}], "SPZ"]
mesh["Properties"]
mesh["Preview"]
Graphics3D[{
GeometricTransformation[
mesh, RotationMatrix[-75Degree, {1,1,0}]
]
}]
teapot = (*VB[*)(Uncompress@Get[FileNameJoin[{".iconized", "None-705.wl"}]])(*,*)(*"1:eJxTTMoPSmNhYGAo5gUSYZmp5S6pyflFiSX5RcEcQBHP5Py8zKrUlMwbdxkZ0phACkGqg0pzUoNZgQyfxKTUnGCQkF9+XiqaAhDDLTMnFSwSUlSaCgDo1BoX"*)(*]VB*);
Graphics3D[{
Scale[
Import[FileNameJoin[{"Examples", "tap.spz"}], "SPZ"]
, 10],
Brown, MeshMaterial[MeshPhysicalMaterial[]],
Directive["Roughness"->0, "Metalness"->0.5],
Translate[Rotate[teapot, 3.14 0.9], (*VB[*)(Uncompress["1:eJxTTMoPSmNmYGAoZgESPpnFJUWhB1cs8XO4vL8ov5HlaL/h2/1FLr/evj5g+XM/AFN1E4U="])(*,*)(*"1:eJxTTMoPSmNmYGAo5gUSYZmp5S6pyflFiSX5RcEcQBHP5Py8zKrUlMwCICeNCaSQBUgEleakBrMCGT6JSak5wSAhv/y8VADqehJr"*)(*]VB*)],
PointLight[White, {0,0,6}], HemisphereLight[White, Gray]
}, "OrthographicCameraZoom"->0.8, Lighting->None]
Transformations
rotated = TransformedSplat[
mesh, RotationMatrix[Pi/2, {1,0,0}] // N
];
Export["butterfly_rotated.spz", rotated, "SPZ"]
Append[mesh, {
{0.,0.,0.},
{0.01, 0.1, 0.9},
{.0, .0, .0, 1.0},
1.0,
{1.0,.0,.0}
}] // Graphics3D