mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
* 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
37 lines
1.2 KiB
Lua
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)
|