Files
OpenSpace/data/assets/examples/renderable/renderableinterpolatedpoints/interpolatedpoints_spline.asset
Emma Broman 8a42657deb Feature/examples naming (#3305)
* Update name and path format of examples that follow the new structure
* Fix a broken (updated) property name in an example
* Make other examples' GUI paths more consistent
* Put them all in the Examples folder
2024-06-13 10:42:00 +02:00

37 lines
1.2 KiB
Lua

-- Smoother Interpolation (Spline-based)
-- Example of interpolating points with spline-based interpolation for the position. This
-- leads to smoother transitions at the nodes of the interpolation.
local Node = {
Identifier = "RenderableInterpolatedPoints_Example_Spline",
Renderable = {
Type = "RenderableInterpolatedPoints",
-- Using a random walk dataset, to get movement in some different directions
File = asset.resource("data/interpolation_randomwalk.csv"),
-- Specify how many objects the rows in the dataset represent. Here, the dataset is
-- consists of 10 objects with positions at 6 different time steps
NumberOfObjects = 10,
Interpolation = {
-- Smoothen transitions between two different sets of points, by
-- using a spline based interpolation of the points
UseSplineInterpolation = true
},
-- Reduce the scale of the points a bit compared to default, so we see them more clearly
SizeSettings = {
ScaleExponent = 3.0
}
},
GUI = {
Name = "RenderableInterpolatedPoints - Spline",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)