[Marble-devel] Review Request 118751: Spherical interpolation methods in GeoDataCoordinates

Dennis Nienhüser earthwings at gentoo.org
Sun Jun 15 06:56:11 UTC 2014



> On June 15, 2014, 12:21 a.m., Torsten Rahn wrote:
> > When I read the summary it did sound a bit awkward but looking at the code and the API this is a really nice idea! :-) The only thing I ask myself is whether we really should call these methods "slerp" and "squad". Maybe "interpolate()" would be more intuitive for most developers who are not familiar with the math behind. But then again how would one distinguish the two? interpolation() and threePointInterpolation? hm ...
> >

My name choice was possible influenced by both Marble::Quaternion and QQuaternion having a slerp() method. I think you're right that in GeoDataCoordinates a more generic interpolate() is a nicer fit. We can call them both interpolate, no problem with that (I'd rather not go for the lengthy slerpInterpolation() and squadInterpolation()). The doxygen comments still mention slerp/squad, so that information is not lost.


- Dennis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118751/#review60113
-----------------------------------------------------------


On June 15, 2014, 6:53 a.m., Dennis Nienhüser wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118751/
> -----------------------------------------------------------
> 
> (Updated June 15, 2014, 6:53 a.m.)
> 
> 
> Review request for Marble and Torsten Rahn.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> - adds a method slerp() to GeoDataCoordinates for spherical linear interpolation. Merely a convenience one for the existing Quaternion::slerp()
> - adds a method squad() to GeoDataCoordinates for spherical spline interpolation. Based on the work of Ken Shoemake, implemented according to Erik B. Dam, Martin Koch, Martin Lillholm. Quaternions, Interpolation and Animation, page 51, http://web.mit.edu/2.998/www/QuaternionReport1.pdf
> - adds an example in examples/cpp/squad-interpolation which picks nearby cities from Marble's internal city database at random and interpolates paths between them. See screenshot and the video at http://nienhueser.de/marble/marble-squad-interpolation.html (plays in your browser)
> 
> squad will become useful to animate the camera path in KML Tour playback.
> 
> Food for thoughts/discussion:
> - Is the current signature GeoDataCoordinates::squad(GC a, b, c, double t) better than a static one GeoDataCoordinates::squad(GC a, b, c, d, double t)?
> - Shall we move it elsewhere? Imho GeoDataCoordinates is a better fit than e.g. MarblePhysics or GeoDataLineString
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/geodata/data/GeoDataCoordinates_p.h 2d81e5e 
>   examples/cpp/CMakeLists.txt f7075cc 
>   examples/cpp/squad-interpolation/CMakeLists.txt PRE-CREATION 
>   examples/cpp/squad-interpolation/squad-interpolation.h PRE-CREATION 
>   examples/cpp/squad-interpolation/squad-interpolation.cpp PRE-CREATION 
>   src/lib/marble/geodata/data/GeoDataCoordinates.h 89fba28 
>   src/lib/marble/geodata/data/GeoDataCoordinates.cpp 2d2c117 
> 
> Diff: https://git.reviewboard.kde.org/r/118751/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> squad example
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/06/14/2c98d4b4-129f-4da6-905e-a5b0eb938aa4__marble-squad-interpolation-1.png
> 
> 
> Thanks,
> 
> Dennis Nienhüser
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140615/154fe635/attachment-0001.html>


More information about the Marble-devel mailing list